diff --git a/.azure-pipelines/docs.yml b/.azure-pipelines/docs.yml index a66d7513ec1d..d068788556da 100644 --- a/.azure-pipelines/docs.yml +++ b/.azure-pipelines/docs.yml @@ -14,7 +14,7 @@ jobs: vmImage: 'windows-2019' steps: - - powershell: | + - pwsh: | copy eng/repo-docs/index.html $(Build.ArtifactStagingDirectory) displayName: 'Copy index to artifact staging' @@ -63,7 +63,7 @@ jobs: publishJUnitResults: false goals: 'install' - - powershell: | + - pwsh: | copy -r target/staging/apidocs $(Build.ArtifactStagingDirectory)/client displayName: 'Copy reports to artifact staging' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 814986b4cb18..ec84e9e29259 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # Instructions for CODEOWNERS file format and automatic build failure notifications: -# https://github.com/Azure/azure-sdk/blob/master/docs/engineering-system/codeowners.md +# https://github.com/Azure/azure-sdk/blob/master/docs/policies/opensource.md#codeowners ########### # SDK @@ -27,10 +27,10 @@ ########### # Eng Sys ########### -/eng/ @weshaggard @mitchdenny @danieljurek -/eng/code-quality-reports/ @mssfang @JonathanGiles -/eng/jacoco-test-coverage/ @srnagar @JonathanGiles -/eng/spotbugs-aggregate-report/ @srnagar @JonathanGiles +/eng/ @JimSuplizio @mitchdenny @weshaggard @danieljurek +/eng/code-quality-reports/ @mssfang @JonathanGiles +/eng/jacoco-test-coverage/ @srnagar @JonathanGiles +/eng/spotbugs-aggregate-report/ @srnagar @JonathanGiles /**/tests.yml @danieljurek /**/ci.yml @mitchdenny diff --git a/README.md b/README.md index 8d01aaa910b2..07cd69e9267c 100644 --- a/README.md +++ b/README.md @@ -14,21 +14,21 @@ To get started with a specific library, see the **README.md** file located in th For tutorials, samples, quick starts and other documentation, visit [Azure for Java Developers](https://docs.microsoft.com/java/azure/). ### Prerequisites -Java 8 or later is required to use the September 2019 client preview libraries, otherwise Java 7 or later is required. +Java 8 or later is required to use the October 2019 client preview libraries, otherwise Java 7 or later is required. ## Packages available Each service might have a number of libraries available from each of the following categories: -* [Client - September 2019 Preview](#Client-September-2019-Preview) +* [Client - October 2019 Preview](#Client-October-2019-Preview) * [Client - Stable](#Client-Stable) * [Management](#Management) -### Client: September 2019 Preview +### Client: October 2019 Preview New wave of packages that we are currently releasing in **preview**. These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java/guidelines/) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features [here](core). These preview libraries can be easily identified by their folder, package, and namespaces names starting with `azure-`, e.g. `azure-keyvault`. -The libraries released in the September 2019 preview: +The libraries released in the October 2019 preview: - [App Configuration](sdk/appconfiguration/azure-data-appconfiguration/README.md) - [Event Hubs](sdk/eventhubs/azure-messaging-eventhubs/README.md) - [Event Hubs Checkpoint Store](sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md) diff --git a/api-specs.json b/api-specs.json index 0166ab5c4fdb..5a03fcdf7d16 100644 --- a/api-specs.json +++ b/api-specs.json @@ -195,6 +195,10 @@ "source": "specification/operationsmanagement/resource-manager/readme.md", "args": "--multiapi --fluent" }, + "peering/resource-manager": { + "source": "specification/peering/resource-manager/readme.md", + "args": "--multiapi --fluent" + }, "policyinsights/resource-manager": { "source": "specification/policyinsights/resource-manager/readme.md", "args": "--multiapi --fluent" diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 4fb91b2a5c7e..7ae1ae394bf0 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -76,6 +76,7 @@ known_content_issues: - ['sdk/cosmos/microsoft-azure-cosmos-benchmark/README.md', '#3113'] - ['sdk/cosmos/README.md', '#3113'] - ['sdk/storage/azure-storage-blob/swagger/README.md', '#3113'] + - ['sdk/storage/azure-storage-file-datalake/swagger/README.md', '#3113'] - ['sdk/storage/azure-storage-queue/swagger/README.md', '#3113'] - ['sdk/storage/azure-storage-file/swagger/README.md', '#3113'] package_indexing_exclusion_list: 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 8739e95c13ef..154e4abd37d1 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 @@ -76,8 +76,9 @@ - - + + + @@ -126,8 +127,8 @@ - - + + @@ -141,10 +142,8 @@ - - - - + + @@ -198,4 +197,7 @@ + + + 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 f5210017b41e..22494e5611ee 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 @@ -385,6 +385,8 @@ + + @@ -453,8 +455,8 @@ - - + + @@ -579,7 +581,7 @@ - + diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index e15f99fa9ac1..9434447b5cad 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -37,6 +37,7 @@ 12.0.0-preview.4 12.0.0-preview.4 12.0.0-preview.4 + 12.0.0-preview.4 12.0.0-preview.4 12.0.0-preview.4 com.azure.eng.jacoco.test.coverage @@ -126,6 +127,11 @@ azure-storage-file ${azure-storage-file.version} + + com.azure + azure-storage-file-datalake + ${azure-storage-file-datalake.version} + com.azure azure-storage-queue diff --git a/eng/pipelines/client.yml b/eng/pipelines/client.yml index 9ce1b2316ce8..dbcf39e47e11 100644 --- a/eng/pipelines/client.yml +++ b/eng/pipelines/client.yml @@ -178,7 +178,7 @@ jobs: goals: 'clean package exec:java' # We only copy artifacts into the staging in nightly builds, we don't bother with this for PR validation builds. - - powershell: | + - pwsh: | copy -r target/staging $(Build.ArtifactStagingDirectory) copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory) copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging") diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 638ac201fc3d..8478e274a06b 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -198,7 +198,7 @@ jobs: goals: 'clean package exec:java' # We only copy artifacts into the staging in nightly builds, we don't bother with this for PR validation builds. - - powershell: | + - pwsh: | copy -r target/staging $(Build.ArtifactStagingDirectory) copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory) copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging") diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index 4ac907f97669..d2457dab2603 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -58,7 +58,7 @@ stages: PreRunSteps: - powershell: | Write-Host "Downloading Cosmos Emulator - $(EmulatorMsiUrl)" - wget "$(EmulatorMsiUrl)" -outfile "$env:temp\azure-cosmosdb-emulator.msi" + Invoke-WebRequest "$(EmulatorMsiUrl)" -OutFile "$env:temp\azure-cosmosdb-emulator.msi" Write-Host "Finished Downloading Cosmos Emulator - $env:temp\azure-cosmosdb-emulator.msi" dir "$env:temp" displayName: 'Download Public Cosmos DB Emulator' diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 82e14a0b4207..f808490f9bc7 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -4,4 +4,4 @@ variables: MemoryOptions: '-Xmx3072m' #Agent.Source.Git.ShallowFetchDepth: 1 skipComponentGovernanceDetection: true - EmulatorMsiUrl: 'https://acpedaily1.blob.core.windows.net/emulator/azure-cosmos-emulator.msi' + EmulatorMsiUrl: 'https://aka.ms/cosmosdb-emulator' diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index cab38e666c2d..d75a91728a93 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -32,6 +32,7 @@ 12.0.0-preview.4 12.0.0-preview.4 12.0.0-preview.4 + 12.0.0-preview.4 12.0.0-preview.4 12.0.0-preview.4 com.azure.eng.spotbugs.reporting @@ -66,6 +67,7 @@ ..\..\sdk\core\azure-core-http-netty\src\main\java\com ..\..\sdk\core\azure-core-http-netty\src\samples\java\com ..\..\sdk\core\azure-core-http-okhttp\src\main\java\com + ..\..\sdk\core\azure-core-http-okhttp\src\samples\java\com ..\..\sdk\core\azure-core-management\src\main\java\com ..\..\sdk\core\azure-core-test\src\main\java\com ..\..\sdk\eventhubs\azure-messaging-eventhubs\src\main\java\com @@ -79,11 +81,14 @@ ..\..\sdk\storage\azure-storage-common\src\main\java\com + ..\..\sdk\storage\azure-storage-common\src\samples\java\com ..\..\sdk\storage\azure-storage-blob\src\main\java\com ..\..\sdk\storage\azure-storage-blob\src\samples\java\com ..\..\sdk\storage\azure-storage-blob-cryptography\src\main\java\com ..\..\sdk\storage\azure-storage-file\src\main\java\com ..\..\sdk\storage\azure-storage-file\src\samples\java\com + ..\..\sdk\storage\azure-storage-file-datalake\src\main\java\com + ..\..\sdk\storage\azure-storage-file-datalake\src\samples\java\com ..\..\sdk\storage\azure-storage-queue\src\main\java\com ..\..\sdk\storage\azure-storage-queue\src\samples\java\com ..\..\sdk\storage\azure-storage-queue-cryptography\src\main\java\com @@ -228,6 +233,11 @@ azure-storage-file ${azure-storage-file.version} + + com.azure + azure-storage-file-datalake + ${azure-storage-file-datalake.version} + com.azure azure-storage-queue diff --git a/parent/pom.xml b/parent/pom.xml index dd23369f8cb9..63742fc6bd26 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -113,9 +113,9 @@ 2.1.1 1.7.28 1.7.0 - 3.2.12.RELEASE - 0.8.3.RELEASE - 4.1.33.Final + 3.3.0.RELEASE + 0.9.0.RELEASE + 4.1.39.Final 4.1.0 2.5.2 0.20.0 diff --git a/peering/resource-manager/v2019_08_01_preview/pom.xml b/peering/resource-manager/v2019_08_01_preview/pom.xml new file mode 100644 index 000000000000..154085474ad6 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.peering.v2019_08_01_preview + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-peering + 1.0.0-beta + jar + Microsoft Azure SDK for Peering Management + This package contains Microsoft Peering Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/BgpSession.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/BgpSession.java new file mode 100644 index 000000000000..76cbb5ba8214 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/BgpSession.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a BGP session. + */ +public class BgpSession { + /** + * The IPv4 prefix that contains both ends' IPv4 addresses. + */ + @JsonProperty(value = "sessionPrefixV4") + private String sessionPrefixV4; + + /** + * The IPv6 prefix that contains both ends' IPv6 addresses. + */ + @JsonProperty(value = "sessionPrefixV6") + private String sessionPrefixV6; + + /** + * The IPv4 session address on Microsoft's end. + */ + @JsonProperty(value = "microsoftSessionIPv4Address", access = JsonProperty.Access.WRITE_ONLY) + private String microsoftSessionIPv4Address; + + /** + * The IPv6 session address on Microsoft's end. + */ + @JsonProperty(value = "microsoftSessionIPv6Address", access = JsonProperty.Access.WRITE_ONLY) + private String microsoftSessionIPv6Address; + + /** + * The IPv4 session address on peer's end. + */ + @JsonProperty(value = "peerSessionIPv4Address") + private String peerSessionIPv4Address; + + /** + * The IPv6 session address on peer's end. + */ + @JsonProperty(value = "peerSessionIPv6Address") + private String peerSessionIPv6Address; + + /** + * The state of the IPv4 session. Possible values include: 'None', 'Idle', + * 'Connect', 'Active', 'OpenSent', 'OpenConfirm', 'OpenReceived', + * 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'. + */ + @JsonProperty(value = "sessionStateV4", access = JsonProperty.Access.WRITE_ONLY) + private SessionStateV4 sessionStateV4; + + /** + * The state of the IPv6 session. Possible values include: 'None', 'Idle', + * 'Connect', 'Active', 'OpenSent', 'OpenConfirm', 'OpenReceived', + * 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'. + */ + @JsonProperty(value = "sessionStateV6", access = JsonProperty.Access.WRITE_ONLY) + private SessionStateV6 sessionStateV6; + + /** + * The maximum number of prefixes advertised over the IPv4 session. + */ + @JsonProperty(value = "maxPrefixesAdvertisedV4") + private Integer maxPrefixesAdvertisedV4; + + /** + * The maximum number of prefixes advertised over the IPv6 session. + */ + @JsonProperty(value = "maxPrefixesAdvertisedV6") + private Integer maxPrefixesAdvertisedV6; + + /** + * The MD5 authentication key of the session. + */ + @JsonProperty(value = "md5AuthenticationKey") + private String md5AuthenticationKey; + + /** + * Get the IPv4 prefix that contains both ends' IPv4 addresses. + * + * @return the sessionPrefixV4 value + */ + public String sessionPrefixV4() { + return this.sessionPrefixV4; + } + + /** + * Set the IPv4 prefix that contains both ends' IPv4 addresses. + * + * @param sessionPrefixV4 the sessionPrefixV4 value to set + * @return the BgpSession object itself. + */ + public BgpSession withSessionPrefixV4(String sessionPrefixV4) { + this.sessionPrefixV4 = sessionPrefixV4; + return this; + } + + /** + * Get the IPv6 prefix that contains both ends' IPv6 addresses. + * + * @return the sessionPrefixV6 value + */ + public String sessionPrefixV6() { + return this.sessionPrefixV6; + } + + /** + * Set the IPv6 prefix that contains both ends' IPv6 addresses. + * + * @param sessionPrefixV6 the sessionPrefixV6 value to set + * @return the BgpSession object itself. + */ + public BgpSession withSessionPrefixV6(String sessionPrefixV6) { + this.sessionPrefixV6 = sessionPrefixV6; + return this; + } + + /** + * Get the IPv4 session address on Microsoft's end. + * + * @return the microsoftSessionIPv4Address value + */ + public String microsoftSessionIPv4Address() { + return this.microsoftSessionIPv4Address; + } + + /** + * Get the IPv6 session address on Microsoft's end. + * + * @return the microsoftSessionIPv6Address value + */ + public String microsoftSessionIPv6Address() { + return this.microsoftSessionIPv6Address; + } + + /** + * Get the IPv4 session address on peer's end. + * + * @return the peerSessionIPv4Address value + */ + public String peerSessionIPv4Address() { + return this.peerSessionIPv4Address; + } + + /** + * Set the IPv4 session address on peer's end. + * + * @param peerSessionIPv4Address the peerSessionIPv4Address value to set + * @return the BgpSession object itself. + */ + public BgpSession withPeerSessionIPv4Address(String peerSessionIPv4Address) { + this.peerSessionIPv4Address = peerSessionIPv4Address; + return this; + } + + /** + * Get the IPv6 session address on peer's end. + * + * @return the peerSessionIPv6Address value + */ + public String peerSessionIPv6Address() { + return this.peerSessionIPv6Address; + } + + /** + * Set the IPv6 session address on peer's end. + * + * @param peerSessionIPv6Address the peerSessionIPv6Address value to set + * @return the BgpSession object itself. + */ + public BgpSession withPeerSessionIPv6Address(String peerSessionIPv6Address) { + this.peerSessionIPv6Address = peerSessionIPv6Address; + return this; + } + + /** + * Get the state of the IPv4 session. Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'. + * + * @return the sessionStateV4 value + */ + public SessionStateV4 sessionStateV4() { + return this.sessionStateV4; + } + + /** + * Get the state of the IPv6 session. Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'. + * + * @return the sessionStateV6 value + */ + public SessionStateV6 sessionStateV6() { + return this.sessionStateV6; + } + + /** + * Get the maximum number of prefixes advertised over the IPv4 session. + * + * @return the maxPrefixesAdvertisedV4 value + */ + public Integer maxPrefixesAdvertisedV4() { + return this.maxPrefixesAdvertisedV4; + } + + /** + * Set the maximum number of prefixes advertised over the IPv4 session. + * + * @param maxPrefixesAdvertisedV4 the maxPrefixesAdvertisedV4 value to set + * @return the BgpSession object itself. + */ + public BgpSession withMaxPrefixesAdvertisedV4(Integer maxPrefixesAdvertisedV4) { + this.maxPrefixesAdvertisedV4 = maxPrefixesAdvertisedV4; + return this; + } + + /** + * Get the maximum number of prefixes advertised over the IPv6 session. + * + * @return the maxPrefixesAdvertisedV6 value + */ + public Integer maxPrefixesAdvertisedV6() { + return this.maxPrefixesAdvertisedV6; + } + + /** + * Set the maximum number of prefixes advertised over the IPv6 session. + * + * @param maxPrefixesAdvertisedV6 the maxPrefixesAdvertisedV6 value to set + * @return the BgpSession object itself. + */ + public BgpSession withMaxPrefixesAdvertisedV6(Integer maxPrefixesAdvertisedV6) { + this.maxPrefixesAdvertisedV6 = maxPrefixesAdvertisedV6; + return this; + } + + /** + * Get the MD5 authentication key of the session. + * + * @return the md5AuthenticationKey value + */ + public String md5AuthenticationKey() { + return this.md5AuthenticationKey; + } + + /** + * Set the MD5 authentication key of the session. + * + * @param md5AuthenticationKey the md5AuthenticationKey value to set + * @return the BgpSession object itself. + */ + public BgpSession withMd5AuthenticationKey(String md5AuthenticationKey) { + this.md5AuthenticationKey = md5AuthenticationKey; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/CheckServiceProviderAvailabilityInput.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/CheckServiceProviderAvailabilityInput.java new file mode 100644 index 000000000000..89841117b9c8 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/CheckServiceProviderAvailabilityInput.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class for CheckServiceProviderAvailabilityInput. + */ +public class CheckServiceProviderAvailabilityInput { + /** + * Gets or sets the PeeringServiceLocation. + */ + @JsonProperty(value = "peeringServiceLocation") + private String peeringServiceLocation; + + /** + * Gets or sets the PeeringServiceProvider. + */ + @JsonProperty(value = "peeringServiceProvider") + private String peeringServiceProvider; + + /** + * Get gets or sets the PeeringServiceLocation. + * + * @return the peeringServiceLocation value + */ + public String peeringServiceLocation() { + return this.peeringServiceLocation; + } + + /** + * Set gets or sets the PeeringServiceLocation. + * + * @param peeringServiceLocation the peeringServiceLocation value to set + * @return the CheckServiceProviderAvailabilityInput object itself. + */ + public CheckServiceProviderAvailabilityInput withPeeringServiceLocation(String peeringServiceLocation) { + this.peeringServiceLocation = peeringServiceLocation; + return this; + } + + /** + * Get gets or sets the PeeringServiceProvider. + * + * @return the peeringServiceProvider value + */ + public String peeringServiceProvider() { + return this.peeringServiceProvider; + } + + /** + * Set gets or sets the PeeringServiceProvider. + * + * @param peeringServiceProvider the peeringServiceProvider value to set + * @return the CheckServiceProviderAvailabilityInput object itself. + */ + public CheckServiceProviderAvailabilityInput withPeeringServiceProvider(String peeringServiceProvider) { + this.peeringServiceProvider = peeringServiceProvider; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ConnectionState.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ConnectionState.java new file mode 100644 index 000000000000..98749844ebf0 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ConnectionState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionState. + */ +public final class ConnectionState extends ExpandableStringEnum { + /** Static value None for ConnectionState. */ + public static final ConnectionState NONE = fromString("None"); + + /** Static value PendingApproval for ConnectionState. */ + public static final ConnectionState PENDING_APPROVAL = fromString("PendingApproval"); + + /** Static value Approved for ConnectionState. */ + public static final ConnectionState APPROVED = fromString("Approved"); + + /** Static value ProvisioningStarted for ConnectionState. */ + public static final ConnectionState PROVISIONING_STARTED = fromString("ProvisioningStarted"); + + /** Static value ProvisioningFailed for ConnectionState. */ + public static final ConnectionState PROVISIONING_FAILED = fromString("ProvisioningFailed"); + + /** Static value ProvisioningCompleted for ConnectionState. */ + public static final ConnectionState PROVISIONING_COMPLETED = fromString("ProvisioningCompleted"); + + /** Static value Validating for ConnectionState. */ + public static final ConnectionState VALIDATING = fromString("Validating"); + + /** Static value Active for ConnectionState. */ + public static final ConnectionState ACTIVE = fromString("Active"); + + /** + * Creates or finds a ConnectionState from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionState + */ + @JsonCreator + public static ConnectionState fromString(String name) { + return fromString(name, ConnectionState.class); + } + + /** + * @return known ConnectionState values + */ + public static Collection values() { + return values(ConnectionState.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ContactInfo.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ContactInfo.java new file mode 100644 index 000000000000..e216ee081898 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ContactInfo.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The contact information of the peer. + */ +public class ContactInfo { + /** + * The list of email addresses. + */ + @JsonProperty(value = "emails") + private List emails; + + /** + * The list of contact numbers. + */ + @JsonProperty(value = "phone") + private List phone; + + /** + * Get the list of email addresses. + * + * @return the emails value + */ + public List emails() { + return this.emails; + } + + /** + * Set the list of email addresses. + * + * @param emails the emails value to set + * @return the ContactInfo object itself. + */ + public ContactInfo withEmails(List emails) { + this.emails = emails; + return this; + } + + /** + * Get the list of contact numbers. + * + * @return the phone value + */ + public List phone() { + return this.phone; + } + + /** + * Set the list of contact numbers. + * + * @param phone the phone value to set + * @return the ContactInfo object itself. + */ + public ContactInfo withPhone(List phone) { + this.phone = phone; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectConnection.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectConnection.java new file mode 100644 index 000000000000..56df3a350c3d --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectConnection.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a direct connection. + */ +public class DirectConnection { + /** + * The bandwidth of the connection. + */ + @JsonProperty(value = "bandwidthInMbps") + private Integer bandwidthInMbps; + + /** + * The bandwidth that is actually provisioned. + */ + @JsonProperty(value = "provisionedBandwidthInMbps") + private Integer provisionedBandwidthInMbps; + + /** + * The field indicating if Microsoft provides session ip addresses. + * Possible values include: 'Microsoft', 'Peer'. + */ + @JsonProperty(value = "sessionAddressProvider") + private SessionAddressProvider sessionAddressProvider; + + /** + * The flag that indicates whether or not the connection is used for + * peering service. + */ + @JsonProperty(value = "useForPeeringService") + private Boolean useForPeeringService; + + /** + * The PeeringDB.com ID of the facility at which the connection has to be + * set up. + */ + @JsonProperty(value = "peeringDBFacilityId") + private Integer peeringDBFacilityId; + + /** + * The state of the connection. Possible values include: 'None', + * 'PendingApproval', 'Approved', 'ProvisioningStarted', + * 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'. + */ + @JsonProperty(value = "connectionState", access = JsonProperty.Access.WRITE_ONLY) + private ConnectionState connectionState; + + /** + * The BGP session associated with the connection. + */ + @JsonProperty(value = "bgpSession") + private BgpSession bgpSession; + + /** + * The unique identifier (GUID) for the connection. + */ + @JsonProperty(value = "connectionIdentifier") + private String connectionIdentifier; + + /** + * Get the bandwidth of the connection. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the bandwidth of the connection. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + + /** + * Get the bandwidth that is actually provisioned. + * + * @return the provisionedBandwidthInMbps value + */ + public Integer provisionedBandwidthInMbps() { + return this.provisionedBandwidthInMbps; + } + + /** + * Set the bandwidth that is actually provisioned. + * + * @param provisionedBandwidthInMbps the provisionedBandwidthInMbps value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withProvisionedBandwidthInMbps(Integer provisionedBandwidthInMbps) { + this.provisionedBandwidthInMbps = provisionedBandwidthInMbps; + return this; + } + + /** + * Get the field indicating if Microsoft provides session ip addresses. Possible values include: 'Microsoft', 'Peer'. + * + * @return the sessionAddressProvider value + */ + public SessionAddressProvider sessionAddressProvider() { + return this.sessionAddressProvider; + } + + /** + * Set the field indicating if Microsoft provides session ip addresses. Possible values include: 'Microsoft', 'Peer'. + * + * @param sessionAddressProvider the sessionAddressProvider value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withSessionAddressProvider(SessionAddressProvider sessionAddressProvider) { + this.sessionAddressProvider = sessionAddressProvider; + return this; + } + + /** + * Get the flag that indicates whether or not the connection is used for peering service. + * + * @return the useForPeeringService value + */ + public Boolean useForPeeringService() { + return this.useForPeeringService; + } + + /** + * Set the flag that indicates whether or not the connection is used for peering service. + * + * @param useForPeeringService the useForPeeringService value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withUseForPeeringService(Boolean useForPeeringService) { + this.useForPeeringService = useForPeeringService; + return this; + } + + /** + * Get the PeeringDB.com ID of the facility at which the connection has to be set up. + * + * @return the peeringDBFacilityId value + */ + public Integer peeringDBFacilityId() { + return this.peeringDBFacilityId; + } + + /** + * Set the PeeringDB.com ID of the facility at which the connection has to be set up. + * + * @param peeringDBFacilityId the peeringDBFacilityId value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withPeeringDBFacilityId(Integer peeringDBFacilityId) { + this.peeringDBFacilityId = peeringDBFacilityId; + return this; + } + + /** + * Get the state of the connection. Possible values include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'. + * + * @return the connectionState value + */ + public ConnectionState connectionState() { + return this.connectionState; + } + + /** + * Get the BGP session associated with the connection. + * + * @return the bgpSession value + */ + public BgpSession bgpSession() { + return this.bgpSession; + } + + /** + * Set the BGP session associated with the connection. + * + * @param bgpSession the bgpSession value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withBgpSession(BgpSession bgpSession) { + this.bgpSession = bgpSession; + return this; + } + + /** + * Get the unique identifier (GUID) for the connection. + * + * @return the connectionIdentifier value + */ + public String connectionIdentifier() { + return this.connectionIdentifier; + } + + /** + * Set the unique identifier (GUID) for the connection. + * + * @param connectionIdentifier the connectionIdentifier value to set + * @return the DirectConnection object itself. + */ + public DirectConnection withConnectionIdentifier(String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringFacility.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringFacility.java new file mode 100644 index 000000000000..4e299b365144 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringFacility.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a direct peering facility. + */ +public class DirectPeeringFacility { + /** + * The address of the direct peering facility. + */ + @JsonProperty(value = "address") + private String address; + + /** + * The type of the direct peering. Possible values include: 'Edge', + * 'Transit', 'Cdn', 'Internal'. + */ + @JsonProperty(value = "directPeeringType") + private DirectPeeringType directPeeringType; + + /** + * The PeeringDB.com ID of the facility. + */ + @JsonProperty(value = "peeringDBFacilityId") + private Integer peeringDBFacilityId; + + /** + * The PeeringDB.com URL of the facility. + */ + @JsonProperty(value = "peeringDBFacilityLink") + private String peeringDBFacilityLink; + + /** + * Get the address of the direct peering facility. + * + * @return the address value + */ + public String address() { + return this.address; + } + + /** + * Set the address of the direct peering facility. + * + * @param address the address value to set + * @return the DirectPeeringFacility object itself. + */ + public DirectPeeringFacility withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the type of the direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'. + * + * @return the directPeeringType value + */ + public DirectPeeringType directPeeringType() { + return this.directPeeringType; + } + + /** + * Set the type of the direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'. + * + * @param directPeeringType the directPeeringType value to set + * @return the DirectPeeringFacility object itself. + */ + public DirectPeeringFacility withDirectPeeringType(DirectPeeringType directPeeringType) { + this.directPeeringType = directPeeringType; + return this; + } + + /** + * Get the PeeringDB.com ID of the facility. + * + * @return the peeringDBFacilityId value + */ + public Integer peeringDBFacilityId() { + return this.peeringDBFacilityId; + } + + /** + * Set the PeeringDB.com ID of the facility. + * + * @param peeringDBFacilityId the peeringDBFacilityId value to set + * @return the DirectPeeringFacility object itself. + */ + public DirectPeeringFacility withPeeringDBFacilityId(Integer peeringDBFacilityId) { + this.peeringDBFacilityId = peeringDBFacilityId; + return this; + } + + /** + * Get the PeeringDB.com URL of the facility. + * + * @return the peeringDBFacilityLink value + */ + public String peeringDBFacilityLink() { + return this.peeringDBFacilityLink; + } + + /** + * Set the PeeringDB.com URL of the facility. + * + * @param peeringDBFacilityLink the peeringDBFacilityLink value to set + * @return the DirectPeeringFacility object itself. + */ + public DirectPeeringFacility withPeeringDBFacilityLink(String peeringDBFacilityLink) { + this.peeringDBFacilityLink = peeringDBFacilityLink; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringType.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringType.java new file mode 100644 index 000000000000..23f6189fbfde --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/DirectPeeringType.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DirectPeeringType. + */ +public final class DirectPeeringType extends ExpandableStringEnum { + /** Static value Edge for DirectPeeringType. */ + public static final DirectPeeringType EDGE = fromString("Edge"); + + /** Static value Transit for DirectPeeringType. */ + public static final DirectPeeringType TRANSIT = fromString("Transit"); + + /** Static value Cdn for DirectPeeringType. */ + public static final DirectPeeringType CDN = fromString("Cdn"); + + /** Static value Internal for DirectPeeringType. */ + public static final DirectPeeringType INTERNAL = fromString("Internal"); + + /** + * Creates or finds a DirectPeeringType from its string representation. + * @param name a name to look for + * @return the corresponding DirectPeeringType + */ + @JsonCreator + public static DirectPeeringType fromString(String name) { + return fromString(name, DirectPeeringType.class); + } + + /** + * @return known DirectPeeringType values + */ + public static Collection values() { + return values(DirectPeeringType.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponse.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponse.java new file mode 100644 index 000000000000..663eb475e68c --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error response that indicates why an operation has failed. + */ +public class ErrorResponse { + /** + * The error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * The error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponseException.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponseException.java new file mode 100644 index 000000000000..bb5107f9a476 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangeConnection.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangeConnection.java new file mode 100644 index 000000000000..f1e084ae458f --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangeConnection.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define an exchange connection. + */ +public class ExchangeConnection { + /** + * The PeeringDB.com ID of the facility at which the connection has to be + * set up. + */ + @JsonProperty(value = "peeringDBFacilityId") + private Integer peeringDBFacilityId; + + /** + * The state of the connection. Possible values include: 'None', + * 'PendingApproval', 'Approved', 'ProvisioningStarted', + * 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'. + */ + @JsonProperty(value = "connectionState", access = JsonProperty.Access.WRITE_ONLY) + private ConnectionState connectionState; + + /** + * The BGP session associated with the connection. + */ + @JsonProperty(value = "bgpSession") + private BgpSession bgpSession; + + /** + * The unique identifier (GUID) for the connection. + */ + @JsonProperty(value = "connectionIdentifier") + private String connectionIdentifier; + + /** + * Get the PeeringDB.com ID of the facility at which the connection has to be set up. + * + * @return the peeringDBFacilityId value + */ + public Integer peeringDBFacilityId() { + return this.peeringDBFacilityId; + } + + /** + * Set the PeeringDB.com ID of the facility at which the connection has to be set up. + * + * @param peeringDBFacilityId the peeringDBFacilityId value to set + * @return the ExchangeConnection object itself. + */ + public ExchangeConnection withPeeringDBFacilityId(Integer peeringDBFacilityId) { + this.peeringDBFacilityId = peeringDBFacilityId; + return this; + } + + /** + * Get the state of the connection. Possible values include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'. + * + * @return the connectionState value + */ + public ConnectionState connectionState() { + return this.connectionState; + } + + /** + * Get the BGP session associated with the connection. + * + * @return the bgpSession value + */ + public BgpSession bgpSession() { + return this.bgpSession; + } + + /** + * Set the BGP session associated with the connection. + * + * @param bgpSession the bgpSession value to set + * @return the ExchangeConnection object itself. + */ + public ExchangeConnection withBgpSession(BgpSession bgpSession) { + this.bgpSession = bgpSession; + return this; + } + + /** + * Get the unique identifier (GUID) for the connection. + * + * @return the connectionIdentifier value + */ + public String connectionIdentifier() { + return this.connectionIdentifier; + } + + /** + * Set the unique identifier (GUID) for the connection. + * + * @param connectionIdentifier the connectionIdentifier value to set + * @return the ExchangeConnection object itself. + */ + public ExchangeConnection withConnectionIdentifier(String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangePeeringFacility.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangePeeringFacility.java new file mode 100644 index 000000000000..d69272c3d004 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ExchangePeeringFacility.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define an exchange peering facility. + */ +public class ExchangePeeringFacility { + /** + * The name of the exchange peering facility. + */ + @JsonProperty(value = "exchangeName") + private String exchangeName; + + /** + * The bandwidth of the connection between Microsoft and the exchange + * peering facility. + */ + @JsonProperty(value = "bandwidthInMbps") + private Integer bandwidthInMbps; + + /** + * The IPv4 address of Microsoft at the exchange peering facility. + */ + @JsonProperty(value = "microsoftIPv4Address") + private String microsoftIPv4Address; + + /** + * The IPv6 address of Microsoft at the exchange peering facility. + */ + @JsonProperty(value = "microsoftIPv6Address") + private String microsoftIPv6Address; + + /** + * The IPv4 prefixes associated with the exchange peering facility. + */ + @JsonProperty(value = "facilityIPv4Prefix") + private String facilityIPv4Prefix; + + /** + * The IPv6 prefixes associated with the exchange peering facility. + */ + @JsonProperty(value = "facilityIPv6Prefix") + private String facilityIPv6Prefix; + + /** + * The PeeringDB.com ID of the facility. + */ + @JsonProperty(value = "peeringDBFacilityId") + private Integer peeringDBFacilityId; + + /** + * The PeeringDB.com URL of the facility. + */ + @JsonProperty(value = "peeringDBFacilityLink") + private String peeringDBFacilityLink; + + /** + * Get the name of the exchange peering facility. + * + * @return the exchangeName value + */ + public String exchangeName() { + return this.exchangeName; + } + + /** + * Set the name of the exchange peering facility. + * + * @param exchangeName the exchangeName value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withExchangeName(String exchangeName) { + this.exchangeName = exchangeName; + return this; + } + + /** + * Get the bandwidth of the connection between Microsoft and the exchange peering facility. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the bandwidth of the connection between Microsoft and the exchange peering facility. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + + /** + * Get the IPv4 address of Microsoft at the exchange peering facility. + * + * @return the microsoftIPv4Address value + */ + public String microsoftIPv4Address() { + return this.microsoftIPv4Address; + } + + /** + * Set the IPv4 address of Microsoft at the exchange peering facility. + * + * @param microsoftIPv4Address the microsoftIPv4Address value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withMicrosoftIPv4Address(String microsoftIPv4Address) { + this.microsoftIPv4Address = microsoftIPv4Address; + return this; + } + + /** + * Get the IPv6 address of Microsoft at the exchange peering facility. + * + * @return the microsoftIPv6Address value + */ + public String microsoftIPv6Address() { + return this.microsoftIPv6Address; + } + + /** + * Set the IPv6 address of Microsoft at the exchange peering facility. + * + * @param microsoftIPv6Address the microsoftIPv6Address value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withMicrosoftIPv6Address(String microsoftIPv6Address) { + this.microsoftIPv6Address = microsoftIPv6Address; + return this; + } + + /** + * Get the IPv4 prefixes associated with the exchange peering facility. + * + * @return the facilityIPv4Prefix value + */ + public String facilityIPv4Prefix() { + return this.facilityIPv4Prefix; + } + + /** + * Set the IPv4 prefixes associated with the exchange peering facility. + * + * @param facilityIPv4Prefix the facilityIPv4Prefix value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withFacilityIPv4Prefix(String facilityIPv4Prefix) { + this.facilityIPv4Prefix = facilityIPv4Prefix; + return this; + } + + /** + * Get the IPv6 prefixes associated with the exchange peering facility. + * + * @return the facilityIPv6Prefix value + */ + public String facilityIPv6Prefix() { + return this.facilityIPv6Prefix; + } + + /** + * Set the IPv6 prefixes associated with the exchange peering facility. + * + * @param facilityIPv6Prefix the facilityIPv6Prefix value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withFacilityIPv6Prefix(String facilityIPv6Prefix) { + this.facilityIPv6Prefix = facilityIPv6Prefix; + return this; + } + + /** + * Get the PeeringDB.com ID of the facility. + * + * @return the peeringDBFacilityId value + */ + public Integer peeringDBFacilityId() { + return this.peeringDBFacilityId; + } + + /** + * Set the PeeringDB.com ID of the facility. + * + * @param peeringDBFacilityId the peeringDBFacilityId value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withPeeringDBFacilityId(Integer peeringDBFacilityId) { + this.peeringDBFacilityId = peeringDBFacilityId; + return this; + } + + /** + * Get the PeeringDB.com URL of the facility. + * + * @return the peeringDBFacilityLink value + */ + public String peeringDBFacilityLink() { + return this.peeringDBFacilityLink; + } + + /** + * Set the PeeringDB.com URL of the facility. + * + * @param peeringDBFacilityLink the peeringDBFacilityLink value to set + * @return the ExchangePeeringFacility object itself. + */ + public ExchangePeeringFacility withPeeringDBFacilityLink(String peeringDBFacilityLink) { + this.peeringDBFacilityLink = peeringDBFacilityLink; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Family.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Family.java new file mode 100644 index 000000000000..624396fd9147 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Family.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Family. + */ +public final class Family extends ExpandableStringEnum { + /** Static value Direct for Family. */ + public static final Family DIRECT = fromString("Direct"); + + /** Static value Exchange for Family. */ + public static final Family EXCHANGE = fromString("Exchange"); + + /** + * Creates or finds a Family from its string representation. + * @param name a name to look for + * @return the corresponding Family + */ + @JsonCreator + public static Family fromString(String name) { + return fromString(name, Family.class); + } + + /** + * @return known Family values + */ + public static Collection values() { + return values(Family.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Kind.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Kind.java new file mode 100644 index 000000000000..b406015900fc --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Kind.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Kind. + */ +public final class Kind extends ExpandableStringEnum { + /** Static value Direct for Kind. */ + public static final Kind DIRECT = fromString("Direct"); + + /** Static value Exchange for Kind. */ + public static final Kind EXCHANGE = fromString("Exchange"); + + /** + * Creates or finds a Kind from its string representation. + * @param name a name to look for + * @return the corresponding Kind + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** + * @return known Kind values + */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LearnedType.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LearnedType.java new file mode 100644 index 000000000000..7fabfe8d02df --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LearnedType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LearnedType. + */ +public final class LearnedType extends ExpandableStringEnum { + /** Static value None for LearnedType. */ + public static final LearnedType NONE = fromString("None"); + + /** Static value ViaPartner for LearnedType. */ + public static final LearnedType VIA_PARTNER = fromString("ViaPartner"); + + /** Static value ViaSession for LearnedType. */ + public static final LearnedType VIA_SESSION = fromString("ViaSession"); + + /** + * Creates or finds a LearnedType from its string representation. + * @param name a name to look for + * @return the corresponding LearnedType + */ + @JsonCreator + public static LearnedType fromString(String name) { + return fromString(name, LearnedType.class); + } + + /** + * @return known LearnedType values + */ + public static Collection values() { + return values(LearnedType.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LegacyPeerings.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LegacyPeerings.java new file mode 100644 index 000000000000..184784ec6753 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/LegacyPeerings.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.LegacyPeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing LegacyPeerings. + */ +public interface LegacyPeerings extends HasInner { + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String peeringLocation, final String kind); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Name.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Name.java new file mode 100644 index 000000000000..134038c430f4 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Name.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Name. + */ +public final class Name extends ExpandableStringEnum { + /** Static value Basic_Exchange_Free for Name. */ + public static final Name BASIC_EXCHANGE_FREE = fromString("Basic_Exchange_Free"); + + /** Static value Basic_Direct_Free for Name. */ + public static final Name BASIC_DIRECT_FREE = fromString("Basic_Direct_Free"); + + /** Static value Premium_Direct_Free for Name. */ + public static final Name PREMIUM_DIRECT_FREE = fromString("Premium_Direct_Free"); + + /** Static value Premium_Exchange_Metered for Name. */ + public static final Name PREMIUM_EXCHANGE_METERED = fromString("Premium_Exchange_Metered"); + + /** Static value Premium_Direct_Metered for Name. */ + public static final Name PREMIUM_DIRECT_METERED = fromString("Premium_Direct_Metered"); + + /** Static value Premium_Direct_Unlimited for Name. */ + public static final Name PREMIUM_DIRECT_UNLIMITED = fromString("Premium_Direct_Unlimited"); + + /** + * Creates or finds a Name from its string representation. + * @param name a name to look for + * @return the corresponding Name + */ + @JsonCreator + public static Name fromString(String name) { + return fromString(name, Name.class); + } + + /** + * @return known Name values + */ + public static Collection values() { + return values(Name.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operation.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operation.java new file mode 100644 index 000000000000..f89037874e55 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operation.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplayInfo display(); + + /** + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/OperationDisplayInfo.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/OperationDisplayInfo.java new file mode 100644 index 000000000000..88378512eb25 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/OperationDisplayInfo.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information related to the operation. + */ +public class OperationDisplayInfo { + /** + * The name of the resource provider. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * The type of the resource. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * The name of the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * The description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the name of the resource provider. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get the type of the resource. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the name of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operations.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operations.java new file mode 100644 index 000000000000..b574f1192c35 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists all of the available API operations for peering resources. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsn.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsn.java new file mode 100644 index 000000000000..c4cbf69e5c54 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsn.java @@ -0,0 +1,191 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeerAsnInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; + +/** + * Type representing PeerAsn. + */ +public interface PeerAsn extends HasInner, Indexable, Updatable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peerAsn value. + */ + Integer peerAsn(); + + /** + * @return the peerContactInfo value. + */ + ContactInfo peerContactInfo(); + + /** + * @return the peerName value. + */ + String peerName(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the validationState value. + */ + ValidationState validationState(); + + /** + * The entirety of the PeerAsn definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { + } + + /** + * Grouping of PeerAsn definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PeerAsn definition. + */ + interface Blank extends WithCreate { + } + + /** + * The stage of the peerasn definition allowing to specify PeerAsn. + */ + interface WithPeerAsn { + /** + * Specifies peerAsn. + * @param peerAsn The Autonomous System Number (ASN) of the peer + * @return the next definition stage + */ + WithCreate withPeerAsn(Integer peerAsn); + } + + /** + * The stage of the peerasn definition allowing to specify PeerContactInfo. + */ + interface WithPeerContactInfo { + /** + * Specifies peerContactInfo. + * @param peerContactInfo The contact information of the peer + * @return the next definition stage + */ + WithCreate withPeerContactInfo(ContactInfo peerContactInfo); + } + + /** + * The stage of the peerasn definition allowing to specify PeerName. + */ + interface WithPeerName { + /** + * Specifies peerName. + * @param peerName The name of the peer + * @return the next definition stage + */ + WithCreate withPeerName(String peerName); + } + + /** + * The stage of the peerasn definition allowing to specify ValidationState. + */ + interface WithValidationState { + /** + * Specifies validationState. + * @param validationState The validation state of the ASN associated with the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed' + * @return the next definition stage + */ + WithCreate withValidationState(ValidationState validationState); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithPeerAsn, DefinitionStages.WithPeerContactInfo, DefinitionStages.WithPeerName, DefinitionStages.WithValidationState { + } + } + /** + * The template for a PeerAsn update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPeerAsn, UpdateStages.WithPeerContactInfo, UpdateStages.WithPeerName, UpdateStages.WithValidationState { + } + + /** + * Grouping of PeerAsn update stages. + */ + interface UpdateStages { + /** + * The stage of the peerasn update allowing to specify PeerAsn. + */ + interface WithPeerAsn { + /** + * Specifies peerAsn. + * @param peerAsn The Autonomous System Number (ASN) of the peer + * @return the next update stage + */ + Update withPeerAsn(Integer peerAsn); + } + + /** + * The stage of the peerasn update allowing to specify PeerContactInfo. + */ + interface WithPeerContactInfo { + /** + * Specifies peerContactInfo. + * @param peerContactInfo The contact information of the peer + * @return the next update stage + */ + Update withPeerContactInfo(ContactInfo peerContactInfo); + } + + /** + * The stage of the peerasn update allowing to specify PeerName. + */ + interface WithPeerName { + /** + * Specifies peerName. + * @param peerName The name of the peer + * @return the next update stage + */ + Update withPeerName(String peerName); + } + + /** + * The stage of the peerasn update allowing to specify ValidationState. + */ + interface WithValidationState { + /** + * Specifies validationState. + * @param validationState The validation state of the ASN associated with the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed' + * @return the next update stage + */ + Update withValidationState(ValidationState validationState); + } + + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsns.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsns.java new file mode 100644 index 000000000000..0997d587052e --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeerAsns.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeerAsnsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeerAsns. + */ +public interface PeerAsns extends SupportsCreating, SupportsListing, HasInner { + /** + * Gets the peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String peerAsnName); + + /** + * Deletes an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String peerAsnName); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peering.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peering.java new file mode 100644 index 000000000000..af0985f7561e --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peering.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringInner; + +/** + * Type representing Peering. + */ +public interface Peering extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the direct value. + */ + PeeringPropertiesDirect direct(); + + /** + * @return the exchange value. + */ + PeeringPropertiesExchange exchange(); + + /** + * @return the kind value. + */ + Kind kind(); + + /** + * @return the peeringLocation value. + */ + String peeringLocation(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the sku value. + */ + PeeringSku sku(); + + /** + * The entirety of the Peering definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithCreate { + } + + /** + * Grouping of Peering definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Peering definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Peering definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the peering definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @return the next definition stage +*/ + WithSku withKind(Kind kind); + } + + /** + * The stage of the peering definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU that defines the tier and kind of the peering + * @return the next definition stage +*/ + WithCreate withSku(PeeringSku sku); + } + + /** + * The stage of the peering definition allowing to specify Direct. + */ + interface WithDirect { + /** + * Specifies direct. + * @param direct The properties that define a direct peering + * @return the next definition stage + */ + WithCreate withDirect(PeeringPropertiesDirect direct); + } + + /** + * The stage of the peering definition allowing to specify Exchange. + */ + interface WithExchange { + /** + * Specifies exchange. + * @param exchange The properties that define an exchange peering + * @return the next definition stage + */ + WithCreate withExchange(PeeringPropertiesExchange exchange); + } + + /** + * The stage of the peering definition allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The location of the peering + * @return the next definition stage + */ + WithCreate withPeeringLocation(String peeringLocation); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithDirect, DefinitionStages.WithExchange, DefinitionStages.WithPeeringLocation { + } + } + /** + * The template for a Peering update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDirect, UpdateStages.WithExchange, UpdateStages.WithPeeringLocation { + } + + /** + * Grouping of Peering update stages. + */ + interface UpdateStages { + /** + * The stage of the peering update allowing to specify Direct. + */ + interface WithDirect { + /** + * Specifies direct. + * @param direct The properties that define a direct peering + * @return the next update stage + */ + Update withDirect(PeeringPropertiesDirect direct); + } + + /** + * The stage of the peering update allowing to specify Exchange. + */ + interface WithExchange { + /** + * Specifies exchange. + * @param exchange The properties that define an exchange peering + * @return the next update stage + */ + Update withExchange(PeeringPropertiesExchange exchange); + } + + /** + * The stage of the peering update allowing to specify PeeringLocation. + */ + interface WithPeeringLocation { + /** + * Specifies peeringLocation. + * @param peeringLocation The location of the peering + * @return the next update stage + */ + Update withPeeringLocation(String peeringLocation); + } + + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringBandwidthOffer.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringBandwidthOffer.java new file mode 100644 index 000000000000..1c259d756713 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringBandwidthOffer.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a peering bandwidth offer. + */ +public class PeeringBandwidthOffer { + /** + * The name of the bandwidth offer. + */ + @JsonProperty(value = "offerName") + private String offerName; + + /** + * The value of the bandwidth offer in Mbps. + */ + @JsonProperty(value = "valueInMbps") + private Integer valueInMbps; + + /** + * Get the name of the bandwidth offer. + * + * @return the offerName value + */ + public String offerName() { + return this.offerName; + } + + /** + * Set the name of the bandwidth offer. + * + * @param offerName the offerName value to set + * @return the PeeringBandwidthOffer object itself. + */ + public PeeringBandwidthOffer withOfferName(String offerName) { + this.offerName = offerName; + return this; + } + + /** + * Get the value of the bandwidth offer in Mbps. + * + * @return the valueInMbps value + */ + public Integer valueInMbps() { + return this.valueInMbps; + } + + /** + * Set the value of the bandwidth offer in Mbps. + * + * @param valueInMbps the valueInMbps value to set + * @return the PeeringBandwidthOffer object itself. + */ + public PeeringBandwidthOffer withValueInMbps(Integer valueInMbps) { + this.valueInMbps = valueInMbps; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocation.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocation.java new file mode 100644 index 000000000000..b83b4e47c81b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocation.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringLocationInner; + +/** + * Type representing PeeringLocation. + */ +public interface PeeringLocation extends HasInner, HasManager { + /** + * @return the azureRegion value. + */ + String azureRegion(); + + /** + * @return the country value. + */ + String country(); + + /** + * @return the direct value. + */ + PeeringLocationPropertiesDirect direct(); + + /** + * @return the exchange value. + */ + PeeringLocationPropertiesExchange exchange(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + Kind kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the peeringLocation value. + */ + String peeringLocation(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesDirect.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesDirect.java new file mode 100644 index 000000000000..dd5e44943a9b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesDirect.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a direct peering location. + */ +public class PeeringLocationPropertiesDirect { + /** + * The list of direct peering facilities at the peering location. + */ + @JsonProperty(value = "peeringFacilities") + private List peeringFacilities; + + /** + * The list of bandwidth offers available at the peering location. + */ + @JsonProperty(value = "bandwidthOffers") + private List bandwidthOffers; + + /** + * Get the list of direct peering facilities at the peering location. + * + * @return the peeringFacilities value + */ + public List peeringFacilities() { + return this.peeringFacilities; + } + + /** + * Set the list of direct peering facilities at the peering location. + * + * @param peeringFacilities the peeringFacilities value to set + * @return the PeeringLocationPropertiesDirect object itself. + */ + public PeeringLocationPropertiesDirect withPeeringFacilities(List peeringFacilities) { + this.peeringFacilities = peeringFacilities; + return this; + } + + /** + * Get the list of bandwidth offers available at the peering location. + * + * @return the bandwidthOffers value + */ + public List bandwidthOffers() { + return this.bandwidthOffers; + } + + /** + * Set the list of bandwidth offers available at the peering location. + * + * @param bandwidthOffers the bandwidthOffers value to set + * @return the PeeringLocationPropertiesDirect object itself. + */ + public PeeringLocationPropertiesDirect withBandwidthOffers(List bandwidthOffers) { + this.bandwidthOffers = bandwidthOffers; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesExchange.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesExchange.java new file mode 100644 index 000000000000..e0d0746cc261 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocationPropertiesExchange.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define an exchange peering location. + */ +public class PeeringLocationPropertiesExchange { + /** + * The list of exchange peering facilities at the peering location. + */ + @JsonProperty(value = "peeringFacilities") + private List peeringFacilities; + + /** + * Get the list of exchange peering facilities at the peering location. + * + * @return the peeringFacilities value + */ + public List peeringFacilities() { + return this.peeringFacilities; + } + + /** + * Set the list of exchange peering facilities at the peering location. + * + * @param peeringFacilities the peeringFacilities value to set + * @return the PeeringLocationPropertiesExchange object itself. + */ + public PeeringLocationPropertiesExchange withPeeringFacilities(List peeringFacilities) { + this.peeringFacilities = peeringFacilities; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocations.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocations.java new file mode 100644 index 000000000000..b93c411cfe23 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringLocations.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringLocationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeeringLocations. + */ +public interface PeeringLocations extends HasInner { + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String kind); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesDirect.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesDirect.java new file mode 100644 index 000000000000..a1dbe92ecec5 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesDirect.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a direct peering. + */ +public class PeeringPropertiesDirect { + /** + * The set of connections that constitute a direct peering. + */ + @JsonProperty(value = "connections") + private List connections; + + /** + * The flag that indicates whether or not the peering is used for peering + * service. + */ + @JsonProperty(value = "useForPeeringService") + private Boolean useForPeeringService; + + /** + * The reference of the peer ASN. + */ + @JsonProperty(value = "peerAsn") + private SubResource peerAsn; + + /** + * The type of direct peering. Possible values include: 'Edge', 'Transit', + * 'Cdn', 'Internal'. + */ + @JsonProperty(value = "directPeeringType") + private DirectPeeringType directPeeringType; + + /** + * Get the set of connections that constitute a direct peering. + * + * @return the connections value + */ + public List connections() { + return this.connections; + } + + /** + * Set the set of connections that constitute a direct peering. + * + * @param connections the connections value to set + * @return the PeeringPropertiesDirect object itself. + */ + public PeeringPropertiesDirect withConnections(List connections) { + this.connections = connections; + return this; + } + + /** + * Get the flag that indicates whether or not the peering is used for peering service. + * + * @return the useForPeeringService value + */ + public Boolean useForPeeringService() { + return this.useForPeeringService; + } + + /** + * Set the flag that indicates whether or not the peering is used for peering service. + * + * @param useForPeeringService the useForPeeringService value to set + * @return the PeeringPropertiesDirect object itself. + */ + public PeeringPropertiesDirect withUseForPeeringService(Boolean useForPeeringService) { + this.useForPeeringService = useForPeeringService; + return this; + } + + /** + * Get the reference of the peer ASN. + * + * @return the peerAsn value + */ + public SubResource peerAsn() { + return this.peerAsn; + } + + /** + * Set the reference of the peer ASN. + * + * @param peerAsn the peerAsn value to set + * @return the PeeringPropertiesDirect object itself. + */ + public PeeringPropertiesDirect withPeerAsn(SubResource peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get the type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'. + * + * @return the directPeeringType value + */ + public DirectPeeringType directPeeringType() { + return this.directPeeringType; + } + + /** + * Set the type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'. + * + * @param directPeeringType the directPeeringType value to set + * @return the PeeringPropertiesDirect object itself. + */ + public PeeringPropertiesDirect withDirectPeeringType(DirectPeeringType directPeeringType) { + this.directPeeringType = directPeeringType; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesExchange.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesExchange.java new file mode 100644 index 000000000000..fb144496a483 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringPropertiesExchange.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define an exchange peering. + */ +public class PeeringPropertiesExchange { + /** + * The set of connections that constitute an exchange peering. + */ + @JsonProperty(value = "connections") + private List connections; + + /** + * The reference of the peer ASN. + */ + @JsonProperty(value = "peerAsn") + private SubResource peerAsn; + + /** + * Get the set of connections that constitute an exchange peering. + * + * @return the connections value + */ + public List connections() { + return this.connections; + } + + /** + * Set the set of connections that constitute an exchange peering. + * + * @param connections the connections value to set + * @return the PeeringPropertiesExchange object itself. + */ + public PeeringPropertiesExchange withConnections(List connections) { + this.connections = connections; + return this; + } + + /** + * Get the reference of the peer ASN. + * + * @return the peerAsn value + */ + public SubResource peerAsn() { + return this.peerAsn; + } + + /** + * Set the reference of the peer ASN. + * + * @param peerAsn the peerAsn value to set + * @return the PeeringPropertiesExchange object itself. + */ + public PeeringPropertiesExchange withPeerAsn(SubResource peerAsn) { + this.peerAsn = peerAsn; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringService.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringService.java new file mode 100644 index 000000000000..18507334a769 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringService.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServiceInner; + +/** + * Type representing PeeringService. + */ +public interface PeeringService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the peeringServiceLocation value. + */ + String peeringServiceLocation(); + + /** + * @return the peeringServiceProvider value. + */ + String peeringServiceProvider(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the PeeringService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of PeeringService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PeeringService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the PeeringService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the peeringservice definition allowing to specify PeeringServiceLocation. + */ + interface WithPeeringServiceLocation { + /** + * Specifies peeringServiceLocation. + * @param peeringServiceLocation The PeeringServiceLocation of the Customer + * @return the next definition stage + */ + WithCreate withPeeringServiceLocation(String peeringServiceLocation); + } + + /** + * The stage of the peeringservice definition allowing to specify PeeringServiceProvider. + */ + interface WithPeeringServiceProvider { + /** + * Specifies peeringServiceProvider. + * @param peeringServiceProvider The MAPS Provider Name + * @return the next definition stage + */ + WithCreate withPeeringServiceProvider(String peeringServiceProvider); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithPeeringServiceLocation, DefinitionStages.WithPeeringServiceProvider { + } + } + /** + * The template for a PeeringService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithPeeringServiceLocation, UpdateStages.WithPeeringServiceProvider { + } + + /** + * Grouping of PeeringService update stages. + */ + interface UpdateStages { + /** + * The stage of the peeringservice update allowing to specify PeeringServiceLocation. + */ + interface WithPeeringServiceLocation { + /** + * Specifies peeringServiceLocation. + * @param peeringServiceLocation The PeeringServiceLocation of the Customer + * @return the next update stage + */ + Update withPeeringServiceLocation(String peeringServiceLocation); + } + + /** + * The stage of the peeringservice update allowing to specify PeeringServiceProvider. + */ + interface WithPeeringServiceProvider { + /** + * Specifies peeringServiceProvider. + * @param peeringServiceProvider The MAPS Provider Name + * @return the next update stage + */ + Update withPeeringServiceProvider(String peeringServiceProvider); + } + + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocation.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocation.java new file mode 100644 index 000000000000..0795857c6d5c --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocation.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServiceLocationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; + +/** + * Type representing PeeringServiceLocation. + */ +public interface PeeringServiceLocation extends HasInner, HasManager { + /** + * @return the azureRegion value. + */ + String azureRegion(); + + /** + * @return the country value. + */ + String country(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocations.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocations.java new file mode 100644 index 000000000000..7cc78969c289 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceLocations.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServiceLocationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeeringServiceLocations. + */ +public interface PeeringServiceLocations extends SupportsListing, HasInner { +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefix.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefix.java new file mode 100644 index 000000000000..534554104f38 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefix.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServicePrefixInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; + +/** + * Type representing PeeringServicePeeringServicePrefix. + */ +public interface PeeringServicePeeringServicePrefix extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the learnedType value. + */ + LearnedType learnedType(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the prefix value. + */ + String prefix(); + + /** + * @return the prefixValidationState value. + */ + PrefixValidationState prefixValidationState(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PeeringServicePeeringServicePrefix definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithPeeringService, DefinitionStages.WithCreate { + } + + /** + * Grouping of PeeringServicePeeringServicePrefix definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PeeringServicePeeringServicePrefix definition. + */ + interface Blank extends WithPeeringService { + } + + /** + * The stage of the peeringservicepeeringserviceprefix definition allowing to specify PeeringService. + */ + interface WithPeeringService { + /** + * Specifies resourceGroupName, peeringServiceName. + * @param resourceGroupName The resource group name + * @param peeringServiceName The peering service name + * @return the next definition stage + */ + WithCreate withExistingPeeringService(String resourceGroupName, String peeringServiceName); + } + + /** + * The stage of the peeringservicepeeringserviceprefix definition allowing to specify LearnedType. + */ + interface WithLearnedType { + /** + * Specifies learnedType. + * @param learnedType The prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession' + * @return the next definition stage + */ + WithCreate withLearnedType(LearnedType learnedType); + } + + /** + * The stage of the peeringservicepeeringserviceprefix definition allowing to specify Prefix. + */ + interface WithPrefix { + /** + * Specifies prefix. + * @param prefix Valid route prefix + * @return the next definition stage + */ + WithCreate withPrefix(String prefix); + } + + /** + * The stage of the peeringservicepeeringserviceprefix definition allowing to specify PrefixValidationState. + */ + interface WithPrefixValidationState { + /** + * Specifies prefixValidationState. + * @param prefixValidationState The prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown' + * @return the next definition stage + */ + WithCreate withPrefixValidationState(PrefixValidationState prefixValidationState); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithLearnedType, DefinitionStages.WithPrefix, DefinitionStages.WithPrefixValidationState { + } + } + /** + * The template for a PeeringServicePeeringServicePrefix update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithLearnedType, UpdateStages.WithPrefix, UpdateStages.WithPrefixValidationState { + } + + /** + * Grouping of PeeringServicePeeringServicePrefix update stages. + */ + interface UpdateStages { + /** + * The stage of the peeringservicepeeringserviceprefix update allowing to specify LearnedType. + */ + interface WithLearnedType { + /** + * Specifies learnedType. + * @param learnedType The prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession' + * @return the next update stage + */ + Update withLearnedType(LearnedType learnedType); + } + + /** + * The stage of the peeringservicepeeringserviceprefix update allowing to specify Prefix. + */ + interface WithPrefix { + /** + * Specifies prefix. + * @param prefix Valid route prefix + * @return the next update stage + */ + Update withPrefix(String prefix); + } + + /** + * The stage of the peeringservicepeeringserviceprefix update allowing to specify PrefixValidationState. + */ + interface WithPrefixValidationState { + /** + * Specifies prefixValidationState. + * @param prefixValidationState The prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown' + * @return the next update stage + */ + Update withPrefixValidationState(PrefixValidationState prefixValidationState); + } + + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefixModel.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefixModel.java new file mode 100644 index 000000000000..020a258cdb88 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePeeringServicePrefixModel.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServicePrefixInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; + +/** + * Type representing PeeringServicePeeringServicePrefixModel. + */ +public interface PeeringServicePeeringServicePrefixModel extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the learnedType value. + */ + LearnedType learnedType(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the prefix value. + */ + String prefix(); + + /** + * @return the prefixValidationState value. + */ + PrefixValidationState prefixValidationState(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePrefixes.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePrefixes.java new file mode 100644 index 000000000000..67f754cae5d9 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServicePrefixes.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServicePrefixesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeeringServicePrefixes. + */ +public interface PeeringServicePrefixes extends SupportsCreating, HasInner { + /** + * Gets the peering service prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String peeringServiceName, String prefixName); + + /** + * removes the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String peeringServiceName, String prefixName); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProvider.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProvider.java new file mode 100644 index 000000000000..1d003cdfacd0 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProvider.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServiceProviderInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringManager; + +/** + * Type representing PeeringServiceProvider. + */ +public interface PeeringServiceProvider extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the serviceProviderName value. + */ + String serviceProviderName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProviders.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProviders.java new file mode 100644 index 000000000000..71220398af55 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServiceProviders.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServiceProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeeringServiceProviders. + */ +public interface PeeringServiceProviders extends SupportsListing, HasInner { +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServices.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServices.java new file mode 100644 index 000000000000..e0feaa91327b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringServices.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PeeringServices. + */ +public interface PeeringServices extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringSku.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringSku.java new file mode 100644 index 000000000000..f8e1843494a2 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PeeringSku.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SKU that defines the tier and kind of the peering. + */ +public class PeeringSku { + /** + * The name of the peering SKU. Possible values include: + * 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', + * 'Premium_Exchange_Metered', 'Premium_Direct_Metered', + * 'Premium_Direct_Unlimited'. + */ + @JsonProperty(value = "name") + private Name name; + + /** + * The tier of the peering SKU. Possible values include: 'Basic', + * 'Premium'. + */ + @JsonProperty(value = "tier") + private Tier tier; + + /** + * The family of the peering SKU. Possible values include: 'Direct', + * 'Exchange'. + */ + @JsonProperty(value = "family") + private Family family; + + /** + * The size of the peering SKU. Possible values include: 'Free', 'Metered', + * 'Unlimited'. + */ + @JsonProperty(value = "size") + private Size size; + + /** + * Get the name of the peering SKU. Possible values include: 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', 'Premium_Exchange_Metered', 'Premium_Direct_Metered', 'Premium_Direct_Unlimited'. + * + * @return the name value + */ + public Name name() { + return this.name; + } + + /** + * Set the name of the peering SKU. Possible values include: 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', 'Premium_Exchange_Metered', 'Premium_Direct_Metered', 'Premium_Direct_Unlimited'. + * + * @param name the name value to set + * @return the PeeringSku object itself. + */ + public PeeringSku withName(Name name) { + this.name = name; + return this; + } + + /** + * Get the tier of the peering SKU. Possible values include: 'Basic', 'Premium'. + * + * @return the tier value + */ + public Tier tier() { + return this.tier; + } + + /** + * Set the tier of the peering SKU. Possible values include: 'Basic', 'Premium'. + * + * @param tier the tier value to set + * @return the PeeringSku object itself. + */ + public PeeringSku withTier(Tier tier) { + this.tier = tier; + return this; + } + + /** + * Get the family of the peering SKU. Possible values include: 'Direct', 'Exchange'. + * + * @return the family value + */ + public Family family() { + return this.family; + } + + /** + * Set the family of the peering SKU. Possible values include: 'Direct', 'Exchange'. + * + * @param family the family value to set + * @return the PeeringSku object itself. + */ + public PeeringSku withFamily(Family family) { + this.family = family; + return this; + } + + /** + * Get the size of the peering SKU. Possible values include: 'Free', 'Metered', 'Unlimited'. + * + * @return the size value + */ + public Size size() { + return this.size; + } + + /** + * Set the size of the peering SKU. Possible values include: 'Free', 'Metered', 'Unlimited'. + * + * @param size the size value to set + * @return the PeeringSku object itself. + */ + public PeeringSku withSize(Size size) { + this.size = size; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peerings.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peerings.java new file mode 100644 index 000000000000..ae1db8d36294 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Peerings.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PeeringsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Peerings. + */ +public interface Peerings extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PrefixValidationState.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PrefixValidationState.java new file mode 100644 index 000000000000..604696aaf66b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/PrefixValidationState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrefixValidationState. + */ +public final class PrefixValidationState extends ExpandableStringEnum { + /** Static value None for PrefixValidationState. */ + public static final PrefixValidationState NONE = fromString("None"); + + /** Static value Invalid for PrefixValidationState. */ + public static final PrefixValidationState INVALID = fromString("Invalid"); + + /** Static value Verified for PrefixValidationState. */ + public static final PrefixValidationState VERIFIED = fromString("Verified"); + + /** Static value Failed for PrefixValidationState. */ + public static final PrefixValidationState FAILED = fromString("Failed"); + + /** Static value Pending for PrefixValidationState. */ + public static final PrefixValidationState PENDING = fromString("Pending"); + + /** Static value Unknown for PrefixValidationState. */ + public static final PrefixValidationState UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a PrefixValidationState from its string representation. + * @param name a name to look for + * @return the corresponding PrefixValidationState + */ + @JsonCreator + public static PrefixValidationState fromString(String name) { + return fromString(name, PrefixValidationState.class); + } + + /** + * @return known PrefixValidationState values + */ + public static Collection values() { + return values(PrefixValidationState.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Prefixes.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Prefixes.java new file mode 100644 index 000000000000..2d4cf0039c02 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Prefixes.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.implementation.PrefixesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Prefixes. + */ +public interface Prefixes extends HasInner { + /** + * Lists the peerings prefix in the resource group. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByPeeringServiceAsync(final String resourceGroupName, final String peeringServiceName); + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ProvisioningState.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ProvisioningState.java new file mode 100644 index 000000000000..0d5c92107d73 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ProvisioningState.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ResourceTags.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ResourceTags.java new file mode 100644 index 000000000000..81791f284e92 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ResourceTags.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource tags. + */ +public class ResourceTags { + /** + * Gets or sets the tags, a dictionary of descriptors arm object. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get gets or sets the tags, a dictionary of descriptors arm object. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets the tags, a dictionary of descriptors arm object. + * + * @param tags the tags value to set + * @return the ResourceTags object itself. + */ + public ResourceTags withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionAddressProvider.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionAddressProvider.java new file mode 100644 index 000000000000..2bd78d1b18c6 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionAddressProvider.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SessionAddressProvider. + */ +public final class SessionAddressProvider extends ExpandableStringEnum { + /** Static value Microsoft for SessionAddressProvider. */ + public static final SessionAddressProvider MICROSOFT = fromString("Microsoft"); + + /** Static value Peer for SessionAddressProvider. */ + public static final SessionAddressProvider PEER = fromString("Peer"); + + /** + * Creates or finds a SessionAddressProvider from its string representation. + * @param name a name to look for + * @return the corresponding SessionAddressProvider + */ + @JsonCreator + public static SessionAddressProvider fromString(String name) { + return fromString(name, SessionAddressProvider.class); + } + + /** + * @return known SessionAddressProvider values + */ + public static Collection values() { + return values(SessionAddressProvider.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV4.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV4.java new file mode 100644 index 000000000000..5e5595e4a9c6 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV4.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SessionStateV4. + */ +public final class SessionStateV4 extends ExpandableStringEnum { + /** Static value None for SessionStateV4. */ + public static final SessionStateV4 NONE = fromString("None"); + + /** Static value Idle for SessionStateV4. */ + public static final SessionStateV4 IDLE = fromString("Idle"); + + /** Static value Connect for SessionStateV4. */ + public static final SessionStateV4 CONNECT = fromString("Connect"); + + /** Static value Active for SessionStateV4. */ + public static final SessionStateV4 ACTIVE = fromString("Active"); + + /** Static value OpenSent for SessionStateV4. */ + public static final SessionStateV4 OPEN_SENT = fromString("OpenSent"); + + /** Static value OpenConfirm for SessionStateV4. */ + public static final SessionStateV4 OPEN_CONFIRM = fromString("OpenConfirm"); + + /** Static value OpenReceived for SessionStateV4. */ + public static final SessionStateV4 OPEN_RECEIVED = fromString("OpenReceived"); + + /** Static value Established for SessionStateV4. */ + public static final SessionStateV4 ESTABLISHED = fromString("Established"); + + /** Static value PendingAdd for SessionStateV4. */ + public static final SessionStateV4 PENDING_ADD = fromString("PendingAdd"); + + /** Static value PendingUpdate for SessionStateV4. */ + public static final SessionStateV4 PENDING_UPDATE = fromString("PendingUpdate"); + + /** Static value PendingRemove for SessionStateV4. */ + public static final SessionStateV4 PENDING_REMOVE = fromString("PendingRemove"); + + /** + * Creates or finds a SessionStateV4 from its string representation. + * @param name a name to look for + * @return the corresponding SessionStateV4 + */ + @JsonCreator + public static SessionStateV4 fromString(String name) { + return fromString(name, SessionStateV4.class); + } + + /** + * @return known SessionStateV4 values + */ + public static Collection values() { + return values(SessionStateV4.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV6.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV6.java new file mode 100644 index 000000000000..8015796a4ebb --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/SessionStateV6.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SessionStateV6. + */ +public final class SessionStateV6 extends ExpandableStringEnum { + /** Static value None for SessionStateV6. */ + public static final SessionStateV6 NONE = fromString("None"); + + /** Static value Idle for SessionStateV6. */ + public static final SessionStateV6 IDLE = fromString("Idle"); + + /** Static value Connect for SessionStateV6. */ + public static final SessionStateV6 CONNECT = fromString("Connect"); + + /** Static value Active for SessionStateV6. */ + public static final SessionStateV6 ACTIVE = fromString("Active"); + + /** Static value OpenSent for SessionStateV6. */ + public static final SessionStateV6 OPEN_SENT = fromString("OpenSent"); + + /** Static value OpenConfirm for SessionStateV6. */ + public static final SessionStateV6 OPEN_CONFIRM = fromString("OpenConfirm"); + + /** Static value OpenReceived for SessionStateV6. */ + public static final SessionStateV6 OPEN_RECEIVED = fromString("OpenReceived"); + + /** Static value Established for SessionStateV6. */ + public static final SessionStateV6 ESTABLISHED = fromString("Established"); + + /** Static value PendingAdd for SessionStateV6. */ + public static final SessionStateV6 PENDING_ADD = fromString("PendingAdd"); + + /** Static value PendingUpdate for SessionStateV6. */ + public static final SessionStateV6 PENDING_UPDATE = fromString("PendingUpdate"); + + /** Static value PendingRemove for SessionStateV6. */ + public static final SessionStateV6 PENDING_REMOVE = fromString("PendingRemove"); + + /** + * Creates or finds a SessionStateV6 from its string representation. + * @param name a name to look for + * @return the corresponding SessionStateV6 + */ + @JsonCreator + public static SessionStateV6 fromString(String name) { + return fromString(name, SessionStateV6.class); + } + + /** + * @return known SessionStateV6 values + */ + public static Collection values() { + return values(SessionStateV6.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Size.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Size.java new file mode 100644 index 000000000000..29c7733cdd9d --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Size.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Size. + */ +public final class Size extends ExpandableStringEnum { + /** Static value Free for Size. */ + public static final Size FREE = fromString("Free"); + + /** Static value Metered for Size. */ + public static final Size METERED = fromString("Metered"); + + /** Static value Unlimited for Size. */ + public static final Size UNLIMITED = fromString("Unlimited"); + + /** + * Creates or finds a Size from its string representation. + * @param name a name to look for + * @return the corresponding Size + */ + @JsonCreator + public static Size fromString(String name) { + return fromString(name, Size.class); + } + + /** + * @return known Size values + */ + public static Collection values() { + return values(Size.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Tier.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Tier.java new file mode 100644 index 000000000000..850964430224 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/Tier.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Tier. + */ +public final class Tier extends ExpandableStringEnum { + /** Static value Basic for Tier. */ + public static final Tier BASIC = fromString("Basic"); + + /** Static value Premium for Tier. */ + public static final Tier PREMIUM = fromString("Premium"); + + /** + * Creates or finds a Tier from its string representation. + * @param name a name to look for + * @return the corresponding Tier + */ + @JsonCreator + public static Tier fromString(String name) { + return fromString(name, Tier.class); + } + + /** + * @return known Tier values + */ + public static Collection values() { + return values(Tier.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ValidationState.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ValidationState.java new file mode 100644 index 000000000000..2fdee103cc3e --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/ValidationState.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValidationState. + */ +public final class ValidationState extends ExpandableStringEnum { + /** Static value None for ValidationState. */ + public static final ValidationState NONE = fromString("None"); + + /** Static value Pending for ValidationState. */ + public static final ValidationState PENDING = fromString("Pending"); + + /** Static value Approved for ValidationState. */ + public static final ValidationState APPROVED = fromString("Approved"); + + /** Static value Failed for ValidationState. */ + public static final ValidationState FAILED = fromString("Failed"); + + /** + * Creates or finds a ValidationState from its string representation. + * @param name a name to look for + * @return the corresponding ValidationState + */ + @JsonCreator + public static ValidationState fromString(String name) { + return fromString(name, ValidationState.class); + } + + /** + * @return known ValidationState values + */ + public static Collection values() { + return values(ValidationState.class); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/IdParsingUtils.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..d052d7e3b5bf --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsImpl.java new file mode 100644 index 000000000000..d35993af3c45 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.LegacyPeerings; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Peering; + +class LegacyPeeringsImpl extends WrapperImpl implements LegacyPeerings { + private final PeeringManager manager; + + LegacyPeeringsImpl(PeeringManager manager) { + super(manager.inner().legacyPeerings()); + this.manager = manager; + } + + public PeeringManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(final String peeringLocation, final String kind) { + LegacyPeeringsInner client = this.inner(); + return client.listAsync(peeringLocation, kind) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Peering call(PeeringInner inner) { + return new PeeringImpl(inner.name(), inner, manager()); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsInner.java new file mode 100644 index 000000000000..13efe86556c0 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/LegacyPeeringsInner.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LegacyPeerings. + */ +public class LegacyPeeringsInner { + /** The Retrofit service to perform REST calls. */ + private LegacyPeeringsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of LegacyPeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LegacyPeeringsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(LegacyPeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for LegacyPeerings to be + * used by Retrofit to perform actually REST calls. + */ + interface LegacyPeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.LegacyPeerings list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("peeringLocation") String peeringLocation, @Query("kind") String kind, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.LegacyPeerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList list(final String peeringLocation, final String kind) { + ServiceResponse> response = listSinglePageAsync(peeringLocation, kind).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String peeringLocation, final String kind, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(peeringLocation, kind), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listAsync(final String peeringLocation, final String kind) { + return listWithServiceResponseAsync(peeringLocation, kind) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listWithServiceResponseAsync(final String peeringLocation, final String kind) { + return listSinglePageAsync(peeringLocation, kind) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + ServiceResponse> * @param peeringLocation The location of the peering. + ServiceResponse> * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String peeringLocation, final String kind) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peeringLocation == null) { + throw new IllegalArgumentException("Parameter peeringLocation is required and cannot be null."); + } + if (kind == null) { + throw new IllegalArgumentException("Parameter kind is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), peeringLocation, kind, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationImpl.java new file mode 100644 index 000000000000..80ba57fa5c86 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.OperationDisplayInfo; + +class OperationImpl extends WrapperImpl implements Operation { + private final PeeringManager manager; + OperationImpl(OperationInner inner, PeeringManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + @Override + public OperationDisplayInfo display() { + return this.inner().display(); + } + + @Override + public Boolean isDataAction() { + return this.inner().isDataAction(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationInner.java new file mode 100644 index 000000000000..2b828ea16121 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationInner.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.OperationDisplayInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The peering API operation. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The information related to the operation. + */ + @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) + private OperationDisplayInfo display; + + /** + * The flag that indicates whether the operation applies to data plane. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the information related to the operation. + * + * @return the display value + */ + public OperationDisplayInfo display() { + return this.display; + } + + /** + * Get the flag that indicates whether the operation applies to data plane. + * + * @return the isDataAction value + */ + public Boolean isDataAction() { + return this.isDataAction; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..7d43659d8104 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final PeeringManager manager; + + OperationsImpl(PeeringManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public PeeringManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..2286bd84d30e --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Operations list" }) + @GET("providers/Microsoft.Peering/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available API operations for peering resources. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available API operations for peering resources. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available API operations for peering resources. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available API operations for peering resources. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available API operations for peering resources. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PageImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..e4f3d3f68a16 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnImpl.java new file mode 100644 index 000000000000..46109aa1d2f2 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsn; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ContactInfo; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ValidationState; + +class PeerAsnImpl extends CreatableUpdatableImpl implements PeerAsn, PeerAsn.Definition, PeerAsn.Update { + private String peerAsnName; + private final PeeringManager manager; + + PeerAsnImpl(String name, PeeringManager manager) { + super(name, new PeerAsnInner()); + this.manager = manager; + // Set resource name + this.peerAsnName = name; + // + } + + PeerAsnImpl(PeerAsnInner inner, PeeringManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peerAsnName = inner.name(); + // set resource ancestor and positional variables + this.peerAsnName = IdParsingUtils.getValueFromIdByName(inner.id(), "peerAsns"); + // set other parameters for create and update + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PeerAsnsInner client = this.manager().inner().peerAsns(); + return client.createOrUpdateAsync(this.peerAsnName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PeerAsnsInner client = this.manager().inner().peerAsns(); + return client.createOrUpdateAsync(this.peerAsnName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PeerAsnsInner client = this.manager().inner().peerAsns(); + return client.getAsync(this.peerAsnName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer peerAsn() { + return this.inner().peerAsn(); + } + + @Override + public ContactInfo peerContactInfo() { + return this.inner().peerContactInfo(); + } + + @Override + public String peerName() { + return this.inner().peerName(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ValidationState validationState() { + return this.inner().validationState(); + } + + @Override + public PeerAsnImpl withPeerAsn(Integer peerAsn) { + this.inner().withPeerAsn(peerAsn); + return this; + } + + @Override + public PeerAsnImpl withPeerContactInfo(ContactInfo peerContactInfo) { + this.inner().withPeerContactInfo(peerContactInfo); + return this; + } + + @Override + public PeerAsnImpl withPeerName(String peerName) { + this.inner().withPeerName(peerName); + return this; + } + + @Override + public PeerAsnImpl withValidationState(ValidationState validationState) { + this.inner().withValidationState(validationState); + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnInner.java new file mode 100644 index 000000000000..9063711c0236 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnInner.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.ContactInfo; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ValidationState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The essential information related to the peer's ASN. + */ +@JsonFlatten +public class PeerAsnInner extends ProxyResource { + /** + * The Autonomous System Number (ASN) of the peer. + */ + @JsonProperty(value = "properties.peerAsn") + private Integer peerAsn; + + /** + * The contact information of the peer. + */ + @JsonProperty(value = "properties.peerContactInfo") + private ContactInfo peerContactInfo; + + /** + * The name of the peer. + */ + @JsonProperty(value = "properties.peerName") + private String peerName; + + /** + * The validation state of the ASN associated with the peer. Possible + * values include: 'None', 'Pending', 'Approved', 'Failed'. + */ + @JsonProperty(value = "properties.validationState") + private ValidationState validationState; + + /** + * Get the Autonomous System Number (ASN) of the peer. + * + * @return the peerAsn value + */ + public Integer peerAsn() { + return this.peerAsn; + } + + /** + * Set the Autonomous System Number (ASN) of the peer. + * + * @param peerAsn the peerAsn value to set + * @return the PeerAsnInner object itself. + */ + public PeerAsnInner withPeerAsn(Integer peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get the contact information of the peer. + * + * @return the peerContactInfo value + */ + public ContactInfo peerContactInfo() { + return this.peerContactInfo; + } + + /** + * Set the contact information of the peer. + * + * @param peerContactInfo the peerContactInfo value to set + * @return the PeerAsnInner object itself. + */ + public PeerAsnInner withPeerContactInfo(ContactInfo peerContactInfo) { + this.peerContactInfo = peerContactInfo; + return this; + } + + /** + * Get the name of the peer. + * + * @return the peerName value + */ + public String peerName() { + return this.peerName; + } + + /** + * Set the name of the peer. + * + * @param peerName the peerName value to set + * @return the PeerAsnInner object itself. + */ + public PeerAsnInner withPeerName(String peerName) { + this.peerName = peerName; + return this; + } + + /** + * Get the validation state of the ASN associated with the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed'. + * + * @return the validationState value + */ + public ValidationState validationState() { + return this.validationState; + } + + /** + * Set the validation state of the ASN associated with the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed'. + * + * @param validationState the validationState value to set + * @return the PeerAsnInner object itself. + */ + public PeerAsnInner withValidationState(ValidationState validationState) { + this.validationState = validationState; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsImpl.java new file mode 100644 index 000000000000..af30ddb03d86 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsImpl.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsn; +import com.microsoft.azure.arm.utils.PagedListConverter; + +class PeerAsnsImpl extends WrapperImpl implements PeerAsns { + private PagedListConverter converter; + private final PeeringManager manager; + + PeerAsnsImpl(PeeringManager manager) { + super(manager.inner().peerAsns()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(PeerAsnInner inner) { + return Observable.just((PeerAsn) wrapModel(inner)); + } + }; + } + + public PeeringManager manager() { + return this.manager; + } + + @Override + public PeerAsnImpl define(String name) { + return wrapModel(name); + } + + private PeerAsnImpl wrapModel(PeerAsnInner inner) { + return new PeerAsnImpl(inner, manager()); + } + + private PeerAsnImpl wrapModel(String name) { + return new PeerAsnImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String peerAsnName) { + PeerAsnsInner client = this.inner(); + return client.getAsync(peerAsnName) + .map(new Func1() { + @Override + public PeerAsn call(PeerAsnInner inner) { + return new PeerAsnImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String peerAsnName) { + PeerAsnsInner client = this.inner(); + return client.deleteAsync(peerAsnName).toCompletable(); + } + + @Override + public PagedList list() { + PeerAsnsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + PeerAsnsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeerAsn call(PeerAsnInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsInner.java new file mode 100644 index 000000000000..54a77fad73d8 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeerAsnsInner.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeerAsns. + */ +public class PeerAsnsInner { + /** The Retrofit service to perform REST calls. */ + private PeerAsnsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeerAsnsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeerAsnsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeerAsnsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeerAsns to be + * used by Retrofit to perform actually REST calls. + */ + interface PeerAsnsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns get" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}") + Observable> get(@Path("peerAsnName") String peerAsnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}") + Observable> createOrUpdate(@Path("peerAsnName") String peerAsnName, @Path("subscriptionId") String subscriptionId, @Body PeerAsnInner peerAsn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("peerAsnName") String peerAsnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeerAsnInner object if successful. + */ + public PeerAsnInner get(String peerAsnName) { + return getWithServiceResponseAsync(peerAsnName).toBlocking().single().body(); + } + + /** + * Gets the peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String peerAsnName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(peerAsnName), serviceCallback); + } + + /** + * Gets the peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerAsnInner object + */ + public Observable getAsync(String peerAsnName) { + return getWithServiceResponseAsync(peerAsnName).map(new Func1, PeerAsnInner>() { + @Override + public PeerAsnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerAsnInner object + */ + public Observable> getWithServiceResponseAsync(String peerAsnName) { + if (peerAsnName == null) { + throw new IllegalArgumentException("Parameter peerAsnName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(peerAsnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param peerAsn The peer ASN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeerAsnInner object if successful. + */ + public PeerAsnInner createOrUpdate(String peerAsnName, PeerAsnInner peerAsn) { + return createOrUpdateWithServiceResponseAsync(peerAsnName, peerAsn).toBlocking().single().body(); + } + + /** + * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param peerAsn The peer ASN. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String peerAsnName, PeerAsnInner peerAsn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(peerAsnName, peerAsn), serviceCallback); + } + + /** + * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param peerAsn The peer ASN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerAsnInner object + */ + public Observable createOrUpdateAsync(String peerAsnName, PeerAsnInner peerAsn) { + return createOrUpdateWithServiceResponseAsync(peerAsnName, peerAsn).map(new Func1, PeerAsnInner>() { + @Override + public PeerAsnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param peerAsn The peer ASN. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeerAsnInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String peerAsnName, PeerAsnInner peerAsn) { + if (peerAsnName == null) { + throw new IllegalArgumentException("Parameter peerAsnName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peerAsn == null) { + throw new IllegalArgumentException("Parameter peerAsn is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(peerAsn); + return service.createOrUpdate(peerAsnName, this.client.subscriptionId(), peerAsn, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String peerAsnName) { + deleteWithServiceResponseAsync(peerAsnName).toBlocking().single().body(); + } + + /** + * Deletes an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String peerAsnName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(peerAsnName), serviceCallback); + } + + /** + * Deletes an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String peerAsnName) { + return deleteWithServiceResponseAsync(peerAsnName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing peer ASN with the specified name under the given subscription. + * + * @param peerAsnName The peer ASN name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String peerAsnName) { + if (peerAsnName == null) { + throw new IllegalArgumentException("Parameter peerAsnName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(peerAsnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeerAsnInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerAsnInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerAsnInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeerAsnInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeerAsnInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerAsnInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeerAsnInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peer ASNs under the given subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeerAsnInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringImpl.java new file mode 100644 index 000000000000..967d9badd877 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Peering; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringSku; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Kind; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringPropertiesDirect; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringPropertiesExchange; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; + +class PeeringImpl extends GroupableResourceCoreImpl implements Peering, Peering.Definition, Peering.Update { + PeeringImpl(String name, PeeringInner inner, PeeringManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PeeringsInner client = this.manager().inner().peerings(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PeeringsInner client = this.manager().inner().peerings(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PeeringsInner client = this.manager().inner().peerings(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public PeeringPropertiesDirect direct() { + return this.inner().direct(); + } + + @Override + public PeeringPropertiesExchange exchange() { + return this.inner().exchange(); + } + + @Override + public Kind kind() { + return this.inner().kind(); + } + + @Override + public String peeringLocation() { + return this.inner().peeringLocation(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PeeringSku sku() { + return this.inner().sku(); + } + + @Override + public PeeringImpl withKind(Kind kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public PeeringImpl withSku(PeeringSku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public PeeringImpl withDirect(PeeringPropertiesDirect direct) { + this.inner().withDirect(direct); + return this; + } + + @Override + public PeeringImpl withExchange(PeeringPropertiesExchange exchange) { + this.inner().withExchange(exchange); + return this; + } + + @Override + public PeeringImpl withPeeringLocation(String peeringLocation) { + this.inner().withPeeringLocation(peeringLocation); + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringInner.java new file mode 100644 index 000000000000..7fcbe85e6c0a --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringInner.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringSku; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Kind; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringPropertiesDirect; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringPropertiesExchange; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Peering is a logical representation of a set of connections to the Microsoft + * Cloud Edge at a location. + */ +@JsonFlatten +public class PeeringInner extends Resource { + /** + * The SKU that defines the tier and kind of the peering. + */ + @JsonProperty(value = "sku", required = true) + private PeeringSku sku; + + /** + * The kind of the peering. Possible values include: 'Direct', 'Exchange'. + */ + @JsonProperty(value = "kind", required = true) + private Kind kind; + + /** + * The properties that define a direct peering. + */ + @JsonProperty(value = "properties.direct") + private PeeringPropertiesDirect direct; + + /** + * The properties that define an exchange peering. + */ + @JsonProperty(value = "properties.exchange") + private PeeringPropertiesExchange exchange; + + /** + * The location of the peering. + */ + @JsonProperty(value = "properties.peeringLocation") + private String peeringLocation; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the SKU that defines the tier and kind of the peering. + * + * @return the sku value + */ + public PeeringSku sku() { + return this.sku; + } + + /** + * Set the SKU that defines the tier and kind of the peering. + * + * @param sku the sku value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withSku(PeeringSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the kind of the peering. Possible values include: 'Direct', 'Exchange'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set the kind of the peering. Possible values include: 'Direct', 'Exchange'. + * + * @param kind the kind value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties that define a direct peering. + * + * @return the direct value + */ + public PeeringPropertiesDirect direct() { + return this.direct; + } + + /** + * Set the properties that define a direct peering. + * + * @param direct the direct value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withDirect(PeeringPropertiesDirect direct) { + this.direct = direct; + return this; + } + + /** + * Get the properties that define an exchange peering. + * + * @return the exchange value + */ + public PeeringPropertiesExchange exchange() { + return this.exchange; + } + + /** + * Set the properties that define an exchange peering. + * + * @param exchange the exchange value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withExchange(PeeringPropertiesExchange exchange) { + this.exchange = exchange; + return this; + } + + /** + * Get the location of the peering. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the location of the peering. + * + * @param peeringLocation the peeringLocation value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the location of the resource. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the location of the resource. + * + * @param location the location value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the resource tags. + * + * @param tags the tags value to set + * @return the PeeringInner object itself. + */ + public PeeringInner withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationImpl.java new file mode 100644 index 000000000000..c12012159b51 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocationPropertiesDirect; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocationPropertiesExchange; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Kind; + +class PeeringLocationImpl extends WrapperImpl implements PeeringLocation { + private final PeeringManager manager; + PeeringLocationImpl(PeeringLocationInner inner, PeeringManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + @Override + public String azureRegion() { + return this.inner().azureRegion(); + } + + @Override + public String country() { + return this.inner().country(); + } + + @Override + public PeeringLocationPropertiesDirect direct() { + return this.inner().direct(); + } + + @Override + public PeeringLocationPropertiesExchange exchange() { + return this.inner().exchange(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Kind kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String peeringLocation() { + return this.inner().peeringLocation(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationInner.java new file mode 100644 index 000000000000..ffdd771c5580 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationInner.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.Kind; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocationPropertiesDirect; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocationPropertiesExchange; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Peering location is where connectivity could be established to the Microsoft + * Cloud Edge. + */ +@JsonFlatten +public class PeeringLocationInner extends ProxyResource { + /** + * The kind of peering that the peering location supports. Possible values + * include: 'Direct', 'Exchange'. + */ + @JsonProperty(value = "kind") + private Kind kind; + + /** + * The properties that define a direct peering location. + */ + @JsonProperty(value = "properties.direct") + private PeeringLocationPropertiesDirect direct; + + /** + * The properties that define an exchange peering location. + */ + @JsonProperty(value = "properties.exchange") + private PeeringLocationPropertiesExchange exchange; + + /** + * The name of the peering location. + */ + @JsonProperty(value = "properties.peeringLocation") + private String peeringLocation; + + /** + * The country in which the peering location exists. + */ + @JsonProperty(value = "properties.country") + private String country; + + /** + * The Azure region associated with the peering location. + */ + @JsonProperty(value = "properties.azureRegion") + private String azureRegion; + + /** + * Get the kind of peering that the peering location supports. Possible values include: 'Direct', 'Exchange'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set the kind of peering that the peering location supports. Possible values include: 'Direct', 'Exchange'. + * + * @param kind the kind value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties that define a direct peering location. + * + * @return the direct value + */ + public PeeringLocationPropertiesDirect direct() { + return this.direct; + } + + /** + * Set the properties that define a direct peering location. + * + * @param direct the direct value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withDirect(PeeringLocationPropertiesDirect direct) { + this.direct = direct; + return this; + } + + /** + * Get the properties that define an exchange peering location. + * + * @return the exchange value + */ + public PeeringLocationPropertiesExchange exchange() { + return this.exchange; + } + + /** + * Set the properties that define an exchange peering location. + * + * @param exchange the exchange value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withExchange(PeeringLocationPropertiesExchange exchange) { + this.exchange = exchange; + return this; + } + + /** + * Get the name of the peering location. + * + * @return the peeringLocation value + */ + public String peeringLocation() { + return this.peeringLocation; + } + + /** + * Set the name of the peering location. + * + * @param peeringLocation the peeringLocation value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the country in which the peering location exists. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country in which the peering location exists. + * + * @param country the country value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the Azure region associated with the peering location. + * + * @return the azureRegion value + */ + public String azureRegion() { + return this.azureRegion; + } + + /** + * Set the Azure region associated with the peering location. + * + * @param azureRegion the azureRegion value to set + * @return the PeeringLocationInner object itself. + */ + public PeeringLocationInner withAzureRegion(String azureRegion) { + this.azureRegion = azureRegion; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsImpl.java new file mode 100644 index 000000000000..89c538b0e326 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocation; + +class PeeringLocationsImpl extends WrapperImpl implements PeeringLocations { + private final PeeringManager manager; + + PeeringLocationsImpl(PeeringManager manager) { + super(manager.inner().peeringLocations()); + this.manager = manager; + } + + public PeeringManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(final String kind) { + PeeringLocationsInner client = this.inner(); + return client.listAsync(kind) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringLocation call(PeeringLocationInner inner) { + return new PeeringLocationImpl(inner, manager()); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsInner.java new file mode 100644 index 000000000000..c4f597700a52 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringLocationsInner.java @@ -0,0 +1,409 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeeringLocations. + */ +public class PeeringLocationsInner { + /** The Retrofit service to perform REST calls. */ + private PeeringLocationsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringLocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringLocationsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringLocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeeringLocations to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringLocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("kind") String kind, @Query("directPeeringType") String directPeeringType, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringLocationInner> object if successful. + */ + public PagedList list(final String kind) { + ServiceResponse> response = listSinglePageAsync(kind).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String kind, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(kind), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable> listAsync(final String kind) { + return listWithServiceResponseAsync(kind) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String kind) { + return listSinglePageAsync(kind) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringLocationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String kind) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (kind == null) { + throw new IllegalArgumentException("Parameter kind is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String directPeeringType = null; + return service.list(this.client.subscriptionId(), kind, directPeeringType, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param directPeeringType The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringLocationInner> object if successful. + */ + public PagedList list(final String kind, final String directPeeringType) { + ServiceResponse> response = listSinglePageAsync(kind, directPeeringType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param directPeeringType The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String kind, final String directPeeringType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(kind, directPeeringType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param directPeeringType The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable> listAsync(final String kind, final String directPeeringType) { + return listWithServiceResponseAsync(kind, directPeeringType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param directPeeringType The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String kind, final String directPeeringType) { + return listSinglePageAsync(kind, directPeeringType) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + ServiceResponse> * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + ServiceResponse> * @param directPeeringType The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringLocationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String kind, final String directPeeringType) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (kind == null) { + throw new IllegalArgumentException("Parameter kind is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), kind, directPeeringType, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringLocationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringLocationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringLocationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManagementClientImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManagementClientImpl.java new file mode 100644 index 000000000000..d988a7383c29 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManagementClientImpl.java @@ -0,0 +1,439 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.management.peering.v2019_08_01_preview.CheckServiceProviderAvailabilityInput; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * Initializes a new instance of the PeeringManagementClientImpl class. + */ +public class PeeringManagementClientImpl extends AzureServiceClient { + /** The Retrofit service to perform REST calls. */ + private PeeringManagementClientService service; + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** The Azure subscription ID. */ + private String subscriptionId; + + /** + * Gets The Azure subscription ID. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The Azure subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public PeeringManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The client API version. */ + private String apiVersion; + + /** + * Gets The client API version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public PeeringManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public PeeringManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public PeeringManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The LegacyPeeringsInner object to access its operations. + */ + private LegacyPeeringsInner legacyPeerings; + + /** + * Gets the LegacyPeeringsInner object to access its operations. + * @return the LegacyPeeringsInner object. + */ + public LegacyPeeringsInner legacyPeerings() { + return this.legacyPeerings; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The PeerAsnsInner object to access its operations. + */ + private PeerAsnsInner peerAsns; + + /** + * Gets the PeerAsnsInner object to access its operations. + * @return the PeerAsnsInner object. + */ + public PeerAsnsInner peerAsns() { + return this.peerAsns; + } + + /** + * The PeeringLocationsInner object to access its operations. + */ + private PeeringLocationsInner peeringLocations; + + /** + * Gets the PeeringLocationsInner object to access its operations. + * @return the PeeringLocationsInner object. + */ + public PeeringLocationsInner peeringLocations() { + return this.peeringLocations; + } + + /** + * The PeeringsInner object to access its operations. + */ + private PeeringsInner peerings; + + /** + * Gets the PeeringsInner object to access its operations. + * @return the PeeringsInner object. + */ + public PeeringsInner peerings() { + return this.peerings; + } + + /** + * The PeeringServiceLocationsInner object to access its operations. + */ + private PeeringServiceLocationsInner peeringServiceLocations; + + /** + * Gets the PeeringServiceLocationsInner object to access its operations. + * @return the PeeringServiceLocationsInner object. + */ + public PeeringServiceLocationsInner peeringServiceLocations() { + return this.peeringServiceLocations; + } + + /** + * The PeeringServicePrefixesInner object to access its operations. + */ + private PeeringServicePrefixesInner peeringServicePrefixes; + + /** + * Gets the PeeringServicePrefixesInner object to access its operations. + * @return the PeeringServicePrefixesInner object. + */ + public PeeringServicePrefixesInner peeringServicePrefixes() { + return this.peeringServicePrefixes; + } + + /** + * The PrefixesInner object to access its operations. + */ + private PrefixesInner prefixes; + + /** + * Gets the PrefixesInner object to access its operations. + * @return the PrefixesInner object. + */ + public PrefixesInner prefixes() { + return this.prefixes; + } + + /** + * The PeeringServiceProvidersInner object to access its operations. + */ + private PeeringServiceProvidersInner peeringServiceProviders; + + /** + * Gets the PeeringServiceProvidersInner object to access its operations. + * @return the PeeringServiceProvidersInner object. + */ + public PeeringServiceProvidersInner peeringServiceProviders() { + return this.peeringServiceProviders; + } + + /** + * The PeeringServicesInner object to access its operations. + */ + private PeeringServicesInner peeringServices; + + /** + * Gets the PeeringServicesInner object to access its operations. + * @return the PeeringServicesInner object. + */ + public PeeringServicesInner peeringServices() { + return this.peeringServices; + } + + /** + * Initializes an instance of PeeringManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public PeeringManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of PeeringManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public PeeringManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of PeeringManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public PeeringManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2019-08-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.legacyPeerings = new LegacyPeeringsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.peerAsns = new PeerAsnsInner(restClient().retrofit(), this); + this.peeringLocations = new PeeringLocationsInner(restClient().retrofit(), this); + this.peerings = new PeeringsInner(restClient().retrofit(), this); + this.peeringServiceLocations = new PeeringServiceLocationsInner(restClient().retrofit(), this); + this.peeringServicePrefixes = new PeeringServicePrefixesInner(restClient().retrofit(), this); + this.prefixes = new PrefixesInner(restClient().retrofit(), this); + this.peeringServiceProviders = new PeeringServiceProvidersInner(restClient().retrofit(), this); + this.peeringServices = new PeeringServicesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + initializeService(); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "PeeringManagementClient", "2019-08-01-preview"); + } + + private void initializeService() { + service = restClient().retrofit().create(PeeringManagementClientService.class); + } + + /** + * The interface defining all the services for PeeringManagementClient to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringManagementClientService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringManagementClient checkServiceProviderAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Peering/CheckServiceProviderAvailability") + Observable> checkServiceProviderAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks if the peering service provider is present within 1000 miles of customer's location. + * + * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer location and service provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String checkServiceProviderAvailability(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput) { + return checkServiceProviderAvailabilityWithServiceResponseAsync(checkServiceProviderAvailabilityInput).toBlocking().single().body(); + } + + /** + * Checks if the peering service provider is present within 1000 miles of customer's location. + * + * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer location and service provider. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkServiceProviderAvailabilityAsync(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkServiceProviderAvailabilityWithServiceResponseAsync(checkServiceProviderAvailabilityInput), serviceCallback); + } + + /** + * Checks if the peering service provider is present within 1000 miles of customer's location. + * + * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer location and service provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable checkServiceProviderAvailabilityAsync(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput) { + return checkServiceProviderAvailabilityWithServiceResponseAsync(checkServiceProviderAvailabilityInput).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks if the peering service provider is present within 1000 miles of customer's location. + * + * @param checkServiceProviderAvailabilityInput The CheckServiceProviderAvailabilityInput indicating customer location and service provider. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> checkServiceProviderAvailabilityWithServiceResponseAsync(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (checkServiceProviderAvailabilityInput == null) { + throw new IllegalArgumentException("Parameter checkServiceProviderAvailabilityInput is required and cannot be null."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(checkServiceProviderAvailabilityInput); + return service.checkServiceProviderAvailability(this.subscriptionId(), checkServiceProviderAvailabilityInput, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkServiceProviderAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkServiceProviderAvailabilityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManager.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManager.java new file mode 100644 index 000000000000..bf18b801fcd2 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringManager.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.peering.v2019_08_01_preview.LegacyPeerings; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Operations; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeerAsns; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringLocations; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocations; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePrefixes; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Prefixes; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProviders; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Peering resource management. + */ +public final class PeeringManager extends ManagerCore { + private LegacyPeerings legacyPeerings; + private Operations operations; + private PeerAsns peerAsns; + private PeeringLocations peeringLocations; + private Peerings peerings; + private PeeringServiceLocations peeringServiceLocations; + private PeeringServicePrefixes peeringServicePrefixes; + private Prefixes prefixes; + private PeeringServiceProviders peeringServiceProviders; + private PeeringServices peeringServices; + /** + * Get a Configurable instance that can be used to create PeeringManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new PeeringManager.ConfigurableImpl(); + } + /** + * Creates an instance of PeeringManager that exposes Peering resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the PeeringManager + */ + public static PeeringManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new PeeringManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of PeeringManager that exposes Peering resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the PeeringManager + */ + public static PeeringManager authenticate(RestClient restClient, String subscriptionId) { + return new PeeringManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of PeeringManager that exposes Peering management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Peering management API entry points that work across subscriptions + */ + PeeringManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage LegacyPeerings. + */ + public LegacyPeerings legacyPeerings() { + if (this.legacyPeerings == null) { + this.legacyPeerings = new LegacyPeeringsImpl(this); + } + return this.legacyPeerings; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage PeerAsns. + */ + public PeerAsns peerAsns() { + if (this.peerAsns == null) { + this.peerAsns = new PeerAsnsImpl(this); + } + return this.peerAsns; + } + + /** + * @return Entry point to manage PeeringLocations. + */ + public PeeringLocations peeringLocations() { + if (this.peeringLocations == null) { + this.peeringLocations = new PeeringLocationsImpl(this); + } + return this.peeringLocations; + } + + /** + * @return Entry point to manage Peerings. + */ + public Peerings peerings() { + if (this.peerings == null) { + this.peerings = new PeeringsImpl(this); + } + return this.peerings; + } + + /** + * @return Entry point to manage PeeringServiceLocations. + */ + public PeeringServiceLocations peeringServiceLocations() { + if (this.peeringServiceLocations == null) { + this.peeringServiceLocations = new PeeringServiceLocationsImpl(this); + } + return this.peeringServiceLocations; + } + + /** + * @return Entry point to manage PeeringServicePrefixes. + */ + public PeeringServicePrefixes peeringServicePrefixes() { + if (this.peeringServicePrefixes == null) { + this.peeringServicePrefixes = new PeeringServicePrefixesImpl(this); + } + return this.peeringServicePrefixes; + } + + /** + * @return Entry point to manage Prefixes. + */ + public Prefixes prefixes() { + if (this.prefixes == null) { + this.prefixes = new PrefixesImpl(this); + } + return this.prefixes; + } + + /** + * @return Entry point to manage PeeringServiceProviders. + */ + public PeeringServiceProviders peeringServiceProviders() { + if (this.peeringServiceProviders == null) { + this.peeringServiceProviders = new PeeringServiceProvidersImpl(this); + } + return this.peeringServiceProviders; + } + + /** + * @return Entry point to manage PeeringServices. + */ + public PeeringServices peeringServices() { + if (this.peeringServices == null) { + this.peeringServices = new PeeringServicesImpl(this); + } + return this.peeringServices; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public PeeringManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return PeeringManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private PeeringManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new PeeringManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceImpl.java new file mode 100644 index 000000000000..8c5755b640e0 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringService; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; + +class PeeringServiceImpl extends GroupableResourceCoreImpl implements PeeringService, PeeringService.Definition, PeeringService.Update { + PeeringServiceImpl(String name, PeeringServiceInner inner, PeeringManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + PeeringServicesInner client = this.manager().inner().peeringServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PeeringServicesInner client = this.manager().inner().peeringServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PeeringServicesInner client = this.manager().inner().peeringServices(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String peeringServiceLocation() { + return this.inner().peeringServiceLocation(); + } + + @Override + public String peeringServiceProvider() { + return this.inner().peeringServiceProvider(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public PeeringServiceImpl withPeeringServiceLocation(String peeringServiceLocation) { + this.inner().withPeeringServiceLocation(peeringServiceLocation); + return this; + } + + @Override + public PeeringServiceImpl withPeeringServiceProvider(String peeringServiceProvider) { + this.inner().withPeeringServiceProvider(peeringServiceProvider); + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceInner.java new file mode 100644 index 000000000000..7fe2a977e2ca --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceInner.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Peering Service. + */ +@JsonFlatten +public class PeeringServiceInner extends Resource { + /** + * The PeeringServiceLocation of the Customer. + */ + @JsonProperty(value = "properties.peeringServiceLocation") + private String peeringServiceLocation; + + /** + * The MAPS Provider Name. + */ + @JsonProperty(value = "properties.peeringServiceProvider") + private String peeringServiceProvider; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get the PeeringServiceLocation of the Customer. + * + * @return the peeringServiceLocation value + */ + public String peeringServiceLocation() { + return this.peeringServiceLocation; + } + + /** + * Set the PeeringServiceLocation of the Customer. + * + * @param peeringServiceLocation the peeringServiceLocation value to set + * @return the PeeringServiceInner object itself. + */ + public PeeringServiceInner withPeeringServiceLocation(String peeringServiceLocation) { + this.peeringServiceLocation = peeringServiceLocation; + return this; + } + + /** + * Get the MAPS Provider Name. + * + * @return the peeringServiceProvider value + */ + public String peeringServiceProvider() { + return this.peeringServiceProvider; + } + + /** + * Set the MAPS Provider Name. + * + * @param peeringServiceProvider the peeringServiceProvider value to set + * @return the PeeringServiceInner object itself. + */ + public PeeringServiceInner withPeeringServiceProvider(String peeringServiceProvider) { + this.peeringServiceProvider = peeringServiceProvider; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the location of the resource. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the location of the resource. + * + * @param location the location value to set + * @return the PeeringServiceInner object itself. + */ + public PeeringServiceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the resource tags. + * + * @param tags the tags value to set + * @return the PeeringServiceInner object itself. + */ + public PeeringServiceInner withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationImpl.java new file mode 100644 index 000000000000..6633fbfe3877 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationImpl.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class PeeringServiceLocationImpl extends WrapperImpl implements PeeringServiceLocation { + private final PeeringManager manager; + + PeeringServiceLocationImpl(PeeringServiceLocationInner inner, PeeringManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + + + @Override + public String azureRegion() { + return this.inner().azureRegion(); + } + + @Override + public String country() { + return this.inner().country(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationInner.java new file mode 100644 index 000000000000..7eba55c6d482 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationInner.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * PeeringService location. + */ +@JsonFlatten +public class PeeringServiceLocationInner extends ProxyResource { + /** + * Country of the customer. + */ + @JsonProperty(value = "properties.country") + private String country; + + /** + * State of the customer. + */ + @JsonProperty(value = "properties.state") + private String state; + + /** + * Azure region for the location. + */ + @JsonProperty(value = "properties.azureRegion") + private String azureRegion; + + /** + * Get country of the customer. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set country of the customer. + * + * @param country the country value to set + * @return the PeeringServiceLocationInner object itself. + */ + public PeeringServiceLocationInner withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get state of the customer. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set state of the customer. + * + * @param state the state value to set + * @return the PeeringServiceLocationInner object itself. + */ + public PeeringServiceLocationInner withState(String state) { + this.state = state; + return this; + } + + /** + * Get azure region for the location. + * + * @return the azureRegion value + */ + public String azureRegion() { + return this.azureRegion; + } + + /** + * Set azure region for the location. + * + * @param azureRegion the azureRegion value to set + * @return the PeeringServiceLocationInner object itself. + */ + public PeeringServiceLocationInner withAzureRegion(String azureRegion) { + this.azureRegion = azureRegion; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsImpl.java new file mode 100644 index 000000000000..4f93af046bd4 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocation; + +class PeeringServiceLocationsImpl extends WrapperImpl implements PeeringServiceLocations { + private PagedListConverter converter; + private final PeeringManager manager; + + PeeringServiceLocationsImpl(PeeringManager manager) { + super(manager.inner().peeringServiceLocations()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(PeeringServiceLocationInner inner) { + return Observable.just((PeeringServiceLocation) wrapModel(inner)); + } + }; + } + + public PeeringManager manager() { + return this.manager; + } + + private PeeringServiceLocationImpl wrapModel(PeeringServiceLocationInner inner) { + return new PeeringServiceLocationImpl(inner, manager()); + } + + @Override + public PagedList list() { + PeeringServiceLocationsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + PeeringServiceLocationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringServiceLocation call(PeeringServiceLocationInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsInner.java new file mode 100644 index 000000000000..e136a2389029 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceLocationsInner.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeeringServiceLocations. + */ +public class PeeringServiceLocationsInner { + /** The Retrofit service to perform REST calls. */ + private PeeringServiceLocationsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringServiceLocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringServiceLocationsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringServiceLocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeeringServiceLocations to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringServiceLocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceLocations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceLocations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceLocationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceLocationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceLocationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceLocationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceLocationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceLocationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceLocationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceLocationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixImpl.java new file mode 100644 index 000000000000..7a1a231892b5 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixImpl.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePeeringServicePrefix; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PrefixValidationState; +import com.microsoft.azure.management.peering.v2019_08_01_preview.LearnedType; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; + +class PeeringServicePeeringServicePrefixImpl extends CreatableUpdatableImpl implements PeeringServicePeeringServicePrefix, PeeringServicePeeringServicePrefix.Definition, PeeringServicePeeringServicePrefix.Update { + private final PeeringManager manager; + private String resourceGroupName; + private String peeringServiceName; + private String prefixName; + + PeeringServicePeeringServicePrefixImpl(String name, PeeringManager manager) { + super(name, new PeeringServicePrefixInner()); + this.manager = manager; + // Set resource name + this.prefixName = name; + // + } + + PeeringServicePeeringServicePrefixImpl(PeeringServicePrefixInner inner, PeeringManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.prefixName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.peeringServiceName = IdParsingUtils.getValueFromIdByName(inner.id(), "peeringServices"); + this.prefixName = IdParsingUtils.getValueFromIdByName(inner.id(), "prefixes"); + // + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PeeringServicePrefixesInner client = this.manager().inner().peeringServicePrefixes(); + return client.createOrUpdateAsync(this.resourceGroupName, this.peeringServiceName, this.prefixName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PeeringServicePrefixesInner client = this.manager().inner().peeringServicePrefixes(); + return client.createOrUpdateAsync(this.resourceGroupName, this.peeringServiceName, this.prefixName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PeeringServicePrefixesInner client = this.manager().inner().peeringServicePrefixes(); + return client.getAsync(this.resourceGroupName, this.peeringServiceName, this.prefixName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public LearnedType learnedType() { + return this.inner().learnedType(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String prefix() { + return this.inner().prefix(); + } + + @Override + public PrefixValidationState prefixValidationState() { + return this.inner().prefixValidationState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PeeringServicePeeringServicePrefixImpl withExistingPeeringService(String resourceGroupName, String peeringServiceName) { + this.resourceGroupName = resourceGroupName; + this.peeringServiceName = peeringServiceName; + return this; + } + + @Override + public PeeringServicePeeringServicePrefixImpl withLearnedType(LearnedType learnedType) { + this.inner().withLearnedType(learnedType); + return this; + } + + @Override + public PeeringServicePeeringServicePrefixImpl withPrefix(String prefix) { + this.inner().withPrefix(prefix); + return this; + } + + @Override + public PeeringServicePeeringServicePrefixImpl withPrefixValidationState(PrefixValidationState prefixValidationState) { + this.inner().withPrefixValidationState(prefixValidationState); + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixModelImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixModelImpl.java new file mode 100644 index 000000000000..1e982bb3a7b8 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePeeringServicePrefixModelImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePeeringServicePrefixModel; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.peering.v2019_08_01_preview.LearnedType; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PrefixValidationState; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; + +class PeeringServicePeeringServicePrefixModelImpl extends WrapperImpl implements PeeringServicePeeringServicePrefixModel { + private final PeeringManager manager; + + PeeringServicePeeringServicePrefixModelImpl(PeeringServicePrefixInner inner, PeeringManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public LearnedType learnedType() { + return this.inner().learnedType(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String prefix() { + return this.inner().prefix(); + } + + @Override + public PrefixValidationState prefixValidationState() { + return this.inner().prefixValidationState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixInner.java new file mode 100644 index 000000000000..ecb4786aad5b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixInner.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PrefixValidationState; +import com.microsoft.azure.management.peering.v2019_08_01_preview.LearnedType; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The peering service prefix class. + */ +@JsonFlatten +public class PeeringServicePrefixInner extends ProxyResource { + /** + * Valid route prefix. + */ + @JsonProperty(value = "properties.prefix") + private String prefix; + + /** + * The prefix validation state. Possible values include: 'None', 'Invalid', + * 'Verified', 'Failed', 'Pending', 'Unknown'. + */ + @JsonProperty(value = "properties.prefixValidationState") + private PrefixValidationState prefixValidationState; + + /** + * The prefix learned type. Possible values include: 'None', 'ViaPartner', + * 'ViaSession'. + */ + @JsonProperty(value = "properties.learnedType") + private LearnedType learnedType; + + /** + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get valid route prefix. + * + * @return the prefix value + */ + public String prefix() { + return this.prefix; + } + + /** + * Set valid route prefix. + * + * @param prefix the prefix value to set + * @return the PeeringServicePrefixInner object itself. + */ + public PeeringServicePrefixInner withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown'. + * + * @return the prefixValidationState value + */ + public PrefixValidationState prefixValidationState() { + return this.prefixValidationState; + } + + /** + * Set the prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown'. + * + * @param prefixValidationState the prefixValidationState value to set + * @return the PeeringServicePrefixInner object itself. + */ + public PeeringServicePrefixInner withPrefixValidationState(PrefixValidationState prefixValidationState) { + this.prefixValidationState = prefixValidationState; + return this; + } + + /** + * Get the prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession'. + * + * @return the learnedType value + */ + public LearnedType learnedType() { + return this.learnedType; + } + + /** + * Set the prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession'. + * + * @param learnedType the learnedType value to set + * @return the PeeringServicePrefixInner object itself. + */ + public PeeringServicePrefixInner withLearnedType(LearnedType learnedType) { + this.learnedType = learnedType; + return this; + } + + /** + * Get the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesImpl.java new file mode 100644 index 000000000000..2691458967a7 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePrefixes; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePeeringServicePrefix; + +class PeeringServicePrefixesImpl extends WrapperImpl implements PeeringServicePrefixes { + private final PeeringManager manager; + + PeeringServicePrefixesImpl(PeeringManager manager) { + super(manager.inner().peeringServicePrefixes()); + this.manager = manager; + } + + public PeeringManager manager() { + return this.manager; + } + + @Override + public PeeringServicePeeringServicePrefixImpl define(String name) { + return wrapModel(name); + } + + private PeeringServicePeeringServicePrefixImpl wrapModel(PeeringServicePrefixInner inner) { + return new PeeringServicePeeringServicePrefixImpl(inner, manager()); + } + + private PeeringServicePeeringServicePrefixImpl wrapModel(String name) { + return new PeeringServicePeeringServicePrefixImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + PeeringServicePrefixesInner client = this.inner(); + return client.getAsync(resourceGroupName, peeringServiceName, prefixName) + .flatMap(new Func1>() { + @Override + public Observable call(PeeringServicePrefixInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PeeringServicePeeringServicePrefix)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + PeeringServicePrefixesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, peeringServiceName, prefixName).toCompletable(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesInner.java new file mode 100644 index 000000000000..0dfc9e108322 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicePrefixesInner.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeeringServicePrefixes. + */ +public class PeeringServicePrefixesInner { + /** The Retrofit service to perform REST calls. */ + private PeeringServicePrefixesService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringServicePrefixesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringServicePrefixesInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringServicePrefixesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeeringServicePrefixes to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringServicePrefixesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePrefixes get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("prefixName") String prefixName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePrefixes createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("prefixName") String prefixName, @Path("subscriptionId") String subscriptionId, @Body PeeringServicePrefixInner peeringServicePrefix, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePrefixes delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("prefixName") String prefixName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the peering service prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServicePrefixInner object if successful. + */ + public PeeringServicePrefixInner get(String resourceGroupName, String peeringServiceName, String prefixName) { + return getWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName).toBlocking().single().body(); + } + + /** + * Gets the peering service prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String peeringServiceName, String prefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName), serviceCallback); + } + + /** + * Gets the peering service prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServicePrefixInner object + */ + public Observable getAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + return getWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName).map(new Func1, PeeringServicePrefixInner>() { + @Override + public PeeringServicePrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the peering service prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServicePrefixInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (prefixName == null) { + throw new IllegalArgumentException("Parameter prefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, peeringServiceName, prefixName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @param peeringServicePrefix The IP prefix for an peering + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServicePrefixInner object if successful. + */ + public PeeringServicePrefixInner createOrUpdate(String resourceGroupName, String peeringServiceName, String prefixName, PeeringServicePrefixInner peeringServicePrefix) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName, peeringServicePrefix).toBlocking().single().body(); + } + + /** + * Creates or updates the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @param peeringServicePrefix The IP prefix for an peering + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String peeringServiceName, String prefixName, PeeringServicePrefixInner peeringServicePrefix, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName, peeringServicePrefix), serviceCallback); + } + + /** + * Creates or updates the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @param peeringServicePrefix The IP prefix for an peering + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServicePrefixInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String peeringServiceName, String prefixName, PeeringServicePrefixInner peeringServicePrefix) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName, peeringServicePrefix).map(new Func1, PeeringServicePrefixInner>() { + @Override + public PeeringServicePrefixInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @param peeringServicePrefix The IP prefix for an peering + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServicePrefixInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String peeringServiceName, String prefixName, PeeringServicePrefixInner peeringServicePrefix) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (prefixName == null) { + throw new IllegalArgumentException("Parameter prefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peeringServicePrefix == null) { + throw new IllegalArgumentException("Parameter peeringServicePrefix is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(peeringServicePrefix); + return service.createOrUpdate(resourceGroupName, peeringServiceName, prefixName, this.client.subscriptionId(), peeringServicePrefix, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * removes the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String peeringServiceName, String prefixName) { + deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName).toBlocking().single().body(); + } + + /** + * removes the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String peeringServiceName, String prefixName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName), serviceCallback); + } + + /** + * removes the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + return deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName, prefixName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * removes the peering prefix. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param prefixName The prefix name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String peeringServiceName, String prefixName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (prefixName == null) { + throw new IllegalArgumentException("Parameter prefixName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, peeringServiceName, prefixName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderImpl.java new file mode 100644 index 000000000000..0795dc0c6857 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProvider; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class PeeringServiceProviderImpl extends WrapperImpl implements PeeringServiceProvider { + private final PeeringManager manager; + + PeeringServiceProviderImpl(PeeringServiceProviderInner inner, PeeringManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public PeeringManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String serviceProviderName() { + return this.inner().serviceProviderName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderInner.java new file mode 100644 index 000000000000..5bbd8f220169 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProviderInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * PeeringService provider. + */ +@JsonFlatten +public class PeeringServiceProviderInner extends ProxyResource { + /** + * The name of the service provider. + */ + @JsonProperty(value = "properties.serviceProviderName") + private String serviceProviderName; + + /** + * Get the name of the service provider. + * + * @return the serviceProviderName value + */ + public String serviceProviderName() { + return this.serviceProviderName; + } + + /** + * Set the name of the service provider. + * + * @param serviceProviderName the serviceProviderName value to set + * @return the PeeringServiceProviderInner object itself. + */ + public PeeringServiceProviderInner withServiceProviderName(String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + return this; + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersImpl.java new file mode 100644 index 000000000000..1eefc78e0f68 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProviders; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProvider; + +class PeeringServiceProvidersImpl extends WrapperImpl implements PeeringServiceProviders { + private PagedListConverter converter; + private final PeeringManager manager; + + PeeringServiceProvidersImpl(PeeringManager manager) { + super(manager.inner().peeringServiceProviders()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(PeeringServiceProviderInner inner) { + return Observable.just((PeeringServiceProvider) wrapModel(inner)); + } + }; + } + + public PeeringManager manager() { + return this.manager; + } + + private PeeringServiceProviderImpl wrapModel(PeeringServiceProviderInner inner) { + return new PeeringServiceProviderImpl(inner, manager()); + } + + @Override + public PagedList list() { + PeeringServiceProvidersInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + PeeringServiceProvidersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringServiceProvider call(PeeringServiceProviderInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersInner.java new file mode 100644 index 000000000000..3f9428bf398a --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServiceProvidersInner.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeeringServiceProviders. + */ +public class PeeringServiceProvidersInner { + /** The Retrofit service to perform REST calls. */ + private PeeringServiceProvidersService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringServiceProvidersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringServiceProvidersInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringServiceProvidersService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeeringServiceProviders to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringServiceProvidersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProviders list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceProviders") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServiceProviders listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceProviderInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceProviderInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceProviderInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceProviderInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceProviderInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceProviderInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the available peering service locations for the specified kind of peering. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceProviderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesImpl.java new file mode 100644 index 000000000000..fae5b9a4186d --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringService; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class PeeringServicesImpl extends GroupableResourcesCoreImpl implements PeeringServices { + protected PeeringServicesImpl(PeeringManager manager) { + super(manager.inner().peeringServices(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PeeringServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PeeringServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + PeeringServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PeeringServicesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringService call(PeeringServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PeeringServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PeeringServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringService call(PeeringServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PeeringServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected PeeringServiceImpl wrapModel(PeeringServiceInner inner) { + return new PeeringServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected PeeringServiceImpl wrapModel(String name) { + return new PeeringServiceImpl(name, new PeeringServiceInner(), this.manager()); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesInner.java new file mode 100644 index 000000000000..6341b1cfb92a --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringServicesInner.java @@ -0,0 +1,990 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ResourceTags; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PeeringServices. + */ +public class PeeringServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PeeringServicesService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringServicesInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PeeringServices to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("subscriptionId") String subscriptionId, @Body PeeringServiceInner peeringService, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ResourceTags tags, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServices") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServices listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServiceInner object if successful. + */ + public PeeringServiceInner getByResourceGroup(String resourceGroupName, String peeringServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringServiceName).toBlocking().single().body(); + } + + /** + * Gets an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String peeringServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringServiceName), serviceCallback); + } + + /** + * Gets an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String peeringServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringServiceName).map(new Func1, PeeringServiceInner>() { + @Override + public PeeringServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String peeringServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, peeringServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param peeringService The properties needed to create or update a peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServiceInner object if successful. + */ + public PeeringServiceInner createOrUpdate(String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, peeringService).toBlocking().single().body(); + } + + /** + * Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param peeringService The properties needed to create or update a peering service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, peeringService), serviceCallback); + } + + /** + * Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param peeringService The properties needed to create or update a peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringServiceName, peeringService).map(new Func1, PeeringServiceInner>() { + @Override + public PeeringServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param peeringService The properties needed to create or update a peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String peeringServiceName, PeeringServiceInner peeringService) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peeringService == null) { + throw new IllegalArgumentException("Parameter peeringService is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(peeringService); + return service.createOrUpdate(resourceGroupName, peeringServiceName, this.client.subscriptionId(), peeringService, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String peeringServiceName) { + deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName).toBlocking().single().body(); + } + + /** + * Deletes an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String peeringServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName), serviceCallback); + } + + /** + * Deletes an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String peeringServiceName) { + return deleteWithServiceResponseAsync(resourceGroupName, peeringServiceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String peeringServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, peeringServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServiceInner object if successful. + */ + public PeeringServiceInner update(String resourceGroupName, String peeringServiceName) { + return updateWithServiceResponseAsync(resourceGroupName, peeringServiceName).toBlocking().single().body(); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String peeringServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, peeringServiceName), serviceCallback); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable updateAsync(String resourceGroupName, String peeringServiceName) { + return updateWithServiceResponseAsync(resourceGroupName, peeringServiceName).map(new Func1, PeeringServiceInner>() { + @Override + public PeeringServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String peeringServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Map tags = null; + ResourceTags tags1 = new ResourceTags(); + tags1.withTags(null); + return service.update(resourceGroupName, peeringServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), tags1, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringServiceInner object if successful. + */ + public PeeringServiceInner update(String resourceGroupName, String peeringServiceName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, peeringServiceName, tags).toBlocking().single().body(); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String peeringServiceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, peeringServiceName, tags), serviceCallback); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable updateAsync(String resourceGroupName, String peeringServiceName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, peeringServiceName, tags).map(new Func1, PeeringServiceInner>() { + @Override + public PeeringServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags for a peering service with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringServiceInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String peeringServiceName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + ResourceTags tags1 = new ResourceTags(); + tags1.withTags(tags); + return service.update(resourceGroupName, peeringServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), tags1, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peering services under the given subscription and resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServiceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServiceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsImpl.java new file mode 100644 index 000000000000..2bf3f70da58c --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Peering; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class PeeringsImpl extends GroupableResourcesCoreImpl implements Peerings { + protected PeeringsImpl(PeeringManager manager) { + super(manager.inner().peerings(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + PeeringsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + PeeringsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + PeeringsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + PeeringsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Peering call(PeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + PeeringsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + PeeringsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Peering call(PeeringInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PeeringImpl define(String name) { + return wrapModel(name); + } + + @Override + protected PeeringImpl wrapModel(PeeringInner inner) { + return new PeeringImpl(inner.name(), inner, manager()); + } + + @Override + protected PeeringImpl wrapModel(String name) { + return new PeeringImpl(name, new PeeringInner(), this.manager()); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsInner.java new file mode 100644 index 000000000000..534272c0708b --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PeeringsInner.java @@ -0,0 +1,990 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ResourceTags; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Peerings. + */ +public class PeeringsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private PeeringsService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PeeringsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PeeringsInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PeeringsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Peerings to be + * used by Retrofit to perform actually REST calls. + */ + interface PeeringsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body PeeringInner peering, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ResourceTags tags, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerings") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Peerings listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringInner object if successful. + */ + public PeeringInner getByResourceGroup(String resourceGroupName, String peeringName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringName).toBlocking().single().body(); + } + + /** + * Gets an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringName), serviceCallback); + } + + /** + * Gets an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String peeringName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, peeringName).map(new Func1, PeeringInner>() { + @Override + public PeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringInner object if successful. + */ + public PeeringInner createOrUpdate(String resourceGroupName, String peeringName, PeeringInner peering) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringName, peering).toBlocking().single().body(); + } + + /** + * Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String peeringName, PeeringInner peering, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringName, peering), serviceCallback); + } + + /** + * Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String peeringName, PeeringInner peering) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, peeringName, peering).map(new Func1, PeeringInner>() { + @Override + public PeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String peeringName, PeeringInner peering) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (peering == null) { + throw new IllegalArgumentException("Parameter peering is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(peering); + return service.createOrUpdate(resourceGroupName, peeringName, this.client.subscriptionId(), peering, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String peeringName) { + deleteWithServiceResponseAsync(resourceGroupName, peeringName).toBlocking().single().body(); + } + + /** + * Deletes an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, peeringName), serviceCallback); + } + + /** + * Deletes an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String peeringName) { + return deleteWithServiceResponseAsync(resourceGroupName, peeringName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an existing peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringInner object if successful. + */ + public PeeringInner update(String resourceGroupName, String peeringName) { + return updateWithServiceResponseAsync(resourceGroupName, peeringName).toBlocking().single().body(); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String peeringName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, peeringName), serviceCallback); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable updateAsync(String resourceGroupName, String peeringName) { + return updateWithServiceResponseAsync(resourceGroupName, peeringName).map(new Func1, PeeringInner>() { + @Override + public PeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String peeringName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Map tags = null; + ResourceTags tags1 = new ResourceTags(); + tags1.withTags(null); + return service.update(resourceGroupName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), tags1, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PeeringInner object if successful. + */ + public PeeringInner update(String resourceGroupName, String peeringName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, peeringName, tags).toBlocking().single().body(); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String peeringName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, peeringName, tags), serviceCallback); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable updateAsync(String resourceGroupName, String peeringName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, peeringName, tags).map(new Func1, PeeringInner>() { + @Override + public PeeringInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param tags Gets or sets the tags, a dictionary of descriptors arm object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PeeringInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String peeringName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringName == null) { + throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + ResourceTags tags1 = new ResourceTags(); + tags1.withTags(tags); + return service.update(resourceGroupName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), tags1, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the peerings under the given subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesImpl.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesImpl.java new file mode 100644 index 000000000000..507df36f2088 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.peering.v2019_08_01_preview.Prefixes; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.peering.v2019_08_01_preview.PeeringServicePeeringServicePrefixModel; + +class PrefixesImpl extends WrapperImpl implements Prefixes { + private final PeeringManager manager; + + PrefixesImpl(PeeringManager manager) { + super(manager.inner().prefixes()); + this.manager = manager; + } + + public PeeringManager manager() { + return this.manager; + } + + private PeeringServicePeeringServicePrefixModelImpl wrapModel(PeeringServicePrefixInner inner) { + return new PeeringServicePeeringServicePrefixModelImpl(inner, manager()); + } + + @Override + public Observable listByPeeringServiceAsync(final String resourceGroupName, final String peeringServiceName) { + PrefixesInner client = this.inner(); + return client.listByPeeringServiceAsync(resourceGroupName, peeringServiceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PeeringServicePeeringServicePrefixModel call(PeeringServicePrefixInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesInner.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesInner.java new file mode 100644 index 000000000000..87890985b867 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/PrefixesInner.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.peering.v2019_08_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Prefixes. + */ +public class PrefixesInner { + /** The Retrofit service to perform REST calls. */ + private PrefixesService service; + /** The service client containing this operation class. */ + private PeeringManagementClientImpl client; + + /** + * Initializes an instance of PrefixesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrefixesInner(Retrofit retrofit, PeeringManagementClientImpl client) { + this.service = retrofit.create(PrefixesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Prefixes to be + * used by Retrofit to perform actually REST calls. + */ + interface PrefixesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Prefixes listByPeeringService" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes") + Observable> listByPeeringService(@Path("resourceGroupName") String resourceGroupName, @Path("peeringServiceName") String peeringServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.peering.v2019_08_01_preview.Prefixes listByPeeringServiceNext" }) + @GET + Observable> listByPeeringServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServicePrefixInner> object if successful. + */ + public PagedList listByPeeringService(final String resourceGroupName, final String peeringServiceName) { + ServiceResponse> response = listByPeeringServiceSinglePageAsync(resourceGroupName, peeringServiceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByPeeringServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByPeeringServiceAsync(final String resourceGroupName, final String peeringServiceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByPeeringServiceSinglePageAsync(resourceGroupName, peeringServiceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByPeeringServiceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServicePrefixInner> object + */ + public Observable> listByPeeringServiceAsync(final String resourceGroupName, final String peeringServiceName) { + return listByPeeringServiceWithServiceResponseAsync(resourceGroupName, peeringServiceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param resourceGroupName The resource group name. + * @param peeringServiceName The peering service name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServicePrefixInner> object + */ + public Observable>> listByPeeringServiceWithServiceResponseAsync(final String resourceGroupName, final String peeringServiceName) { + return listByPeeringServiceSinglePageAsync(resourceGroupName, peeringServiceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByPeeringServiceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the peerings prefix in the resource group. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param peeringServiceName The peering service name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServicePrefixInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByPeeringServiceSinglePageAsync(final String resourceGroupName, final String peeringServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (peeringServiceName == null) { + throw new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByPeeringService(resourceGroupName, peeringServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByPeeringServiceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByPeeringServiceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PeeringServicePrefixInner> object if successful. + */ + public PagedList listByPeeringServiceNext(final String nextPageLink) { + ServiceResponse> response = listByPeeringServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByPeeringServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByPeeringServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByPeeringServiceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByPeeringServiceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServicePrefixInner> object + */ + public Observable> listByPeeringServiceNextAsync(final String nextPageLink) { + return listByPeeringServiceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the peerings prefix in the resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PeeringServicePrefixInner> object + */ + public Observable>> listByPeeringServiceNextWithServiceResponseAsync(final String nextPageLink) { + return listByPeeringServiceNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByPeeringServiceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists the peerings prefix in the resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PeeringServicePrefixInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByPeeringServiceNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByPeeringServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByPeeringServiceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByPeeringServiceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/package-info.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/package-info.java new file mode 100644 index 000000000000..939ad9b89291 --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for PeeringManagementClient. + * Peering Client. + */ +package com.microsoft.azure.management.peering.v2019_08_01_preview.implementation; diff --git a/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/package-info.java b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/package-info.java new file mode 100644 index 000000000000..2097adad008e --- /dev/null +++ b/peering/resource-manager/v2019_08_01_preview/src/main/java/com/microsoft/azure/management/peering/v2019_08_01_preview/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for PeeringManagementClient. + * Peering Client. + */ +package com.microsoft.azure.management.peering.v2019_08_01_preview; diff --git a/pom.client.xml b/pom.client.xml index 177ad83bf460..33d80bc2a03d 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -409,6 +409,10 @@ Azure Storage - Files com.azure.storage.file* + + Azure Storage Files - Data Lake + com.azure.storage.file.datalake* + Azure Storage - Queues com.azure.storage.queue* @@ -419,7 +423,8 @@ Azure Telemetry - com.azure.tracing.opentelemetry* + Azure Telemetry - OpenCensus + com.azure.core.tracing* @@ -577,6 +582,7 @@ -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-keys/src/samples/java -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-secrets/src/samples/java -snippetpath ${project.basedir}/sdk/storage/azure-storage-blob/src/samples/java + -snippetpath ${project.basedir}/sdk/storage/azure-storage-common/src/samples/java -snippetpath ${project.basedir}/sdk/storage/azure-storage-file/src/samples/java -snippetpath ${project.basedir}/sdk/storage/azure-storage-queue/src/samples/java @@ -860,8 +866,9 @@ sdk/storage/azure-storage-blob-cryptography sdk/storage/azure-storage-common sdk/storage/azure-storage-file + sdk/storage/azure-storage-file-datalake sdk/storage/azure-storage-queue sdk/storage/azure-storage-queue-cryptography - sdk/tracing/tracing-opentelemetry + sdk/tracing/azure-core-tracing-opencensus diff --git a/sdk/appconfiguration/azure-data-appconfiguration/README.md b/sdk/appconfiguration/azure-data-appconfiguration/README.md index 9087be9541dc..60441d636d3d 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/README.md +++ b/sdk/appconfiguration/azure-data-appconfiguration/README.md @@ -22,26 +22,33 @@ Use the client library for App Configuration to create and manage application co com.azure azure-data-appconfiguration - 1.0.0-preview.3 + 1.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +AppConfiguration to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-data-appconfiguration + 1.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` - -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 1a9ed2292927..daa0f40c8abd 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -46,16 +46,16 @@ org.slf4j slf4j-api - com.azure - azure-core-test + azure-core-http-netty 1.0.0-preview.5 - test + + com.azure - azure-core-http-netty + azure-core-test 1.0.0-preview.5 test diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java index ae4de8bebac7..f8e900ef461f 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java @@ -26,6 +26,7 @@ import reactor.core.publisher.Mono; import java.net.URL; +import java.time.OffsetDateTime; import java.util.Objects; import static com.azure.core.implementation.util.FluxUtil.withContext; @@ -74,9 +75,11 @@ public final class ConfigurationAsyncClient { * *

Add a setting with the key "prodDBConnection" and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string-string} * * @param key The key of the configuration setting to add. + * @param label The label of the configuration setting to add, or optionally, null if a setting with + * label is desired. * @param value The value associated with this configuration setting key. * @return The {@link ConfigurationSetting} that was created, if a key collision occurs or the key is an invalid * value (which will also throw HttpResponseException described below). @@ -85,9 +88,9 @@ public final class ConfigurationAsyncClient { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono addSetting(String key, String value) { + public Mono addSetting(String key, String label, String value) { return withContext( - context -> addSetting(new ConfigurationSetting().setKey(key).setValue(value), context)) + context -> addSetting(new ConfigurationSetting().setKey(key).setLabel(label).setValue(value), context)) .flatMap(response -> Mono.justOrEmpty(response.getValue())); } @@ -166,9 +169,11 @@ Mono> addSetting(ConfigurationSetting setting, Co * *

Add a setting with the key "prodDBConnection" and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string-string} * * @param key The key of the configuration setting to create or update. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. * @param value The value of this configuration setting. * @return The {@link ConfigurationSetting} that was created or updated, if the key is an invalid value (which will * also throw HttpResponseException described below). @@ -177,9 +182,10 @@ Mono> addSetting(ConfigurationSetting setting, Co * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setSetting(String key, String value) { + public Mono setSetting(String key, String label, String value) { return withContext( - context -> setSetting(new ConfigurationSetting().setKey(key).setValue(value), context)) + context -> setSetting(new ConfigurationSetting().setKey(key).setLabel(label).setValue(value), + false, context)) .flatMap(response -> Mono.justOrEmpty(response.getValue())); } @@ -195,40 +201,10 @@ public Mono setSetting(String key, String value) { * *

Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setSetting#ConfigurationSetting} - * - * @param setting The configuration setting to create or update. - * @return The {@link ConfigurationSetting} that was created or updated, if the key is an invalid value, the setting - * is locked, or an etag was provided but does not match the service's current etag value (which will also throw - * HttpResponseException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If the {@link ConfigurationSetting#getETag() etag} was specified, is not the - * wildcard character, and the current configuration value's etag does not match, or the setting exists and is - * locked. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setSetting(ConfigurationSetting setting) { - return withContext(context -> setSetting(setting, context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } - - /** - * Creates or updates a configuration value in the service. Partial updates are not supported and the entire - * configuration setting is updated. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is updated if the current - * setting's etag matches. If the etag's value is equal to the wildcard character ({@code "*"}), the setting will - * always be updated. - * - *

Code Samples

- * - *

Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting-boolean} * * @param setting The configuration setting to create or update. + * @param ifUnchanged A boolean indicates if using setting's ETag as If-Match's value. * @return A REST response containing the {@link ConfigurationSetting} that was created or updated, if the key is an * invalid value, the setting is locked, or an etag was provided but does not match the service's current etag value * (which will also throw HttpResponseException described below). @@ -240,14 +216,17 @@ public Mono setSetting(ConfigurationSetting setting) { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setSettingWithResponse(ConfigurationSetting setting) { - return withContext(context -> setSetting(setting, context)); + public Mono> setSettingWithResponse(ConfigurationSetting setting, + boolean ifUnchanged) { + return withContext(context -> setSetting(setting, ifUnchanged, context)); } - Mono> setSetting(ConfigurationSetting setting, Context context) { + Mono> setSetting(ConfigurationSetting setting, boolean ifUnchanged, + Context context) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); + final String ifMatchETag = ifUnchanged ? getETagValue(setting.getETag()) : null; // This service method call is similar to addSetting except it will create or update a configuration setting. // If the user provides an etag value, it is passed in as If-Match = "{etag value}". If the current value in the // service has a matching etag then it matches, then its value is updated with what the user passed in. @@ -255,120 +234,27 @@ Mono> setSetting(ConfigurationSetting setting, Co // old value locally. // If no etag value was passed in, then the value is always added or updated. return service.setKey(serviceEndpoint, setting.getKey(), setting.getLabel(), setting, - getETagValue(setting.getETag()), null, context) + ifMatchETag, null, context) .doOnRequest(ignoredValue -> logger.info("Setting ConfigurationSetting - {}", setting)) .doOnSuccess(response -> logger.info("Set ConfigurationSetting - {}", response.getValue())) .doOnError(error -> logger.warning("Failed to set ConfigurationSetting - {}", setting, error)); } /** - * Updates an existing configuration value in the service with the given key. The setting must already exist. - * - * Code Samples

- * - *

Update a setting with the key "prodDBConnection" to have the value "updated_db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.updateSetting#string-string} - * - * @param key The key of the configuration setting to update. - * @param value The updated value of this configuration setting. - * @return The {@link ConfigurationSetting} that was updated, if the configuration value does not exist, is locked, - * or the key is an invalid value (which will also throw HttpResponseException described below). - * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws HttpResponseException If a ConfigurationSetting with the key does not exist or the configuration value is - * locked. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSetting(String key, String value) { - return withContext( - context -> updateSetting(new ConfigurationSetting().setKey(key).setValue(value), context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } - - /** - * Updates an existing configuration value in the service. The setting must already exist. Partial updates are not - * supported, the entire configuration value is replaced. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is only updated if it - * matches. + * Attempts to get a ConfigurationSetting that matches the {@code key}, the {@code label} as optional, and the + * {@code acceptDateTime} as optional. * *

Code Samples

* - *

Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value - * "updated_db_connection".

+ *

Retrieve the setting with the key "prodDBConnection" and a time that one minute before now at UTC-Zone

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.updateSetting#ConfigurationSetting} - * - * @param setting The setting to add or update in the service. - * @return The {@link ConfigurationSetting} that was updated, if the configuration value does not exist, is locked, - * or the key is an invalid value (which will also throw HttpResponseException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label does not exist, the - * setting is locked, or {@link ConfigurationSetting#getETag() etag} is specified but does not match the current - * value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSetting(ConfigurationSetting setting) { - return withContext(context -> updateSetting(setting, context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } - - /** - * Updates an existing configuration value in the service. The setting must already exist. Partial updates are not - * supported, the entire configuration value is replaced. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is only updated if it - * matches. - * - *

Code Samples

- * - *

Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value - * "updated_db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.updateSettingWithResponse#ConfigurationSetting} - * - * @param setting The setting to add or update in the service. - * @return A REST response containing the {@link ConfigurationSetting} that was updated, if the configuration value - * does not exist, is locked, or the key is an invalid value (which will also throw HttpResponseException described - * below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label does not exist, the - * setting is locked, or {@link ConfigurationSetting#getETag() etag} is specified but does not match the current - * value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSettingWithResponse(ConfigurationSetting setting) { - return withContext(context -> updateSetting(setting, context)); - } - - Mono> updateSetting(ConfigurationSetting setting, Context context) { - // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. - validateSetting(setting); - - String etag = setting.getETag() == null ? ETAG_ANY : setting.getETag(); - - return service.setKey(serviceEndpoint, setting.getKey(), setting.getLabel(), setting, getETagValue(etag), - null, context) - .doOnRequest(ignoredValue -> logger.info("Updating ConfigurationSetting - {}", setting)) - .doOnSuccess(response -> logger.info("Updated ConfigurationSetting - {}", response.getValue())) - .doOnError(error -> logger.warning("Failed to update ConfigurationSetting - {}", setting, error)); - } - - /** - * Attempts to get a ConfigurationSetting that matches the {@code key}. - * - *

Code Samples

- * - *

Retrieve the setting with the key "prodDBConnection".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.getSetting#string} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.getSetting#string-string-OffsetDateTime} * * @param key The key of the setting to retrieve. + * @param label The label of the configuration setting to retrieve, or optionally, null if a setting with + * label is desired. + * @param asOfDateTime Datetime used to retrieve the state of the configuration at that time. If null the current + * state will be retrieved asOfDateTime is desired. * @return The {@link ConfigurationSetting} stored in the service, if the configuration value does not exist or the * key is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -376,37 +262,15 @@ Mono> updateSetting(ConfigurationSetting setting, * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSetting(String key) { - return withContext( - context -> getSetting(new ConfigurationSetting().setKey(key), context)) + public Mono getSetting(String key, String label, OffsetDateTime asOfDateTime) { + return withContext(context -> getSetting(new ConfigurationSetting().setKey(key).setLabel(label), asOfDateTime, + false, context)) .flatMap(response -> Mono.justOrEmpty(response.getValue())); } /** - * Attempts to get the ConfigurationSetting given the {@code key}, optional {@code label}. - * - *

Code Samples

- * - *

Retrieve the setting with the key-label "prodDBConnection"-"westUS".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.getSetting#ConfigurationSetting} - * - * @param setting The setting to retrieve based on its key and optional label combination. - * @return The {@link ConfigurationSetting} stored in the service, if the configuration value does not exist or the - * key is an invalid value (which will also throw HttpResponseException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceNotFoundException If a ConfigurationSetting with the same key and label does not exist. - * @throws HttpResponseException If the {@code} key is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSetting(ConfigurationSetting setting) { - return withContext(context -> getSetting(setting, context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } - - /** - * Attempts to get the ConfigurationSetting given the {@code key}, optional {@code label}. + * Attempts to get the ConfigurationSetting given the {@code key}, optional {@code label}, optional + * {@code asOfDateTime} * *

Code Samples

* @@ -415,6 +279,10 @@ public Mono getSetting(ConfigurationSetting setting) { * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.getSettingWithResponse#ConfigurationSetting} * * @param setting The setting to retrieve based on its key and optional label combination. + * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * asOfDateTime is desired. + * @param ifChanged Flag indicating if the {@code setting} {@link ConfigurationSetting#getETag ETag} is used as a + * If-None-Match header. * @return A REST response containing the {@link ConfigurationSetting} stored in the service, if the configuration * value does not exist or the key is an invalid value (which will also throw HttpResponseException described * below). @@ -424,16 +292,20 @@ public Mono getSetting(ConfigurationSetting setting) { * @throws HttpResponseException If the {@code} key is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSettingWithResponse(ConfigurationSetting setting) { - return withContext(context -> getSetting(setting, context)); + public Mono> getSettingWithResponse(ConfigurationSetting setting, + OffsetDateTime asOfDateTime, + boolean ifChanged) { + return withContext(context -> getSetting(setting, asOfDateTime, ifChanged, context)); } - Mono> getSetting(ConfigurationSetting setting, Context context) { + Mono> getSetting(ConfigurationSetting setting, OffsetDateTime asOfDateTime, + boolean onlyIfChanged, Context context) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); - return service.getKeyValue(serviceEndpoint, setting.getKey(), setting.getLabel(), null, null, null, null, - context) + final String ifNoneMatchETag = onlyIfChanged ? getETagValue(setting.getETag()) : null; + return service.getKeyValue(serviceEndpoint, setting.getKey(), setting.getLabel(), null, + asOfDateTime == null ? null : asOfDateTime.toString(), null, ifNoneMatchETag, context) .doOnRequest(ignoredValue -> logger.info("Retrieving ConfigurationSetting - {}", setting)) .doOnSuccess(response -> logger.info("Retrieved ConfigurationSetting - {}", response.getValue())) .doOnError(error -> logger.warning("Failed to get ConfigurationSetting - {}", setting, error)); @@ -446,9 +318,11 @@ Mono> getSetting(ConfigurationSetting setting, Co * *

Delete the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string-string} * * @param key The key of the setting to delete. + * @param label The label of the configuration setting to delete, or optionally, null if a setting with + * label is desired. * @return The deleted ConfigurationSetting or {@code null} if it didn't exist. {@code null} is also returned if the * {@code key} is an invalid value (which will also throw HttpResponseException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -456,39 +330,9 @@ Mono> getSetting(ConfigurationSetting setting, Co * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteSetting(String key) { + public Mono deleteSetting(String key, String label) { return withContext( - context -> deleteSetting(new ConfigurationSetting().setKey(key), context)) - .flatMap(response -> Mono.justOrEmpty(response.getValue())); - } - - /** - * Deletes the {@link ConfigurationSetting} with a matching key, along with the given label and etag. - * - * If {@link ConfigurationSetting#getETag() etag} is specified and is not the wildcard character ({@code "*"}), then - * the setting is only deleted if the etag matches the current etag; this means that no one has updated the - * ConfigurationSetting yet. - * - *

Code Samples

- * - *

Delete the setting with the key-label "prodDBConnection"-"westUS".

- * - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#ConfigurationSetting} - * - * @param setting The ConfigurationSetting to delete. - * @return The deleted ConfigurationSetting or {@code null} if didn't exist. {@code null} is also returned if the - * {@code key} is an invalid value or {@link ConfigurationSetting#getETag() etag} is set but does not match the - * current etag (which will also throw HttpResponseException described below). - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws NullPointerException When {@code setting} is {@code null}. - * @throws ResourceModifiedException If the ConfigurationSetting is locked. - * @throws ResourceNotFoundException If {@link ConfigurationSetting#getETag() etag} is specified, not the wildcard - * character, and does not match the current etag value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteSetting(ConfigurationSetting setting) { - return withContext(context -> deleteSetting(setting, context)) + context -> deleteSetting(new ConfigurationSetting().setKey(key).setLabel(label), false, context)) .flatMap(response -> Mono.justOrEmpty(response.getValue())); } @@ -503,9 +347,11 @@ public Mono deleteSetting(ConfigurationSetting setting) { * *

Delete the setting with the key-label "prodDBConnection"-"westUS".

* - * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting} + * {@codesnippet com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting-boolean} * * @param setting The ConfigurationSetting to delete. + * @param ifUnchanged A boolean indicator to decide using setting's ETag value as IF-MATCH value. + * If false, set IF_MATCH to {@code null}. Otherwise, set the setting's ETag value to IF_MATCH. * @return A REST response containing the deleted ConfigurationSetting or {@code null} if didn't exist. {@code null} * is also returned if the {@code key} is an invalid value or {@link ConfigurationSetting#getETag() etag} is set but * does not match the current etag (which will also throw HttpResponseException described below). @@ -517,15 +363,17 @@ public Mono deleteSetting(ConfigurationSetting setting) { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteSettingWithResponse(ConfigurationSetting setting) { - return withContext(context -> deleteSetting(setting, context)); + public Mono> deleteSettingWithResponse(ConfigurationSetting setting, + boolean ifUnchanged) { + return withContext(context -> deleteSetting(setting, ifUnchanged, context)); } - Mono> deleteSetting(ConfigurationSetting setting, Context context) { + Mono> deleteSetting(ConfigurationSetting setting, boolean ifUnchanged, + Context context) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); - - return service.delete(serviceEndpoint, setting.getKey(), setting.getLabel(), getETagValue(setting.getETag()), + final String ifMatchETag = ifUnchanged ? getETagValue(setting.getETag()) : null; + return service.delete(serviceEndpoint, setting.getKey(), setting.getLabel(), ifMatchETag, null, context) .doOnRequest(ignoredValue -> logger.info("Deleting ConfigurationSetting - {}", setting)) .doOnSuccess(response -> logger.info("Deleted ConfigurationSetting - {}", response.getValue())) @@ -675,7 +523,7 @@ private Publisher extractAndFetchConfigurationSettings( * @return The etag surrounded by quotations. (ex. "etag") */ private static String getETagValue(String etag) { - return etag == null ? "" : "\"" + etag + "\""; + return (etag == null || etag.equals("*")) ? etag : "\"" + etag + "\""; } /* diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java index 754be8c84e59..4b29b6809b2d 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java @@ -16,6 +16,8 @@ import com.azure.data.appconfiguration.models.ConfigurationSetting; import com.azure.data.appconfiguration.models.SettingSelector; +import java.time.OffsetDateTime; + /** * This class provides a client that contains all the operations for {@link ConfigurationSetting ConfigurationSettings} * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, updating, and deleting @@ -51,9 +53,11 @@ public final class ConfigurationClient { * *

Add a setting with the key "prodDBConnection" and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String} + * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String-String} * * @param key The key of the configuration setting to add. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. * @param value The value associated with this configuration setting key. * @return The {@link ConfigurationSetting} that was created, or {@code null}, if a key collision occurs or the key * is an invalid value (which will also throw ServiceRequestException described below). @@ -62,31 +66,9 @@ public final class ConfigurationClient { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting addSetting(String key, String value) { - return addSetting(new ConfigurationSetting().setKey(key).setValue(value), Context.NONE).getValue(); - } - - /** - * Adds a configuration value in the service if that key and label does not exist. The label value of the - * ConfigurationSetting is optional. - * - *

Code Samples

- * - *

Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting} - * - * @param setting The setting to add to the configuration service. - * @return The {@link ConfigurationSetting} that was created, or {@code null}, if a key collision occurs or the key - * is an invalid value (which will also throw ServiceRequestException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label exists. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting addSetting(ConfigurationSetting setting) { - return addSetting(setting, Context.NONE).getValue(); + public ConfigurationSetting addSetting(String key, String label, String value) { + return addSettingWithResponse(new ConfigurationSetting().setKey(key).setValue(value).setLabel(label), + Context.NONE).getValue(); } /** @@ -111,23 +93,21 @@ public ConfigurationSetting addSetting(ConfigurationSetting setting) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response addSettingWithResponse(ConfigurationSetting setting, Context context) { - return addSetting(setting, context); - } - - private Response addSetting(ConfigurationSetting setting, Context context) { return client.addSetting(setting, context).block(); } /** - * Creates or updates a configuration value in the service with the given key. + * Creates or updates a configuration value in the service with the given key and optional {@code label}. * *

Code Samples

* *

Add a setting with the key "prodDBConnection" and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String} + * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String-String} * * @param key The key of the configuration setting to create or update. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. * @param value The value of this configuration setting. * @return The {@link ConfigurationSetting} that was created or updated, or {@code null}, if the key is an invalid * value (which will also throw ServiceRequestException described below). @@ -136,38 +116,9 @@ private Response addSetting(ConfigurationSetting setting, * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting setSetting(String key, String value) { - return setSettingWithResponse(new ConfigurationSetting().setKey(key).setValue(value), Context.NONE).getValue(); - } - - /** - * Creates or updates a configuration value in the service. Partial updates are not supported and the entire - * configuration setting is updated. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is updated if the current - * setting's etag matches. If the etag's value is equal to the wildcard character ({@code "*"}), the setting will - * always be updated. - * - *

Code Samples

- * - *

Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting} - * - * @param setting The configuration setting to create or update. - * @return The {@link ConfigurationSetting} that was created or updated, or {@code null}, if the key is an invalid - * value, the setting is locked, or an etag was provided but does not match the service's current etag value (which - * will also throw ServiceRequestException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If the {@link ConfigurationSetting#getETag() etag} was specified, is not the - * wildcard character, and the current configuration value's etag does not match, or the setting exists and is - * locked. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting setSetting(ConfigurationSetting setting) { - return setSettingWithResponse(setting, Context.NONE).getValue(); + public ConfigurationSetting setSetting(String key, String label, String value) { + return setSettingWithResponse(new ConfigurationSetting().setKey(key).setLabel(label).setValue(value), + false, Context.NONE).getValue(); } /** @@ -182,9 +133,10 @@ public ConfigurationSetting setSetting(ConfigurationSetting setting) { * *

Add a setting with the key "prodDBConnection" and value "db_connection".

* - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context} + * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-boolean-Context} * * @param setting The configuration setting to create or update. + * @param ifUnchanged A boolean indicates if using setting's ETag as If-Match's value. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The {@link ConfigurationSetting} that was created or updated, or {@code null}, if the key is an invalid * value, the setting is locked, or an etag was provided but does not match the service's current etag value (which @@ -196,108 +148,24 @@ public ConfigurationSetting setSetting(ConfigurationSetting setting) { * locked. * @throws HttpResponseException If {@code key} is an empty string. */ - public Response setSettingWithResponse(ConfigurationSetting setting, Context context) { - return client.setSetting(setting, context).block(); - } - /** - * Updates an existing configuration value in the service with the given key. The setting must already exist. - * - *

Code Samples

- * - *

Update a setting with the key "prodDBConnection" to have the value "updated_db_connection".

- * - * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String} - * - * @param key The key of the configuration setting to update. - * @param value The updated value of this configuration setting. - * @return The {@link ConfigurationSetting} that was updated, or {@code null}, if the configuration value does not - * exist, is locked, or the key is an invalid value (which will also throw ServiceRequestException described - * below). - * @throws IllegalArgumentException If {@code key} is {@code null}. - * @throws HttpResponseException If a ConfigurationSetting with the key does not exist or the configuration value is - * locked. - * @throws HttpResponseException If {@code key} is an empty string. - */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting updateSetting(String key, String value) { - return updateSetting(new ConfigurationSetting().setKey(key).setValue(value), Context.NONE).getValue(); + public Response setSettingWithResponse(ConfigurationSetting setting, boolean ifUnchanged, + Context context) { + return client.setSetting(setting, ifUnchanged, context).block(); } /** - * Updates an existing configuration value in the service. The setting must already exist. Partial updates are not - * supported, the entire configuration value is replaced. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is only updated if it - * matches. - * - *

Code Samples

- * - *

Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value - * "updated_db_connection".

- * - * {@codesnippet com.azure.data.applicationconfig.configurationclient.updateSetting#ConfigurationSetting} - * - * @param setting The setting to add or update in the service. - * @return The {@link ConfigurationSetting} that was updated, or {@code null}, if the configuration value does not - * exist, is locked, or the key is an invalid value (which will also throw ServiceRequestException described - * below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label does not exist, the - * setting is locked, or {@link ConfigurationSetting#getETag() etag} is specified but does not match the current - * value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting updateSetting(ConfigurationSetting setting) { - return updateSetting(setting, Context.NONE).getValue(); - } - - /** - * Updates an existing configuration value in the service. The setting must already exist. Partial updates are not - * supported, the entire configuration value is replaced. - * - * If {@link ConfigurationSetting#getETag() etag} is specified, the configuration value is only updated if it - * matches. - * - *

Code Samples

- * - *

Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value - * "updated_db_connection".

- * - * {@codesnippet com.azure.data.applicationconfig.configurationclient.updateSettingWithResponse#ConfigurationSetting-Context} - * - * @param setting The setting to add or update in the service. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containing the {@link ConfigurationSetting} that was updated, or {@code null}, if the - * configuration value does not exist, is locked, or the key is an invalid value (which will also throw - * ServiceRequestException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceModifiedException If a ConfigurationSetting with the same key and label does not exist, the - * setting is locked, or {@link ConfigurationSetting#getETag() etag} is specified but does not match the current - * value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSettingWithResponse(ConfigurationSetting setting, Context context) { - return updateSetting(setting, context); - } - - private Response updateSetting(ConfigurationSetting setting, Context context) { - return client.updateSetting(setting, context).block(); - } - - /** - * Attempts to get a ConfigurationSetting that matches the {@code key}. + * Attempts to get a ConfigurationSetting that matches the {@code key}, and the {@code label} optionally. * *

Code Samples

* *

Retrieve the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSetting#string} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSetting#string-string} * * @param key The key of the setting to retrieve. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. * @return The {@link ConfigurationSetting} stored in the service, or {@code null}, if the configuration value does * not exist or the key is an invalid value (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -305,30 +173,37 @@ private Response updateSetting(ConfigurationSetting settin * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting getSetting(String key) { - return getSetting(new ConfigurationSetting().setKey(key), Context.NONE).getValue(); + public ConfigurationSetting getSetting(String key, String label) { + return getSetting(key, label, null); } /** - * Attempts to get the ConfigurationSetting given the {@code key}, optional {@code label}. + * Attempts to get a ConfigurationSetting that matches the {@code key}, the {@code label} optionally, and the + * {@code asOfDateTime} optionally. * *

Code Samples

* *

Retrieve the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSetting#ConfigurationSetting} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSetting#string-string-OffsetDateTime} * - * @param setting The setting to retrieve based on its key and optional label combination. + * @param key The key of the setting to retrieve. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. + * @param asOfDateTime To access a past state of the configuration setting, or optionally, null if a setting with + * asOfDateTime is desired. * @return The {@link ConfigurationSetting} stored in the service, or {@code null}, if the configuration value does * not exist or the key is an invalid value (which will also throw ServiceRequestException described below). - * @throws NullPointerException If {@code setting} is {@code null}. - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws ResourceNotFoundException If a ConfigurationSetting with the same key and label does not exist. - * @throws HttpResponseException If the {@code} key is an empty string. + * @throws IllegalArgumentException If {@code key} is {@code null}. + * @throws ResourceNotFoundException If a ConfigurationSetting with {@code key} does not exist. + * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting getSetting(ConfigurationSetting setting) { - return getSetting(setting, Context.NONE).getValue(); + public ConfigurationSetting getSetting(String key, String label, OffsetDateTime asOfDateTime) { + final Response getResponse = client.getSetting( + new ConfigurationSetting().setKey(key).setLabel(label), asOfDateTime, false, Context.NONE) + .block(); + return getResponse == null ? null : getResponse.getValue(); } /** @@ -338,25 +213,23 @@ public ConfigurationSetting getSetting(ConfigurationSetting setting) { * *

Retrieve the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-Context} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-boolean-Context} * * @param setting The setting to retrieve based on its key and optional label combination. + * @param ifChanged A boolean value indicates if using setting's ETag value to If-None-Match header. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A REST response containg the {@link ConfigurationSetting} stored in the service, or {@code null}, if the + * @return A REST response contains the {@link ConfigurationSetting} stored in the service, or {@code null}, if the * configuration value does not exist or the key is an invalid value (which will also throw ServiceRequestException * described below). * @throws NullPointerException If {@code setting} is {@code null}. * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. * @throws ResourceNotFoundException If a ConfigurationSetting with the same key and label does not exist. - * @throws HttpResponseException If the {@code} key is an empty string. + * @throws HttpResponseException If the {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSettingWithResponse(ConfigurationSetting setting, Context context) { - return getSetting(setting, context); - } - - private Response getSetting(ConfigurationSetting setting, Context context) { - return client.getSetting(setting, context).block(); + public Response getSettingWithResponse(ConfigurationSetting setting, boolean ifChanged, + Context context) { + return client.getSetting(setting, null, ifChanged, context).block(); } /** @@ -366,9 +239,11 @@ private Response getSetting(ConfigurationSetting setting, * *

Delete the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.deleteSetting#string} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.deleteSetting#string-string} * * @param key The key of the setting to delete. + * @param label The label of the configuration setting to create or update, or optionally, null if a setting with + * label is desired. * @return The deleted ConfigurationSetting or {@code null} if it didn't exist. {@code null} is also returned if the * {@code key} is an invalid value (which will also throw ServiceRequestException described below). * @throws IllegalArgumentException If {@code key} is {@code null}. @@ -376,37 +251,9 @@ private Response getSetting(ConfigurationSetting setting, * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting deleteSetting(String key) { - return deleteSetting(new ConfigurationSetting().setKey(key), Context.NONE).getValue(); - } - - /** - * Deletes the {@link ConfigurationSetting} with a matching key, along with the given label and etag. - * - * If {@link ConfigurationSetting#getETag() etag} is specified and is not the wildcard character ({@code "*"}), then - * the setting is only deleted if the etag matches the current etag; this means that no one has updated the - * ConfigurationSetting yet. - * - *

Code Samples

- * - *

Delete the setting with the key "prodDBConnection".

- * - * {@codesnippet com.azure.data.applicationconfig.configurationclient.deleteSetting#ConfigurationSetting} - * - * @param setting The ConfigurationSetting to delete. - * @return The deleted ConfigurationSetting or {@code null} if didn't exist. {@code null} is also returned if the - * {@code key} is an invalid value or {@link ConfigurationSetting#getETag() etag} is set but does not match the - * current etag (which will also throw ServiceRequestException described below). - * @throws IllegalArgumentException If {@link ConfigurationSetting#getKey() key} is {@code null}. - * @throws NullPointerException When {@code setting} is {@code null}. - * @throws ResourceModifiedException If the ConfigurationSetting is locked. - * @throws ResourceNotFoundException If {@link ConfigurationSetting#getETag() etag} is specified, not the wildcard - * character, and does not match the current etag value. - * @throws HttpResponseException If {@code key} is an empty string. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSetting deleteSetting(ConfigurationSetting setting) { - return deleteSetting(setting, Context.NONE).getValue(); + public ConfigurationSetting deleteSetting(String key, String label) { + return deleteSettingWithResponse(new ConfigurationSetting().setKey(key).setLabel(label), + false, Context.NONE).getValue(); } /** @@ -420,9 +267,11 @@ public ConfigurationSetting deleteSetting(ConfigurationSetting setting) { * *

Delete the setting with the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-Context} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-boolean-Context} * * @param setting The ConfigurationSetting to delete. + * @param ifUnchanged A boolean indicator to decide using setting's ETag value as IF-MATCH value. + * If false, set IF_MATCH to {@code null}. Otherwise, set the setting's ETag value to IF_MATCH. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A REST response containing the deleted ConfigurationSetting or {@code null} if didn't exist. {@code null} * is also returned if the {@code key} is an invalid value or {@link ConfigurationSetting#getETag() etag} is set but @@ -435,12 +284,9 @@ public ConfigurationSetting deleteSetting(ConfigurationSetting setting) { * @throws HttpResponseException If {@code key} is an empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteSettingWithResponse(ConfigurationSetting setting, Context context) { - return deleteSetting(setting, context); - } - - private Response deleteSetting(ConfigurationSetting setting, Context context) { - return client.deleteSetting(setting, context).block(); + public Response deleteSettingWithResponse(ConfigurationSetting setting, boolean ifUnchanged, + Context context) { + return client.deleteSetting(setting, ifUnchanged, context).block(); } /** diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java index a2818b00ac67..b2af41ab12dc 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java @@ -82,14 +82,13 @@ public final class ConfigurationClientBuilder { private HttpClient httpClient; private HttpLogDetailLevel httpLogDetailLevel; private HttpPipeline pipeline; - private final RetryPolicy retryPolicy; + private RetryPolicy retryPolicy; private Configuration configuration; /** * The constructor with defaults. */ public ConfigurationClientBuilder() { - retryPolicy = new RetryPolicy(); httpLogDetailLevel = HttpLogDetailLevel.NONE; policies = new ArrayList<>(); @@ -98,6 +97,7 @@ public ConfigurationClientBuilder() { .put(CONTENT_TYPE_HEADER, CONTENT_TYPE_HEADER_VALUE) .put(ACCEPT_HEADER, ACCEPT_HEADER_VALUE); } + /** * Creates a {@link ConfigurationClient} based on options set in the Builder. Every time {@code buildClient()} is * called a new instance of {@link ConfigurationClient} is created. @@ -160,7 +160,7 @@ public ConfigurationAsyncClient buildAsyncClient() { policies.add(new ConfigurationCredentialsPolicy(buildCredential)); HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); @@ -279,6 +279,19 @@ public ConfigurationClientBuilder configuration(Configuration configuration) { return this; } + /** + * Sets the {@link RetryPolicy} that is used when each request is sent. + * + * The default retry policy will be used if not provided {@link ConfigurationClientBuilder#buildAsyncClient()} + * to build {@link ConfigurationAsyncClient} or {@link ConfigurationClient}. + * @param retryPolicy RetryPolicy applied to each request. + * @return The updated ConfigurationClientBuilder object. + */ + public ConfigurationClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + private ConfigurationClientCredentials getConfigurationCredentials(Configuration configuration) { String connectionString = configuration.get("AZURE_APPCONFIG_CONNECTION_STRING"); if (ImplUtils.isNullOrEmpty(connectionString)) { diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java index eb94c806a724..bb4b15a3ab36 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java @@ -103,7 +103,7 @@ public Mono> getAuthorizationHeadersAsync(URL url, String ht private static class AuthorizationHeaderProvider { private final String signedHeadersValue = String.join(";", SIGNED_HEADERS); - private static final String HMAC_SHA256 = "HMAC-SHA256 Credential=%s, SignedHeaders=%s, Signature=%s"; + private static final String HMAC_SHA256 = "HMAC-SHA256 Credential=%s&SignedHeaders=%s&Signature=%s"; private final CredentialInformation credentials; private final Mac sha256HMAC; diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java index d948c591b3d4..2e5876f73a95 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.data.appconfiguration.models; +import com.azure.core.util.ExpandableStringEnum; import com.azure.data.appconfiguration.ConfigurationAsyncClient; import java.util.Locale; @@ -12,40 +13,39 @@ * @see SettingSelector * @see ConfigurationAsyncClient */ -public enum SettingFields { +public final class SettingFields extends ExpandableStringEnum { /** * Populates the {@link ConfigurationSetting#getKey()} from the service. */ - KEY, + public static final SettingFields KEY = fromString("KEY"); /** * Populates the {@link ConfigurationSetting#getLabel()} from the service. */ - LABEL, + public static final SettingFields LABEL = fromString("LABEL"); /** * Populates the {@link ConfigurationSetting#getValue()} from the service. */ - VALUE, + public static final SettingFields VALUE = fromString("VALUE"); /** * Populates the {@link ConfigurationSetting#getContentType()} from the service. */ - CONTENT_TYPE, + public static final SettingFields CONTENT_TYPE = fromString("CONTENT_TYPE"); /** * Populates the {@link ConfigurationSetting#getETag()} from the service. */ - ETAG, + public static final SettingFields ETAG = fromString("ETAG"); /** * Populates the {@link ConfigurationSetting#getLastModified()} from the service. */ - LAST_MODIFIED, + public static final SettingFields LAST_MODIFIED = fromString("LAST_MODIFIED"); /** * Populates the {@link ConfigurationSetting#isLocked()} from the service. */ - LOCKED, + public static final SettingFields LOCKED = fromString("LOCKED"); /** * Populates the {@link ConfigurationSetting#getTags()} from the service. */ - TAGS; - + public static final SettingFields TAGS = fromString("TAGS"); /** * Converts the SettingFields to a string that is usable for HTTP requests and logging. * @param field SettingFields to map. @@ -54,4 +54,12 @@ public enum SettingFields { public static String toStringMapper(SettingFields field) { return field.toString().toLowerCase(Locale.US); } + /** + * Creates or finds a {@link SettingFields} from its string representation. + * @param name a name to look for + * @return the corresponding {@link SettingFields} + */ + public static SettingFields fromString(String name) { + return fromString(name, SettingFields.class); + } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java index 353404648ff2..ca76bc60c170 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationAsyncClientJavaDocCodeSnippets.java @@ -11,28 +11,30 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; + /** * Code snippets for {@link ConfigurationAsyncClient} */ public class ConfigurationAsyncClientJavaDocCodeSnippets { + private static final String NO_LABEL = null; private String key1 = "key1"; private String key2 = "key2"; private String value1 = "val1"; private String value2 = "val2"; /** - * Code snippets for {@link ConfigurationAsyncClient#addSetting(String, String)} + * Code snippets for {@link ConfigurationAsyncClient#addSetting(String, String, String)} */ public void addSettingsCodeSnippet() { ConfigurationAsyncClient client = getAsyncClient(); - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string - client.addSetting("prodDBConnection", "db_connection") + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string-string + client.addSetting("prodDBConnection", "db_connection", null) .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string + .subscribe(response -> System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue())); + // END: com.azure.data.appconfiguration.configurationasyncclient.addSetting#string-string-string /** * Code snippets for {@link ConfigurationAsyncClient#addSettins(ConfigurationSetting)} @@ -60,46 +62,25 @@ public void addSettingsCodeSnippet() { } /** - * Code snippets for {@link ConfigurationAsyncClient#setSetting(String, String)} + * Code snippets for {@link ConfigurationAsyncClient#setSetting(String, String, String)} */ public void setSettingsCodeSnippet() { ConfigurationAsyncClient client = getAsyncClient(); - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string - client.setSetting("prodDBConnection", "db_connection") + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string-string + client.setSetting("prodDBConnection", NO_LABEL, "db_connection") .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); + .subscribe(response -> System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue())); // Update the value of the setting to "updated_db_connection" - client.setSetting("prodDBConnection", "updated_db_connection") - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string + client.setSetting("prodDBConnection", NO_LABEL, "updated_db_connection") + .subscribe(response -> System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue())); + // END: com.azure.data.appconfiguration.configurationasyncclient.setSetting#string-string-string /** - * Code snippets for {@link ConfigurationAsyncClient#setSetting(ConfigurationSetting)} + * Code snippets for {@link ConfigurationAsyncClient#setSettingWithResponse(ConfigurationSetting, boolean)} */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.setSetting#ConfigurationSetting - client.setSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection")) - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // Update the value of the setting to "updated_db_connection" - client.setSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection")) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.setSetting#ConfigurationSetting - - /** - * Code snippets for {@link ConfigurationAsyncClient#setSettingWithResponse(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting-boolean client.setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("db_connection")) + .setValue("db_connection"), false) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(response -> { ConfigurationSetting result = response.getValue(); @@ -107,82 +88,33 @@ public void setSettingsCodeSnippet() { }); // Update the value of the setting to "updated_db_connection" client.setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection")) - .subscribe(response -> { - ConfigurationSetting responseSetting = response.getValue(); - System.out.printf("Key: %s, Value: %s", responseSetting.getKey(), responseSetting.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting - } - - /** - * Code snippets for {@link ConfigurationAsyncClient#updateSetting(String, String)} - */ - public void updateSettingsCodeSnippet() { - ConfigurationAsyncClient client = getAsyncClient(); - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.updateSetting#string-string - client.updateSetting("prodDBConnection", "updated_db_connection") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.updateSetting#string-string - - /** - * Code snippets for {@link ConfigurationAsyncClient#updateSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.updateSetting#ConfigurationSetting - client.updateSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection")) - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.updateSetting#ConfigurationSetting - - /** - * Code snippets for {@link ConfigurationAsyncClient#updateSettingWithResponse(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.updateSettingWithResponse#ConfigurationSetting - client.updateSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection")) - .subscriberContext(Context.of(key1, value1, key2, value2)) + .setValue("updated_db_connection"), false) .subscribe(response -> { ConfigurationSetting responseSetting = response.getValue(); System.out.printf("Key: %s, Value: %s", responseSetting.getKey(), responseSetting.getValue()); }); - // END: com.azure.data.appconfiguration.configurationasyncclient.updateSettingWithResponse#ConfigurationSetting + // END: com.azure.data.appconfiguration.configurationasyncclient.setSettingWithResponse#ConfigurationSetting-boolean } /** - * Code snippets for {@link ConfigurationAsyncClient#getSetting(String)} + * Code snippets for {@link ConfigurationAsyncClient#getSetting(String, String, OffsetDateTime)} */ public void getSettingsCodeSnippet() { ConfigurationAsyncClient client = getAsyncClient(); - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.getSetting#string - client.getSetting("prodDBConnection") + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.getSetting#string-string-OffsetDateTime + client.getSetting("prodDBConnection", null, OffsetDateTime.now(ZoneOffset.UTC).minusMinutes(1)) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(response -> { System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); }); - // END: com.azure.data.appconfiguration.configurationasyncclient.getSetting#string - - /** - * Code snippets for {@link ConfigurationAsyncClient#getSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.getSetting#ConfigurationSetting - client.getSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")) - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.getSetting#ConfigurationSetting + // END: com.azure.data.appconfiguration.configurationasyncclient.getSetting#string-string-OffsetDateTime /** * Code snippets for {@link ConfigurationAsyncClient#getSettingWithResponse(String, String)} */ // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.getSettingWithResponse#ConfigurationSetting - client.getSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")) + client.getSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS"), null, + false) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(response -> { ConfigurationSetting result = response.getValue(); @@ -192,40 +124,27 @@ public void getSettingsCodeSnippet() { } /** - * Code snippets for {@link ConfigurationAsyncClient#deleteSetting(String)} + * Code snippets for {@link ConfigurationAsyncClient#deleteSetting(String, String)} */ public void deleteSettingsCodeSnippet() { ConfigurationAsyncClient client = getAsyncClient(); - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string - client.deleteSetting("prodDBConnection") - .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string - - /** - * Code snippets for {@link ConfigurationAsyncClient#deleteSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#ConfigurationSetting - client.deleteSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")) + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string-string + client.deleteSetting("prodDBConnection", null) .subscriberContext(Context.of(key1, value1, key2, value2)) - .subscribe(response -> { - System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue()); - }); - // END: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#ConfigurationSetting + .subscribe(response -> System.out.printf("Key: %s, Value: %s", response.getKey(), response.getValue())); + // END: com.azure.data.appconfiguration.configurationasyncclient.deleteSetting#string-string /** - * Code snippets for {@link ConfigurationAsyncClient#deleteSettingWithResponse(String, String)} + * Code snippets for {@link ConfigurationAsyncClient#deleteSettingWithResponse(ConfigurationSetting, boolean)} */ - // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting - client.deleteSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")) + // BEGIN: com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting-boolean + client.deleteSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS"), false) .subscriberContext(Context.of(key1, value1, key2, value2)) .subscribe(response -> { - ConfigurationSetting result = response.getValue(); - System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); + final ConfigurationSetting responseSetting = response.getValue(); + System.out.printf("Key: %s, Value: %s", responseSetting.getKey(), responseSetting.getValue()); }); - // END: com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting + // END: com.azure.data.appconfiguration.configurationasyncclient.deleteSettingWithResponse#ConfigurationSetting-boolean } /** diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java index 7cdcb70512ac..224b9281aec5 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java @@ -12,6 +12,7 @@ import com.azure.data.appconfiguration.models.SettingSelector; import java.security.GeneralSecurityException; +import java.time.OffsetDateTime; /** * This class contains code samples for generating javadocs through doclets for {@link ConfigurationClient} @@ -90,25 +91,15 @@ public ConfigurationClient createSyncConfigurationClient() { } /** - * Generates code sample for using {@link ConfigurationClient#addSetting(String, String)} + * Generates code sample for using {@link ConfigurationClient#addSetting(String, String, String)} */ public void addSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String + // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String-String ConfigurationSetting result = configurationClient - .addSetting("prodDBConnection", "db_connection"); + .addSetting("prodDBConnection", "db_connection", null); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String - - /* - Generates code sample for using {@link ConfigurationClient#addSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting - ConfigurationSetting resultSetting = configurationClient - .addSetting( - new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting + // END: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String-String /* Generates code sample for using {@link ConfigurationClient#addSettingWithResponse(ConfigurationSetting, Context)} @@ -125,157 +116,96 @@ public void addSetting() { } /** - * Generates code sample for using {@link ConfigurationClient#setSetting(String, String)} + * Generates code sample for using {@link ConfigurationClient#setSetting(String, String, String)} */ public void setSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String + // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String-String ConfigurationSetting result = configurationClient - .setSetting("prodDBConnection", "db_connection"); + .setSetting("prodDBConnection", null, "db_connection"); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); // Update the value of the setting to "updated_db_connection". - result = configurationClient.setSetting("prodDBConnection", "updated_db_connection"); + result = configurationClient.setSetting("prodDBConnection", null, "updated_db_connection"); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String - - /* - Generates code sample for using {@link ConfigurationClient#setSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting - // Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection" - ConfigurationSetting resultSetting = configurationClient - .setSetting( - new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - - // Update the value of the setting to "updated_db_connection". - resultSetting = configurationClient - .setSetting(new ConfigurationSetting() - .setKey("prodDBConnection").setLabel("westUS").setValue("updated_db_connection")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting + // END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String-String - /* - Generates code sample for using {@link ConfigurationClient#setSettingWithResponse(ConfigurationSetting, Context)} + /** + Generates code sample for using {@link ConfigurationClient#setSettingWithResponse(ConfigurationSetting, boolean, Context)} */ - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context + // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-boolean-Context // Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection" - Response responseSetting = configurationClient - .setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("db_connection"), new Context(key2, value2)); - System.out - .printf("Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); + Response responseSetting = configurationClient.setSettingWithResponse( + new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection"), + false, + new Context(key2, value2)); + final ConfigurationSetting initSetting = responseSetting.getValue(); + System.out.printf("Key: %s, Value: %s", initSetting.getKey(), initSetting.getValue()); // Update the value of the setting to "updated_db_connection". - responseSetting = configurationClient - .setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection"), new Context(key2, value2)); - System.out - .printf("Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context + responseSetting = configurationClient.setSettingWithResponse( + new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("updated_db_connection"), + false, + new Context(key2, value2)); + final ConfigurationSetting updatedSetting = responseSetting.getValue(); + System.out.printf("Key: %s, Value: %s", updatedSetting.getKey(), updatedSetting.getValue()); + // END: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-boolean-Context } /** - * Generates code sample for using {@link ConfigurationClient#getSetting(String)} + * Generates code sample for using {@link ConfigurationClient#getSetting(String, String)} */ public void getSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.applicationconfig.configurationclient.getSetting#string - ConfigurationSetting result = configurationClient.getSetting("prodDBConnection"); - System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); - // END: com.azure.data.applicationconfig.configurationclient.getSetting#string - /* - Generates code sample for using {@link ConfigurationClient#getSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.getSetting#ConfigurationSetting - // Retrieve the setting with the key-label "prodDBConnection"-"westUS". - ConfigurationSetting resultSetting = configurationClient - .getSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - // END: com.azure.data.applicationconfig.configurationclient.getSetting#ConfigurationSetting - - /* - Generates code sample for using {@link ConfigurationClient#getSettingWithResponse(ConfigurationSetting, Context)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-Context - // Retrieve the setting with the key-label "prodDBConnection"-"westUS". - Response responseResultSetting = configurationClient - .getSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS"), - new Context(key1, value1)); - System.out.printf("Key: %s, Value: %s", responseResultSetting.getValue().getKey(), - responseResultSetting.getValue().getValue()); - // END: com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-Context - } + // BEGIN: com.azure.data.applicationconfig.configurationclient.getSetting#string-string + ConfigurationSetting resultNoDateTime = configurationClient.getSetting("prodDBConnection", null); + System.out.printf("Key: %s, Value: %s", resultNoDateTime.getKey(), resultNoDateTime.getValue()); + // END: com.azure.data.applicationconfig.configurationclient.getSetting#string-string /** - * Generates code sample for using {@link ConfigurationClient#updateSetting(String, String)} + * Generates code sample for using {@link ConfigurationClient#getSetting(String, String, OffsetDateTime)} */ - public void updateSetting() { - ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String - // Update a setting with the key "prodDBConnection" to have the value "updated_db_connection". - ConfigurationSetting result = configurationClient.updateSetting("prodDBConnection", "updated_db_connection"); + // BEGIN: com.azure.data.applicationconfig.configurationclient.getSetting#string-string-OffsetDateTime + ConfigurationSetting result = configurationClient.getSetting("prodDBConnection", null, null); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); - // END: com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String - - /* - Generates code sample for using {@link ConfigurationClient#updateSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.updateSetting#ConfigurationSetting - // Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value "updated_db_connection". - ConfigurationSetting resultSetting = configurationClient - .updateSetting( - new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - // END: com.azure.data.applicationconfig.configurationclient.updateSetting#ConfigurationSetting + // END: com.azure.data.applicationconfig.configurationclient.getSetting#string-string-OffsetDateTime - /* - Generates code sample for using {@link ConfigurationClient#updateSettingWithResponse(ConfigurationSetting, Context)} + /** + Generates code sample for using {@link ConfigurationClient#getSettingWithResponse(ConfigurationSetting, boolean, Context)} */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.updateSettingWithResponse#ConfigurationSetting-Context - // Update the setting with the key-label pair "prodDBConnection"-"westUS" to have the value "updated_db_connection". + // BEGIN: com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-boolean-Context + // Retrieve the setting with the key-label "prodDBConnection"-"westUS". Response responseResultSetting = configurationClient - .updateSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") - .setValue("updated_db_connection"), new Context(key1, value1)); + .getSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS"), false, + new Context(key1, value1)); System.out.printf("Key: %s, Value: %s", responseResultSetting.getValue().getKey(), responseResultSetting.getValue().getValue()); - // END: com.azure.data.applicationconfig.configurationclient.updateSettingWithResponse#ConfigurationSetting-Context + // END: com.azure.data.applicationconfig.configurationclient.getSettingWithResponse#ConfigurationSetting-boolean-Context } /** - * Generates code sample for using {@link ConfigurationClient#deleteSetting(String)} + * Generates code sample for using {@link ConfigurationClient#deleteSetting(String, String)} */ public void deleteSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.applicationconfig.configurationclient.deleteSetting#string + // BEGIN: com.azure.data.applicationconfig.configurationclient.deleteSetting#string-string ConfigurationSetting result = configurationClient - .deleteSetting("prodDBConnection"); + .deleteSetting("prodDBConnection", null); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); - // END: com.azure.data.applicationconfig.configurationclient.deleteSetting#string - - /** - * Generates code sample for using {@link ConfigurationClient#addSetting(ConfigurationSetting)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.deleteSetting#ConfigurationSetting - ConfigurationSetting resultSetting = configurationClient - .deleteSetting(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS")); - System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); - // END: com.azure.data.applicationconfig.configurationclient.deleteSetting#ConfigurationSetting + // END: com.azure.data.applicationconfig.configurationclient.deleteSetting#string-string /** * Generates code sample for using {@link ConfigurationClient#deleteSettingWithResponse(ConfigurationSetting, Context)} */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-Context + // BEGIN: com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-boolean-Context Response responseSetting = configurationClient .deleteSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS"), - new Context(key2, value2)); - System.out - .printf("Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); - // END: com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-Context + false, new Context(key2, value2)); + System.out.printf( + "Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); + // END: com.azure.data.applicationconfig.configurationclient.deleteSettingWithResponse#ConfigurationSetting-boolean-Context } /** diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java index cd0cef5638df..81184da586a7 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationSets.java @@ -90,7 +90,7 @@ public static void main(String[] args) throws NoSuchAlgorithmException, InvalidK // Blocking so that the program does not exit before these tasks have completed. Flux.fromArray(new String[]{BETA, PRODUCTION}) .flatMap(set -> client.listSettings(new SettingSelector().setLabels(set))) - .map(client::deleteSetting) + .map(setting -> client.deleteSettingWithResponse(setting, false)) .blockLast(); } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/HelloWorld.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/HelloWorld.java index a19fd58477ed..54165ac74df1 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/HelloWorld.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/HelloWorld.java @@ -40,7 +40,7 @@ public static void main(String[] args) throws NoSuchAlgorithmException, InvalidK // We subscribe and wait for the service call to complete then print out the contents of our newly added setting. // If an error occurs, we print out that error. On completion of the subscription, we delete the setting. // .block() exists there so the program does not end before the deletion has completed. - client.setSetting(key, "world").subscribe( + client.setSetting(key, null, "world").subscribe( result -> { ConfigurationSetting setting = result; System.out.println(String.format("Key: %s, Value: %s", setting.getKey(), setting.getValue())); @@ -48,7 +48,7 @@ public static void main(String[] args) throws NoSuchAlgorithmException, InvalidK error -> System.err.println("There was an error adding the setting: " + error.toString()), () -> { System.out.println("Completed. Deleting setting..."); - client.deleteSetting(key).block(); + client.deleteSetting(key, null).block(); }); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java index f22af1e6eb04..6129331a69f6 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/PipelineSample.java @@ -51,7 +51,7 @@ public static void main(String[] args) throws NoSuchAlgorithmException, Invalid // Adding a couple of settings and then fetching all the settings in our repository. final List settings = Flux.concat(client.addSetting(new ConfigurationSetting().setKey("hello").setValue("world")), - client.setSetting(new ConfigurationSetting().setKey("newSetting").setValue("newValue"))) + client.setSetting("newSetting", null, "newValue")) .then(client.listSettings(new SettingSelector().setKeys("*")).collectList()) .block(); @@ -59,7 +59,8 @@ public static void main(String[] args) throws NoSuchAlgorithmException, Invalid final Stream stream = settings == null ? Stream.empty() : settings.stream(); - Flux.merge(stream.map(client::deleteSetting).collect(Collectors.toList())).blockLast(); + Flux.merge(stream.map(setting -> client.deleteSettingWithResponse(setting, false)) + .collect(Collectors.toList())).blockLast(); // Check what sort of HTTP method calls we made. tracker.print(); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java index 7e693eaeda6f..bb9ac74ebf31 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java @@ -28,7 +28,7 @@ public class ConfigurationAsyncClientTest extends ConfigurationClientTestBase { private final ClientLogger logger = new ClientLogger(ConfigurationAsyncClientTest.class); - + private static final String NO_LABEL = null; private ConfigurationAsyncClient client; @Override @@ -58,7 +58,7 @@ protected void afterTest() { client.listSettings(new SettingSelector().setKeys(keyPrefix + "*")) .flatMap(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - return client.deleteSetting(configurationSetting); + return client.deleteSettingWithResponse(configurationSetting, false); }) .blockLast(); @@ -79,7 +79,7 @@ public void addSetting() { * Tests that we cannot add a configuration setting when the key is an empty string. */ public void addSettingEmptyKey() { - StepVerifier.create(client.addSetting("", "A value")) + StepVerifier.create(client.addSetting("", null, "A value")) .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_BAD_METHOD)); } @@ -88,11 +88,11 @@ public void addSettingEmptyKey() { */ public void addSettingEmptyValue() { addSettingEmptyValueRunner((setting) -> { - StepVerifier.create(client.addSetting(setting.getKey(), setting.getValue())) + StepVerifier.create(client.addSetting(setting.getKey(), setting.getLabel(), setting.getValue())) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); - StepVerifier.create(client.getSetting(setting.getKey())) + StepVerifier.create(client.getSetting(setting.getKey(), setting.getLabel(), null)) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); }); @@ -102,7 +102,7 @@ public void addSettingEmptyValue() { * Verifies that an exception is thrown when null key is passed. */ public void addSettingNullKey() { - assertRunnableThrowsException(() -> client.addSetting(null, "A Value").block(), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.addSetting(null, null, "A Value").block(), IllegalArgumentException.class); assertRunnableThrowsException(() -> client.addSetting(null).block(), NullPointerException.class); } @@ -121,7 +121,7 @@ public void addExistingSetting() { */ public void setSetting() { setSettingRunner((expected, update) -> - StepVerifier.create(client.setSetting(expected)) + StepVerifier.create(client.setSettingWithResponse(expected, false)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete()); } @@ -134,19 +134,19 @@ public void setSetting() { public void setSettingIfEtag() { setSettingIfEtagRunner((initial, update) -> { // This etag is not the correct format. It is not the correct hash that the service is expecting. - StepVerifier.create(client.setSetting(initial.setETag("badEtag"))) + StepVerifier.create(client.setSettingWithResponse(initial.setETag("badEtag"), true)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); final String etag = client.addSetting(initial).block().getETag(); - StepVerifier.create(client.setSetting(update.setETag(etag))) + StepVerifier.create(client.setSettingWithResponse(update.setETag(etag), true)) .assertNext(response -> assertConfigurationEquals(update, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(initial)) + StepVerifier.create(client.setSettingWithResponse(initial, true)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); - StepVerifier.create(client.getSetting(update)) + StepVerifier.create(client.getSettingWithResponse(update, null, false)) .assertNext(response -> assertConfigurationEquals(update, response)) .verifyComplete(); }); @@ -156,7 +156,7 @@ public void setSettingIfEtag() { * Tests that we cannot set a configuration setting when the key is an empty string. */ public void setSettingEmptyKey() { - StepVerifier.create(client.setSetting("", "A value")) + StepVerifier.create(client.setSetting("", NO_LABEL, "A value")) .verifyErrorSatisfies(ex -> assertRestException(ex, HttpURLConnection.HTTP_BAD_METHOD)); } @@ -166,11 +166,11 @@ public void setSettingEmptyKey() { */ public void setSettingEmptyValue() { setSettingEmptyValueRunner((setting) -> { - StepVerifier.create(client.setSetting(setting.getKey(), setting.getValue())) + StepVerifier.create(client.setSetting(setting.getKey(), NO_LABEL, setting.getValue())) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); - StepVerifier.create(client.getSetting(setting.getKey())) + StepVerifier.create(client.getSetting(setting.getKey(), setting.getLabel(), null)) .assertNext(response -> assertConfigurationEquals(setting, response)) .verifyComplete(); }); @@ -180,87 +180,8 @@ public void setSettingEmptyValue() { * Verifies that an exception is thrown when null key is passed. */ public void setSettingNullKey() { - assertRunnableThrowsException(() -> client.setSetting(null, "A Value").block(), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.setSetting(null).block(), NullPointerException.class); - } - - /** - * Tests that update cannot be done to a non-existent configuration, this will result in a 412. - * Unlike set update isn't able to create the configuration. - */ - public void updateNoExistingSetting() { - updateNoExistingSettingRunner((expected) -> - StepVerifier.create(client.updateSetting(expected)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED))); - } - - /** - * Tests that a configuration is able to be updated when it exists. - * When the configuration is locked updates cannot happen, this will result in a 409. - */ - public void updateSetting() { - updateSettingRunner((initial, update) -> - StepVerifier.create(client.addSetting(initial)) - .assertNext(response -> assertConfigurationEquals(initial, response)) - .verifyComplete()); - } - - /** - * Tests that a configuration is able to be updated when it exists with the convenience overload. - * When the configuration is locked updates cannot happen, this will result in a 409. - */ - public void updateSettingOverload() { - updateSettingOverloadRunner((original, updated) -> { - StepVerifier.create(client.addSetting(original.getKey(), original.getValue())) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); - - StepVerifier.create(client.updateSetting(updated.getKey(), updated.getValue())) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .verifyComplete(); - }); - } - - /** - * Verifies that an exception is thrown when null key is passed. - */ - public void updateSettingNullKey() { - assertRunnableThrowsException(() -> client.updateSetting(null, "A Value").block(), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.updateSetting(null).block(), NullPointerException.class); - } - - /** - * Tests that when an etag is passed to update it will only update if the current representation of the setting has the etag. - * If the update etag doesn't match anything the update won't happen, this will result in a 412. - */ - public void updateSettingIfEtag() { - updateSettingIfEtagRunner(settings -> { - final ConfigurationSetting initial = settings.get(0); - final ConfigurationSetting update = settings.get(1); - final ConfigurationSetting last = settings.get(2); - - final String initialEtag = client.addSetting(initial).block().getETag(); - final String updateEtag = client.updateSetting(update).block().getETag(); - - // The setting does not exist in the service yet, so we cannot update it. - StepVerifier.create(client.updateSetting(new ConfigurationSetting().setKey(last.getKey()).setLabel(last.getLabel()).setValue(last.getValue()).setETag(initialEtag))) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); - - StepVerifier.create(client.getSetting(update)) - .assertNext(response -> assertConfigurationEquals(update, response)) - .verifyComplete(); - - StepVerifier.create(client.updateSetting(new ConfigurationSetting().setKey(last.getKey()).setLabel(last.getLabel()).setValue(last.getValue()).setETag(updateEtag))) - .assertNext(response -> assertConfigurationEquals(last, response)) - .verifyComplete(); - - StepVerifier.create(client.getSetting(last)) - .assertNext(response -> assertConfigurationEquals(last, response)) - .verifyComplete(); - - StepVerifier.create(client.updateSetting(new ConfigurationSetting().setKey(initial.getKey()).setLabel(initial.getLabel()).setValue(initial.getValue()).setETag(updateEtag))) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); - }); + assertRunnableThrowsException(() -> client.setSetting(null, NO_LABEL, "A Value").block(), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.setSettingWithResponse(null, false).block(), NullPointerException.class); } /** @@ -268,7 +189,7 @@ public void updateSettingIfEtag() { */ public void getSetting() { getSettingRunner((expected) -> - StepVerifier.create(client.addSetting(expected).then(client.getSetting(expected))) + StepVerifier.create(client.addSetting(expected).then(client.getSettingWithResponse(expected, null, false))) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete()); } @@ -285,11 +206,11 @@ public void getSettingNotFound() { .assertNext(response -> assertConfigurationEquals(neverRetrievedConfiguration, response)) .verifyComplete(); - StepVerifier.create(client.getSetting("myNonExistentKey")) + StepVerifier.create(client.getSetting("myNonExistentKey", null, null)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); - StepVerifier.create(client.getSetting(nonExistentLabel)) + StepVerifier.create(client.getSettingWithResponse(nonExistentLabel, null, false)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); } @@ -300,15 +221,15 @@ public void getSettingNotFound() { */ public void deleteSetting() { deleteSettingRunner((expected) -> { - StepVerifier.create(client.addSetting(expected).then(client.getSetting(expected))) + StepVerifier.create(client.addSetting(expected).then(client.getSettingWithResponse(expected, null, false))) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - StepVerifier.create(client.deleteSetting(expected)) + StepVerifier.create(client.deleteSettingWithResponse(expected, false)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); - StepVerifier.create(client.getSetting(expected)) + StepVerifier.create(client.getSettingWithResponse(expected, null, false)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); }); } @@ -324,15 +245,15 @@ public void deleteSettingNotFound() { .assertNext(response -> assertConfigurationEquals(neverDeletedConfiguration, response)) .verifyComplete(); - StepVerifier.create(client.deleteSettingWithResponse(new ConfigurationSetting().setKey("myNonExistentKey"))) + StepVerifier.create(client.deleteSettingWithResponse(new ConfigurationSetting().setKey("myNonExistentKey"), false)) .assertNext(response -> assertConfigurationEquals(null, response, HttpURLConnection.HTTP_NO_CONTENT)) .verifyComplete(); - StepVerifier.create(client.deleteSettingWithResponse(new ConfigurationSetting().setKey(neverDeletedConfiguration.getKey()).setLabel("myNonExistentLabel"))) + StepVerifier.create(client.deleteSettingWithResponse(new ConfigurationSetting().setKey(neverDeletedConfiguration.getKey()).setLabel("myNonExistentLabel"), false)) .assertNext(response -> assertConfigurationEquals(null, response, HttpURLConnection.HTTP_NO_CONTENT)) .verifyComplete(); - StepVerifier.create(client.getSetting(neverDeletedConfiguration.getKey())) + StepVerifier.create(client.getSetting(neverDeletedConfiguration.getKey(), neverDeletedConfiguration.getLabel(), null)) .assertNext(response -> assertConfigurationEquals(neverDeletedConfiguration, response)) .verifyComplete(); } @@ -344,20 +265,20 @@ public void deleteSettingNotFound() { public void deleteSettingWithETag() { deleteSettingWithETagRunner((initial, update) -> { final ConfigurationSetting initiallyAddedConfig = client.addSetting(initial).block(); - final ConfigurationSetting updatedConfig = client.updateSetting(update).block(); + final ConfigurationSetting updatedConfig = client.setSettingWithResponse(update, true).block().getValue(); - StepVerifier.create(client.getSetting(initial)) + StepVerifier.create(client.getSettingWithResponse(initial, null, false)) .assertNext(response -> assertConfigurationEquals(update, response)) .verifyComplete(); - StepVerifier.create(client.deleteSetting(initiallyAddedConfig)) + StepVerifier.create(client.deleteSettingWithResponse(initiallyAddedConfig, true)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED)); - StepVerifier.create(client.deleteSetting(updatedConfig)) + StepVerifier.create(client.deleteSettingWithResponse(updatedConfig, true)) .assertNext(response -> assertConfigurationEquals(update, response)) .verifyComplete(); - StepVerifier.create(client.getSetting(initial)) + StepVerifier.create(client.getSettingWithResponse(initial, null, false)) .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND)); }); } @@ -366,8 +287,8 @@ public void deleteSettingWithETag() { * Test the API will not make a delete call without having a key passed, an IllegalArgumentException should be thrown. */ public void deleteSettingNullKey() { - assertRunnableThrowsException(() -> client.deleteSetting((String) null).block(), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.deleteSetting((ConfigurationSetting) null).block(), NullPointerException.class); + assertRunnableThrowsException(() -> client.deleteSetting(null, null).block(), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.deleteSettingWithResponse(null, false).block(), NullPointerException.class); } /** @@ -380,7 +301,7 @@ public void listWithKeyAndLabel() { final String label = testResourceNamer.randomName("lbl", 8); final ConfigurationSetting expected = new ConfigurationSetting().setKey(key).setValue(value).setLabel(label); - StepVerifier.create(client.setSetting(expected)) + StepVerifier.create(client.setSettingWithResponse(expected, false)) .assertNext(response -> assertConfigurationEquals(expected, response)) .verifyComplete(); @@ -457,7 +378,7 @@ public void listSettingsSelectFields() { listSettingsSelectFieldsRunner((settings, selector) -> { final List>> settingsBeingAdded = new ArrayList<>(); for (ConfigurationSetting setting : settings) { - settingsBeingAdded.add(client.setSettingWithResponse(setting)); + settingsBeingAdded.add(client.setSettingWithResponse(setting, false)); } // Waiting for all the settings to be added. @@ -483,13 +404,13 @@ public void listSettingsAcceptDateTime() { final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); // Create 3 revisions of the same key. - StepVerifier.create(client.setSetting(original)) + StepVerifier.create(client.setSettingWithResponse(original, false)) .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated).delayElement(Duration.ofSeconds(2))) + StepVerifier.create(client.setSettingWithResponse(updated, false).delayElement(Duration.ofSeconds(2))) .assertNext(response -> assertConfigurationEquals(updated, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated2)) + StepVerifier.create(client.setSettingWithResponse(updated2, false)) .assertNext(response -> assertConfigurationEquals(updated2, response)) .verifyComplete(); @@ -517,13 +438,13 @@ public void listRevisions() { final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); // Create 3 revisions of the same key. - StepVerifier.create(client.setSetting(original)) + StepVerifier.create(client.setSettingWithResponse(original, false)) .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated)) + StepVerifier.create(client.setSettingWithResponse(updated, false)) .assertNext(response -> assertConfigurationEquals(updated, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated2)) + StepVerifier.create(client.setSettingWithResponse(updated2, false)) .assertNext(response -> assertConfigurationEquals(updated2, response)) .verifyComplete(); @@ -556,7 +477,7 @@ public void listRevisionsWithMultipleKeys() { .assertNext(response -> assertConfigurationEquals(testInput.get(0), response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(testInput.get(1))) + StepVerifier.create(client.setSettingWithResponse(testInput.get(1), false)) .assertNext(response -> assertConfigurationEquals(testInput.get(1), response)) .verifyComplete(); @@ -564,7 +485,7 @@ public void listRevisionsWithMultipleKeys() { .assertNext(response -> assertConfigurationEquals(testInput.get(2), response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(testInput.get(3))) + StepVerifier.create(client.setSettingWithResponse(testInput.get(3), false)) .assertNext(response -> assertConfigurationEquals(testInput.get(3), response)) .verifyComplete(); @@ -594,7 +515,7 @@ public void listRevisionsWithMultipleLabels() { .assertNext(response -> assertConfigurationEquals(testInput.get(0), response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(testInput.get(1))) + StepVerifier.create(client.setSettingWithResponse(testInput.get(1), false)) .assertNext(response -> assertConfigurationEquals(testInput.get(1), response)) .verifyComplete(); @@ -602,7 +523,7 @@ public void listRevisionsWithMultipleLabels() { .assertNext(response -> assertConfigurationEquals(testInput.get(2), response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(testInput.get(3))) + StepVerifier.create(client.setSettingWithResponse(testInput.get(3), false)) .assertNext(response -> assertConfigurationEquals(testInput.get(3), response)) .verifyComplete(); @@ -630,11 +551,11 @@ public void listRevisionsWithRange() { .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(updated)) + StepVerifier.create(client.setSettingWithResponse(updated, false)) .assertNext(response -> assertConfigurationEquals(updated, response)) .verifyComplete(); - StepVerifier.create(client.updateSetting(updated2)) + StepVerifier.create(client.setSettingWithResponse(updated2, false)) .assertNext(response -> assertConfigurationEquals(updated2, response)) .verifyComplete(); @@ -669,13 +590,13 @@ public void listRevisionsAcceptDateTime() { final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); // Create 3 revisions of the same key. - StepVerifier.create(client.setSetting(original)) + StepVerifier.create(client.setSettingWithResponse(original, false)) .assertNext(response -> assertConfigurationEquals(original, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated).delayElement(Duration.ofSeconds(2))) + StepVerifier.create(client.setSettingWithResponse(updated, false).delayElement(Duration.ofSeconds(2))) .assertNext(response -> assertConfigurationEquals(updated, response)) .verifyComplete(); - StepVerifier.create(client.setSetting(updated2)) + StepVerifier.create(client.setSettingWithResponse(updated2, false)) .assertNext(response -> assertConfigurationEquals(updated2, response)) .verifyComplete(); @@ -707,7 +628,7 @@ public void listRevisionsWithPagination() { List>> results = new ArrayList<>(); for (ConfigurationSetting setting : settings) { - results.add(client.setSettingWithResponse(setting)); + results.add(client.setSettingWithResponse(setting, false)); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -729,7 +650,7 @@ public void listRevisionsWithPaginationAndRepeatStream() { for (int value = 0; value < numberExpected; value++) { ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix); settings.add(setting); - results.add(client.setSettingWithResponse(setting)); + results.add(client.setSettingWithResponse(setting, false)); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -758,7 +679,7 @@ public void listRevisionsWithPaginationAndRepeatIterator() { for (int value = 0; value < numberExpected; value++) { ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix); settings.add(setting); - results.add(client.setSettingWithResponse(setting)); + results.add(client.setSettingWithResponse(setting, false)); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -788,7 +709,7 @@ public void listSettingsWithPagination() { List>> results = new ArrayList<>(); for (ConfigurationSetting setting : settings) { - results.add(client.setSettingWithResponse(setting)); + results.add(client.setSettingWithResponse(setting, false)); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix + "-*").setLabels(labelPrefix); @@ -812,7 +733,7 @@ public void getSettingWhenValueNotUpdated() { assertNotNull(block); assertConfigurationEquals(expected, block); - StepVerifier.create(client.setSetting(newExpected)) + StepVerifier.create(client.setSettingWithResponse(newExpected, false)) .assertNext(response -> assertConfigurationEquals(newExpected, response)) .verifyComplete(); } @@ -821,7 +742,7 @@ public void deleteAllSettings() { client.listSettings(new SettingSelector().setKeys("*")) .flatMap(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - return client.deleteSetting(configurationSetting); + return client.deleteSettingWithResponse(configurationSetting, false); }).blockLast(); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java index bdcb9ff0d0f2..2795414236c1 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java @@ -56,7 +56,7 @@ protected void afterTest() { logger.info("Cleaning up created key values."); client.listSettings(new SettingSelector().setKeys(keyPrefix + "*")).forEach(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - client.deleteSetting(configurationSetting); + client.deleteSettingWithResponse(configurationSetting, false, Context.NONE).getValue(); }); logger.info("Finished cleaning up values."); @@ -66,14 +66,14 @@ protected void afterTest() { * Tests that a configuration is able to be added, these are differentiate from each other using a key or key-label identifier. */ public void addSetting() { - addSettingRunner((expected) -> assertConfigurationEquals(expected, client.addSetting(expected))); + addSettingRunner((expected) -> assertConfigurationEquals(expected, client.addSettingWithResponse(expected, Context.NONE).getValue())); } /** * Tests that we cannot add a configuration setting when the key is an empty string. */ public void addSettingEmptyKey() { - assertRestException(() -> client.addSetting("", "A value"), HttpURLConnection.HTTP_BAD_METHOD); + assertRestException(() -> client.addSetting("", null, "A value"), HttpURLConnection.HTTP_BAD_METHOD); } /** @@ -81,8 +81,8 @@ public void addSettingEmptyKey() { */ public void addSettingEmptyValue() { addSettingEmptyValueRunner((setting) -> { - assertConfigurationEquals(setting, client.addSetting(setting.getKey(), setting.getValue())); - assertConfigurationEquals(setting, client.getSetting(setting.getKey())); + assertConfigurationEquals(setting, client.addSetting(setting.getKey(), setting.getLabel(), setting.getValue())); + assertConfigurationEquals(setting, client.getSetting(setting.getKey(), setting.getLabel())); }); } @@ -90,8 +90,8 @@ public void addSettingEmptyValue() { * Verifies that an exception is thrown when null key is passed. */ public void addSettingNullKey() { - assertRunnableThrowsException(() -> client.addSetting(null, "A Value"), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.addSetting(null), NullPointerException.class); + assertRunnableThrowsException(() -> client.addSetting(null, null, "A Value"), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.addSettingWithResponse(null, Context.NONE), NullPointerException.class); } /** @@ -99,8 +99,9 @@ public void addSettingNullKey() { */ public void addExistingSetting() { addExistingSettingRunner((expected) -> { - client.addSetting(expected); - assertRestException(() -> client.addSetting(expected), ResourceModifiedException.class, HttpURLConnection.HTTP_PRECON_FAILED); + client.addSettingWithResponse(expected, Context.NONE).getValue(); + assertRestException(() -> client.addSettingWithResponse(expected, Context.NONE).getValue(), + ResourceModifiedException.class, HttpURLConnection.HTTP_PRECON_FAILED); }); } @@ -109,7 +110,7 @@ public void addExistingSetting() { * When the configuration is locked updates cannot happen, this will result in a 409. */ public void setSetting() { - setSettingRunner((expected, update) -> assertConfigurationEquals(expected, client.setSetting(expected))); + setSettingRunner((expected, update) -> assertConfigurationEquals(expected, client.setSettingWithResponse(expected, false, Context.NONE).getValue())); } /** @@ -120,13 +121,13 @@ public void setSetting() { public void setSettingIfEtag() { setSettingIfEtagRunner((initial, update) -> { // This etag is not the correct format. It is not the correct hash that the service is expecting. - assertRestException(() -> client.setSetting(initial.setETag("badEtag")), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertRestException(() -> client.setSettingWithResponse(initial.setETag("badEtag"), true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); - final String etag = client.addSetting(initial).getETag(); + final String etag = client.addSettingWithResponse(initial, Context.NONE).getValue().getETag(); - assertConfigurationEquals(update, client.setSetting(update.setETag(etag))); - assertRestException(() -> client.setSetting(initial), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); - assertConfigurationEquals(update, client.getSetting(update)); + assertConfigurationEquals(update, client.setSettingWithResponse(update.setETag(etag), true, Context.NONE)); + assertRestException(() -> client.setSettingWithResponse(initial, true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertConfigurationEquals(update, client.getSetting(update.getKey(), update.getLabel())); }); } @@ -134,7 +135,7 @@ public void setSettingIfEtag() { * Tests that we cannot set a configuration setting when the key is an empty string. */ public void setSettingEmptyKey() { - assertRestException(() -> client.setSetting("", "A value"), HttpURLConnection.HTTP_BAD_METHOD); + assertRestException(() -> client.setSetting("", null, "A value"), HttpURLConnection.HTTP_BAD_METHOD); } /** @@ -143,8 +144,8 @@ public void setSettingEmptyKey() { */ public void setSettingEmptyValue() { setSettingEmptyValueRunner((setting) -> { - assertConfigurationEquals(setting, client.setSetting(setting.getKey(), setting.getValue())); - assertConfigurationEquals(setting, client.getSetting(setting.getKey())); + assertConfigurationEquals(setting, client.setSetting(setting.getKey(), setting.getLabel(), setting.getValue())); + assertConfigurationEquals(setting, client.getSetting(setting.getKey(), setting.getLabel())); }); } @@ -152,73 +153,8 @@ public void setSettingEmptyValue() { * Verifies that an exception is thrown when null key is passed. */ public void setSettingNullKey() { - assertRunnableThrowsException(() -> client.setSetting(null, "A Value"), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.setSetting(null), NullPointerException.class); - } - - /** - * Tests that update cannot be done to a non-existent configuration, this will result in a 412. - * Unlike set update isn't able to create the configuration. - */ - public void updateNoExistingSetting() { - updateNoExistingSettingRunner((expected) -> - assertRestException(() -> client.updateSetting(expected), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED) - ); - } - - /** - * Tests that a configuration is able to be updated when it exists. - * When the configuration is locked updates cannot happen, this will result in a 409. - */ - public void updateSetting() { - updateSettingRunner((initial, update) -> assertConfigurationEquals(initial, client.addSetting(initial))); - } - - /** - * Tests that a configuration is able to be updated when it exists with the convenience overload. - * When the configuration is locked updates cannot happen, this will result in a 409. - */ - public void updateSettingOverload() { - updateSettingOverloadRunner((original, updated) -> { - assertConfigurationEquals(original, client.addSetting(original.getKey(), original.getValue())); - assertConfigurationEquals(updated, client.updateSetting(updated.getKey(), updated.getValue())); - }); - } - - /** - * Tests that when an etag is passed to update it will only update if the current representation of the setting has the etag. - * If the update etag doesn't match anything the update won't happen, this will result in a 412. - */ - public void updateSettingIfEtag() { - updateSettingIfEtagRunner(settings -> { - final ConfigurationSetting initial = settings.get(0); - final ConfigurationSetting update = settings.get(1); - final ConfigurationSetting last = settings.get(2); - - final String initialEtag = client.addSetting(initial).getETag(); - final String updateEtag = client.updateSetting(update).getETag(); - - // The setting does not exist in the service yet, so we cannot update it. - assertRestException(() -> client.updateSetting(new ConfigurationSetting().setKey(last.getKey()).setLabel(last.getLabel()).setValue(last.getValue()).setETag(initialEtag)), - ResourceNotFoundException.class, - HttpURLConnection.HTTP_PRECON_FAILED); - - assertConfigurationEquals(update, client.getSetting(update)); - assertConfigurationEquals(last, client.updateSetting(new ConfigurationSetting().setKey(last.getKey()).setLabel(last.getLabel()).setValue(last.getValue()).setETag(updateEtag))); - assertConfigurationEquals(last, client.getSetting(last)); - - assertRestException(() -> client.updateSetting(new ConfigurationSetting().setKey(initial.getKey()).setLabel(initial.getLabel()).setValue(initial.getValue()).setETag(updateEtag)), - ResourceNotFoundException.class, - HttpURLConnection.HTTP_PRECON_FAILED); - }); - } - - /** - * Verifies that an exception is thrown when null key is passed. - */ - public void updateSettingNullKey() { - assertRunnableThrowsException(() -> client.updateSetting(null, "A Value"), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.updateSetting(null), NullPointerException.class); + assertRunnableThrowsException(() -> client.setSetting(null, null, "A Value"), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.setSettingWithResponse(null, false, Context.NONE).getValue(), NullPointerException.class); } /** @@ -226,8 +162,8 @@ public void updateSettingNullKey() { */ public void getSetting() { getSettingRunner((expected) -> { - client.addSetting(expected); - assertConfigurationEquals(expected, client.getSetting(expected)); + client.addSettingWithResponse(expected, Context.NONE).getValue(); + assertConfigurationEquals(expected, client.getSetting(expected.getKey(), expected.getLabel())); }); } @@ -239,10 +175,10 @@ public void getSettingNotFound() { final ConfigurationSetting neverRetrievedConfiguration = new ConfigurationSetting().setKey(key).setValue("myNeverRetreivedValue"); final ConfigurationSetting nonExistentLabel = new ConfigurationSetting().setKey(key).setLabel("myNonExistentLabel"); - assertConfigurationEquals(neverRetrievedConfiguration, client.addSetting(neverRetrievedConfiguration)); + assertConfigurationEquals(neverRetrievedConfiguration, client.addSettingWithResponse(neverRetrievedConfiguration, Context.NONE).getValue()); - assertRestException(() -> client.getSetting("myNonExistentKey"), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); - assertRestException(() -> client.getSetting(nonExistentLabel), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + assertRestException(() -> client.getSetting("myNonExistentKey", null, null), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + assertRestException(() -> client.getSetting(nonExistentLabel.getKey(), nonExistentLabel.getLabel()), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); } /** @@ -252,11 +188,11 @@ public void getSettingNotFound() { */ public void deleteSetting() { deleteSettingRunner((expected) -> { - client.addSetting(expected); - assertConfigurationEquals(expected, client.getSetting(expected)); + client.addSettingWithResponse(expected, Context.NONE).getValue(); + assertConfigurationEquals(expected, client.getSetting(expected.getKey(), expected.getLabel())); - assertConfigurationEquals(expected, client.deleteSetting(expected)); - assertRestException(() -> client.getSetting(expected), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + assertConfigurationEquals(expected, client.deleteSettingWithResponse(expected, false, Context.NONE).getValue()); + assertRestException(() -> client.getSetting(expected.getKey(), expected.getLabel()), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); }); } @@ -268,12 +204,12 @@ public void deleteSettingNotFound() { final ConfigurationSetting neverDeletedConfiguation = new ConfigurationSetting().setKey(key).setValue("myNeverDeletedValue"); final ConfigurationSetting notFoundDelete = new ConfigurationSetting().setKey(key).setLabel("myNonExistentLabel"); - assertConfigurationEquals(neverDeletedConfiguation, client.addSetting(neverDeletedConfiguation)); + assertConfigurationEquals(neverDeletedConfiguation, client.addSettingWithResponse(neverDeletedConfiguation, Context.NONE).getValue()); - assertConfigurationEquals(null, client.deleteSetting("myNonExistentKey")); - assertConfigurationEquals(null, client.deleteSettingWithResponse(notFoundDelete, Context.NONE), HttpURLConnection.HTTP_NO_CONTENT); + assertConfigurationEquals(null, client.deleteSetting("myNonExistentKey", null)); + assertConfigurationEquals(null, client.deleteSettingWithResponse(notFoundDelete, false, Context.NONE), HttpURLConnection.HTTP_NO_CONTENT); - assertConfigurationEquals(neverDeletedConfiguation, client.getSetting(neverDeletedConfiguation.getKey())); + assertConfigurationEquals(neverDeletedConfiguation, client.getSetting(neverDeletedConfiguation.getKey(), neverDeletedConfiguation.getLabel())); } /** @@ -282,13 +218,13 @@ public void deleteSettingNotFound() { */ public void deleteSettingWithETag() { deleteSettingWithETagRunner((initial, update) -> { - final ConfigurationSetting initiallyAddedConfig = client.addSetting(initial); - final ConfigurationSetting updatedConfig = client.updateSetting(update); + final ConfigurationSetting initiallyAddedConfig = client.addSettingWithResponse(initial, Context.NONE).getValue(); + final ConfigurationSetting updatedConfig = client.setSettingWithResponse(update, false, Context.NONE).getValue(); - assertConfigurationEquals(update, client.getSetting(initial)); - assertRestException(() -> client.deleteSetting(initiallyAddedConfig), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); - assertConfigurationEquals(update, client.deleteSetting(updatedConfig)); - assertRestException(() -> client.getSetting(initial), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); + assertConfigurationEquals(update, client.getSetting(initial.getKey(), initial.getLabel())); + assertRestException(() -> client.deleteSettingWithResponse(initiallyAddedConfig, true, Context.NONE).getValue(), ResourceNotFoundException.class, HttpURLConnection.HTTP_PRECON_FAILED); + assertConfigurationEquals(update, client.deleteSettingWithResponse(updatedConfig, true, Context.NONE).getValue()); + assertRestException(() -> client.getSetting(initial.getKey(), initial.getLabel()), ResourceNotFoundException.class, HttpURLConnection.HTTP_NOT_FOUND); }); } @@ -296,8 +232,8 @@ public void deleteSettingWithETag() { * Test the API will not make a delete call without having a key passed, an IllegalArgumentException should be thrown. */ public void deleteSettingNullKey() { - assertRunnableThrowsException(() -> client.deleteSetting((String) null), IllegalArgumentException.class); - assertRunnableThrowsException(() -> client.deleteSetting((ConfigurationSetting) null), NullPointerException.class); + assertRunnableThrowsException(() -> client.deleteSetting(null, null), IllegalArgumentException.class); + assertRunnableThrowsException(() -> client.deleteSettingWithResponse(null, false, Context.NONE).getValue(), NullPointerException.class); } /** @@ -311,7 +247,7 @@ public void listWithKeyAndLabel() { final String label = getLabel(); final ConfigurationSetting expected = new ConfigurationSetting().setKey(key).setValue(value).setLabel(label); - assertConfigurationEquals(expected, client.setSetting(expected)); + assertConfigurationEquals(expected, client.setSettingWithResponse(expected, false, Context.NONE).getValue()); assertConfigurationEquals(expected, client.listSettings(new SettingSelector().setKeys(key).setLabels(label)).iterator().next()); assertConfigurationEquals(expected, client.listSettings(new SettingSelector().setKeys(key)).iterator().next()); } @@ -325,8 +261,8 @@ public void listWithMultipleKeys() { String key2 = getKey(); listWithMultipleKeysRunner(key, key2, (setting, setting2) -> { - assertConfigurationEquals(setting, client.addSetting(setting)); - assertConfigurationEquals(setting2, client.addSetting(setting2)); + assertConfigurationEquals(setting, client.addSettingWithResponse(setting, Context.NONE).getValue()); + assertConfigurationEquals(setting2, client.addSettingWithResponse(setting2, Context.NONE).getValue()); return client.listSettings(new SettingSelector().setKeys(key, key2)); }); @@ -342,8 +278,8 @@ public void listWithMultipleLabels() { String label2 = getLabel(); listWithMultipleLabelsRunner(key, label, label2, (setting, setting2) -> { - assertConfigurationEquals(setting, client.addSetting(setting)); - assertConfigurationEquals(setting2, client.addSetting(setting2)); + assertConfigurationEquals(setting, client.addSettingWithResponse(setting, Context.NONE).getValue()); + assertConfigurationEquals(setting2, client.addSettingWithResponse(setting2, Context.NONE).getValue()); return client.listSettings(new SettingSelector().setKeys(key).setLabels(label, label2)); }); @@ -354,7 +290,7 @@ public void listWithMultipleLabels() { */ public void listSettingsSelectFields() { listSettingsSelectFieldsRunner((settings, selector) -> { - settings.forEach(client::setSetting); + settings.forEach(setting -> client.setSettingWithResponse(setting, false, Context.NONE).getValue()); return client.listSettings(selector); }); } @@ -370,11 +306,11 @@ public void listSettingsAcceptDateTime() { // Create 3 revisions of the same key. try { - assertConfigurationEquals(original, client.setSetting(original)); + assertConfigurationEquals(original, client.setSettingWithResponse(original, false, Context.NONE).getValue()); Thread.sleep(2000); - assertConfigurationEquals(updated, client.setSetting(updated)); + assertConfigurationEquals(updated, client.setSettingWithResponse(updated, false, Context.NONE).getValue()); Thread.sleep(2000); - assertConfigurationEquals(updated2, client.setSetting(updated2)); + assertConfigurationEquals(updated2, client.setSettingWithResponse(updated2, false, Context.NONE).getValue()); } catch (InterruptedException ex) { // Do nothing. } @@ -401,9 +337,9 @@ public void listRevisions() { final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); // Create 3 revisions of the same key. - assertConfigurationEquals(original, client.setSetting(original)); - assertConfigurationEquals(updated, client.setSetting(updated)); - assertConfigurationEquals(updated2, client.setSetting(updated2)); + assertConfigurationEquals(original, client.setSettingWithResponse(original, false, Context.NONE).getValue()); + assertConfigurationEquals(updated, client.setSettingWithResponse(updated, false, Context.NONE).getValue()); + assertConfigurationEquals(updated2, client.setSettingWithResponse(updated2, false, Context.NONE).getValue()); // Get all revisions for a key, they are listed in descending order. List revisions = client.listSettingRevisions(new SettingSelector().setKeys(keyName)).stream().collect(Collectors.toList()); @@ -426,10 +362,10 @@ public void listRevisionsWithMultipleKeys() { String key2 = getKey(); listRevisionsWithMultipleKeysRunner(key, key2, (testInput) -> { - assertConfigurationEquals(testInput.get(0), client.addSetting(testInput.get(0))); - assertConfigurationEquals(testInput.get(1), client.updateSetting(testInput.get(1))); - assertConfigurationEquals(testInput.get(2), client.addSetting(testInput.get(2))); - assertConfigurationEquals(testInput.get(3), client.updateSetting(testInput.get(3))); + assertConfigurationEquals(testInput.get(0), client.addSettingWithResponse(testInput.get(0), Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(1), client.setSettingWithResponse(testInput.get(1), false, Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(2), client.addSettingWithResponse(testInput.get(2), Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(3), client.setSettingWithResponse(testInput.get(3), false, Context.NONE).getValue()); return client.listSettingRevisions(new SettingSelector().setKeys(key, key2)); }); @@ -444,10 +380,10 @@ public void listRevisionsWithMultipleLabels() { String label2 = getLabel(); listRevisionsWithMultipleLabelsRunner(key, label, label2, (testInput) -> { - assertConfigurationEquals(testInput.get(0), client.addSetting(testInput.get(0))); - assertConfigurationEquals(testInput.get(1), client.updateSetting(testInput.get(1))); - assertConfigurationEquals(testInput.get(2), client.addSetting(testInput.get(2))); - assertConfigurationEquals(testInput.get(3), client.updateSetting(testInput.get(3))); + assertConfigurationEquals(testInput.get(0), client.addSettingWithResponse(testInput.get(0), Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(1), client.setSettingWithResponse(testInput.get(1), false, Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(2), client.addSettingWithResponse(testInput.get(2), Context.NONE).getValue()); + assertConfigurationEquals(testInput.get(3), client.setSettingWithResponse(testInput.get(3), false, Context.NONE).getValue()); return client.listSettingRevisions(new SettingSelector().setKeys(key).setLabels(label, label2)); }); @@ -462,9 +398,9 @@ public void listRevisionsWithRange() { final ConfigurationSetting updated = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue"); final ConfigurationSetting updated2 = new ConfigurationSetting().setKey(original.getKey()).setValue("anotherValue2"); - assertConfigurationEquals(original, client.addSetting(original)); - assertConfigurationEquals(updated, client.updateSetting(updated)); - assertConfigurationEquals(updated2, client.updateSetting(updated2)); + assertConfigurationEquals(original, client.addSettingWithResponse(original, Context.NONE).getValue()); + assertConfigurationEquals(updated, client.setSettingWithResponse(updated, false, Context.NONE).getValue()); + assertConfigurationEquals(updated2, client.setSettingWithResponse(updated2, false, Context.NONE).getValue()); List revisions = client.listSettingRevisions(new SettingSelector().setKeys(key).setRange(new Range(1, 2))).stream().collect(Collectors.toList()); assertConfigurationEquals(updated, revisions.get(0)); @@ -479,7 +415,7 @@ public void listRevisionsInvalidRange() { final String key = getKey(); final ConfigurationSetting original = new ConfigurationSetting().setKey(key).setValue("myValue"); - assertConfigurationEquals(original, client.addSetting(original)); + assertConfigurationEquals(original, client.addSettingWithResponse(original, Context.NONE).getValue()); assertRestException(() -> client.listSettingRevisions(new SettingSelector().setKeys(key).setRange(new Range(0, 10))), 416); // REQUESTED_RANGE_NOT_SATISFIABLE } @@ -495,11 +431,11 @@ public void listRevisionsAcceptDateTime() { // Create 3 revisions of the same key. try { - assertConfigurationEquals(original, client.setSetting(original)); + assertConfigurationEquals(original, client.setSettingWithResponse(original, false, Context.NONE).getValue()); Thread.sleep(2000); - assertConfigurationEquals(updated, client.setSetting(updated)); + assertConfigurationEquals(updated, client.setSettingWithResponse(updated, false, Context.NONE).getValue()); Thread.sleep(2000); - assertConfigurationEquals(updated2, client.setSetting(updated2)); + assertConfigurationEquals(updated2, client.setSettingWithResponse(updated2, false, Context.NONE).getValue()); } catch (InterruptedException ex) { // Do nothing. } @@ -525,7 +461,7 @@ public void listRevisionsAcceptDateTime() { public void listRevisionsWithPagination() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { - client.setSetting(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix)); + client.setSettingWithResponse(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix), false, Context.NONE).getValue(); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -539,7 +475,7 @@ public void listRevisionsWithPagination() { public void listRevisionsWithPaginationAndRepeatStream() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { - client.setSetting(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix)); + client.setSettingWithResponse(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix), false, Context.NONE).getValue(); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -556,7 +492,7 @@ public void listRevisionsWithPaginationAndRepeatStream() { public void listRevisionsWithPaginationAndRepeatIterator() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { - client.setSetting(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix)); + client.setSettingWithResponse(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix), false, Context.NONE).getValue(); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix).setLabels(labelPrefix); @@ -581,7 +517,7 @@ public void listRevisionsWithPaginationAndRepeatIterator() { public void listSettingsWithPagination() { final int numberExpected = 50; for (int value = 0; value < numberExpected; value++) { - client.setSetting(new ConfigurationSetting().setKey(keyPrefix + "-" + value).setValue("myValue").setLabel(labelPrefix)); + client.setSettingWithResponse(new ConfigurationSetting().setKey(keyPrefix + "-" + value).setValue("myValue").setLabel(labelPrefix), false, Context.NONE).getValue(); } SettingSelector filter = new SettingSelector().setKeys(keyPrefix + "-*").setLabels(labelPrefix); @@ -596,18 +532,18 @@ public void getSettingWhenValueNotUpdated() { final String key = getKey(); final ConfigurationSetting expected = new ConfigurationSetting().setKey(key).setValue("myValue"); final ConfigurationSetting newExpected = new ConfigurationSetting().setKey(key).setValue("myNewValue"); - final ConfigurationSetting block = client.addSetting(expected); + final ConfigurationSetting block = client.addSettingWithResponse(expected, Context.NONE).getValue(); assertNotNull(block); assertConfigurationEquals(expected, block); - assertConfigurationEquals(newExpected, client.setSetting(newExpected)); + assertConfigurationEquals(newExpected, client.setSettingWithResponse(newExpected, false, Context.NONE).getValue()); } public void deleteAllSettings() { client.listSettings(new SettingSelector().setKeys("*")).forEach(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.getKey(), configurationSetting.getLabel(), configurationSetting.isLocked()); - client.deleteSetting(configurationSetting); + client.deleteSettingWithResponse(configurationSetting, false, Context.NONE).getValue(); }); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java index 88c81c040436..36d3e4abff3a 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java @@ -187,72 +187,6 @@ void setSettingEmptyValueRunner(Consumer testRunner) { @Test public abstract void setSettingNullKey(); - @Test - public abstract void updateNoExistingSetting(); - - void updateNoExistingSettingRunner(Consumer testRunner) { - final ConfigurationSetting expectedFail = new ConfigurationSetting().setKey(getKey()).setValue("myFailingUpdate"); - - testRunner.accept(expectedFail); - testRunner.accept(expectedFail.setLabel(getLabel())); - } - - @Test - public abstract void updateSetting(); - - void updateSettingRunner(BiConsumer testRunner) { - String key = getKey(); - String label = getLabel(); - - final Map tags = new HashMap<>(); - tags.put("first tag", "first value"); - tags.put("second tag", "second value"); - final ConfigurationSetting original = new ConfigurationSetting() - .setKey(key) - .setValue("myNewValue") - .setTags(tags) - .setContentType("json"); - - final Map updatedTags = new HashMap<>(tags); - final ConfigurationSetting updated = new ConfigurationSetting() - .setKey(original.getKey()) - .setValue("myUpdatedValue") - .setTags(updatedTags) - .setContentType("text"); - - testRunner.accept(original, updated); - testRunner.accept(original.setLabel(label), updated.setLabel(label)); - } - - @Test - public abstract void updateSettingOverload(); - - void updateSettingOverloadRunner(BiConsumer testRunner) { - String key = getKey(); - - ConfigurationSetting original = new ConfigurationSetting().setKey(key).setValue("A Value"); - ConfigurationSetting updated = new ConfigurationSetting().setKey(key).setValue("A New Value"); - - testRunner.accept(original, updated); - } - - @Test - public abstract void updateSettingNullKey(); - - @Test - public abstract void updateSettingIfEtag(); - - void updateSettingIfEtagRunner(Consumer> testRunner) { - final String key = getKey(); - final String label = getLabel(); - final ConfigurationSetting newConfiguration = new ConfigurationSetting().setKey(key).setValue("myNewValue"); - final ConfigurationSetting updateConfiguration = new ConfigurationSetting().setKey(key).setValue("myUpdateValue"); - final ConfigurationSetting finalConfiguration = new ConfigurationSetting().setKey(key).setValue("myFinalValue"); - - testRunner.accept(Arrays.asList(newConfiguration, updateConfiguration, finalConfiguration)); - testRunner.accept(Arrays.asList(newConfiguration.setLabel(label), updateConfiguration.setLabel(label), finalConfiguration.setLabel(label))); - } - @Test public abstract void getSetting(); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json index 5ce0690bc1e5..429fb3e76172 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addExistingSetting.json @@ -1,160 +1,209 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ba1e5c7-fcfc-479f-8d87-84e6f5a77abe", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjc=;sn=228327", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "23d0832c-4ab3-49ba-b4f6-f0b5ef9cb56c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"8ygzpbmdHDMUzmiiqEZEGxtccPx\"", - "x-ms-request-id" : "23d0832c-4ab3-49ba-b4f6-f0b5ef9cb56c", - "Body" : "{\"etag\":\"8ygzpbmdHDMUzmiiqEZEGxtccPx\",\"key\":\"key00075373793\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"}", - "x-ms-client-request-id" : "06564218-1073-4549-8663-ece3c472b5f0" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c734a37e-70bf-4f8d-9eb9-8e859d5e9c10", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vmcGGFegRUX2R1cIdVDdKyRfQB7\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTU=;sn=364155", + "x-ms-request-id" : "c734a37e-70bf-4f8d-9eb9-8e859d5e9c10", + "Body" : "{\"etag\":\"vmcGGFegRUX2R1cIdVDdKyRfQB7\",\"key\":\"key0890906446a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "0ba1e5c7-fcfc-479f-8d87-84e6f5a77abe", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "677880b9-fc08-4945-ad86-6794369f180f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "fd092f30-da7c-45fb-93a5-1141c5580497", - "x-ms-client-request-id" : "26674728-7272-4240-9d66-ed1060823724", - "x-ms-correlation-request-id" : "fd092f30-da7c-45fb-93a5-1141c5580497", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3c97c50e-b6c0-4259-bd67-e1614f3aa07d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "3c97c50e-b6c0-4259-bd67-e1614f3aa07d", + "x-ms-client-request-id" : "677880b9-fc08-4945-ad86-6794369f180f" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793?label=8898f73f543546", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a?label=cc8f5de647372c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "85e15086-8fc8-4802-9642-d0da99b53c59", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjg=;sn=228328", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e07725f9-e48a-4581-acbe-c87548104761", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "close", - "etag" : "\"K7RT0JD15TJ67azotYDaFTGK9T1\"", - "x-ms-request-id" : "e07725f9-e48a-4581-acbe-c87548104761", - "Body" : "{\"etag\":\"K7RT0JD15TJ67azotYDaFTGK9T1\",\"key\":\"key00075373793\",\"label\":\"8898f73f543546\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"}", - "x-ms-client-request-id" : "886935c3-71ca-48f2-903e-d98b237fd92f" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3d566aa0-8bbf-400e-9afd-5a8c296c7f12", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"lwK6h0CSejDJahHLii37PTx8oFr\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTY=;sn=364156", + "x-ms-request-id" : "3d566aa0-8bbf-400e-9afd-5a8c296c7f12", + "Body" : "{\"etag\":\"lwK6h0CSejDJahHLii37PTx8oFr\",\"key\":\"key0890906446a\",\"label\":\"cc8f5de647372c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "85e15086-8fc8-4802-9642-d0da99b53c59", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793?label=8898f73f543546", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a?label=cc8f5de647372c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "82b2b5b8-481b-4f38-8a48-0cd2a7178d79", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "24fef02b-b5bc-4549-8fe9-a353cb045f59", - "x-ms-client-request-id" : "216ecf66-2b62-4768-a073-c7ae955c34e1", - "x-ms-correlation-request-id" : "24fef02b-b5bc-4549-8fe9-a353cb045f59", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6fc2ce54-2a06-47a2-bb11-e2a4a1b305bc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "6fc2ce54-2a06-47a2-bb11-e2a4a1b305bc", + "x-ms-client-request-id" : "82b2b5b8-481b-4f38-8a48-0cd2a7178d79" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key00075%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key08909%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "15d3b992-a0d6-46b8-8222-ea22a0938904", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjg=;sn=228328", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "10e87368-cb95-46df-b75c-126f82586e50", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "10e87368-cb95-46df-b75c-126f82586e50", - "Body" : "{\"items\":[{\"etag\":\"8ygzpbmdHDMUzmiiqEZEGxtccPx\",\"key\":\"key00075373793\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"},{\"etag\":\"K7RT0JD15TJ67azotYDaFTGK9T1\",\"key\":\"key00075373793\",\"label\":\"8898f73f543546\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"}]}", - "x-ms-client-request-id" : "6be008ac-2534-4b9c-9521-c8435b28e722" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4a8a8d50-0b1c-49b1-b04f-3d7f38637327", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTY=;sn=364156", + "x-ms-request-id" : "4a8a8d50-0b1c-49b1-b04f-3d7f38637327", + "Body" : "{\"items\":[{\"etag\":\"vmcGGFegRUX2R1cIdVDdKyRfQB7\",\"key\":\"key0890906446a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"},{\"etag\":\"lwK6h0CSejDJahHLii37PTx8oFr\",\"key\":\"key0890906446a\",\"label\":\"cc8f5de647372c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}]}", + "x-ms-client-request-id" : "15d3b992-a0d6-46b8-8222-ea22a0938904", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "94978a3b-648b-4b0f-9fd8-fdf7b04e16e8", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjk=;sn=228329", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ecc7703b-5472-4ba5-b965-9d4c6c10b0b6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"8ygzpbmdHDMUzmiiqEZEGxtccPx\"", - "x-ms-request-id" : "ecc7703b-5472-4ba5-b965-9d4c6c10b0b6", - "Body" : "{\"etag\":\"8ygzpbmdHDMUzmiiqEZEGxtccPx\",\"key\":\"key00075373793\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"}", - "x-ms-client-request-id" : "f05b0725-9003-4d8b-903b-a00ee7009bd9" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3f549577-3b8b-4ebe-a3cf-cd29f97d21a7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vmcGGFegRUX2R1cIdVDdKyRfQB7\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTc=;sn=364157", + "x-ms-request-id" : "3f549577-3b8b-4ebe-a3cf-cd29f97d21a7", + "Body" : "{\"etag\":\"vmcGGFegRUX2R1cIdVDdKyRfQB7\",\"key\":\"key0890906446a\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "94978a3b-648b-4b0f-9fd8-fdf7b04e16e8", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key00075373793?label=8898f73f543546", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0890906446a?label=cc8f5de647372c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "790e94fe-87fc-43f6-90a5-4d0b5f091792", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMzA=;sn=228330", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5e1241c6-e7b1-442f-bd94-326eaf29bbe9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"K7RT0JD15TJ67azotYDaFTGK9T1\"", - "x-ms-request-id" : "5e1241c6-e7b1-442f-bd94-326eaf29bbe9", - "Body" : "{\"etag\":\"K7RT0JD15TJ67azotYDaFTGK9T1\",\"key\":\"key00075373793\",\"label\":\"8898f73f543546\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:03+00:00\"}", - "x-ms-client-request-id" : "dff2efe4-d3eb-452d-84b3-d4a98c1d63e8" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "44461c46-17af-44fe-8392-574f1440f654", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"lwK6h0CSejDJahHLii37PTx8oFr\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTg=;sn=364158", + "x-ms-request-id" : "44461c46-17af-44fe-8392-574f1440f654", + "Body" : "{\"etag\":\"lwK6h0CSejDJahHLii37PTx8oFr\",\"key\":\"key0890906446a\",\"label\":\"cc8f5de647372c\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "790e94fe-87fc-43f6-90a5-4d0b5f091792", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key00075", "8898f73f", "key00075373793", "8898f73f543546" ] + "variables" : [ "key08909", "cc8f5de6", "key0890906446a", "cc8f5de647372c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json index b43defdfae61..c066507c4be0 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSetting.json @@ -1,122 +1,157 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key98100772618", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0034543894b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09144b85-352b-4eab-a888-93337ac22697", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjI=;sn=228162", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "605cb5b3-33cc-4de4-88cc-15d54d16a529", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"VZMyHVknZBRhFENu1hPMZbDUXj3\"", - "x-ms-request-id" : "605cb5b3-33cc-4de4-88cc-15d54d16a529", - "Body" : "{\"etag\":\"VZMyHVknZBRhFENu1hPMZbDUXj3\",\"key\":\"key98100772618\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "4e4c6066-e43f-4402-919d-8f4bf099f3aa" - } + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b99e98b9-d26d-4e2c-b97f-e84c2a08f9fe", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vjvfixd239K2KfS54Qr5RaMzBC5\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDQ=;sn=363944", + "x-ms-request-id" : "b99e98b9-d26d-4e2c-b97f-e84c2a08f9fe", + "Body" : "{\"etag\":\"vjvfixd239K2KfS54Qr5RaMzBC5\",\"key\":\"key0034543894b\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "09144b85-352b-4eab-a888-93337ac22697", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key98100772618?label=ad3e15c719040d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0034543894b?label=96d9dac8316034", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2532525c-fadf-42a5-a63c-dad5c5033744", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjM=;sn=228163", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "224ee269-ac64-4319-9908-df9e7d72a899", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"50c99tbMKlTsFscjkZW90EtJB4h\"", - "x-ms-request-id" : "224ee269-ac64-4319-9908-df9e7d72a899", - "Body" : "{\"etag\":\"50c99tbMKlTsFscjkZW90EtJB4h\",\"key\":\"key98100772618\",\"label\":\"ad3e15c719040d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "0dabe2b7-e6f5-434b-ab10-0785e0fe6c22" - } + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c12bac28-3ca6-4b71-a720-35aea8bcd4e3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"35zXxtmAiDDsSqPqXtadQDo82LF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDU=;sn=363945", + "x-ms-request-id" : "c12bac28-3ca6-4b71-a720-35aea8bcd4e3", + "Body" : "{\"etag\":\"35zXxtmAiDDsSqPqXtadQDo82LF\",\"key\":\"key0034543894b\",\"label\":\"96d9dac8316034\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "2532525c-fadf-42a5-a63c-dad5c5033744", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key98100%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key00345%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8df20547-be6a-4c2b-8501-caf3be80192f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjM=;sn=228163", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "fa48e042-8b2d-4743-b467-c019d818b52a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "fa48e042-8b2d-4743-b467-c019d818b52a", - "Body" : "{\"items\":[{\"etag\":\"VZMyHVknZBRhFENu1hPMZbDUXj3\",\"key\":\"key98100772618\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"},{\"etag\":\"50c99tbMKlTsFscjkZW90EtJB4h\",\"key\":\"key98100772618\",\"label\":\"ad3e15c719040d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}]}", - "x-ms-client-request-id" : "6a31aac9-ac4f-4f9e-9676-77725ee771b9" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "47baf658-7e2c-4951-9b29-d1d8ff5f03c0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDU=;sn=363945", + "x-ms-request-id" : "47baf658-7e2c-4951-9b29-d1d8ff5f03c0", + "Body" : "{\"items\":[{\"etag\":\"vjvfixd239K2KfS54Qr5RaMzBC5\",\"key\":\"key0034543894b\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"},{\"etag\":\"35zXxtmAiDDsSqPqXtadQDo82LF\",\"key\":\"key0034543894b\",\"label\":\"96d9dac8316034\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}]}", + "x-ms-client-request-id" : "8df20547-be6a-4c2b-8501-caf3be80192f", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key98100772618", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0034543894b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "07cb7315-77dd-4bbd-adfb-16663dce3c26", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjQ=;sn=228164", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "2042e299-9d9d-4857-bb9b-5dbb0d5d324f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"VZMyHVknZBRhFENu1hPMZbDUXj3\"", - "x-ms-request-id" : "2042e299-9d9d-4857-bb9b-5dbb0d5d324f", - "Body" : "{\"etag\":\"VZMyHVknZBRhFENu1hPMZbDUXj3\",\"key\":\"key98100772618\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "645d88c3-374d-442d-85b9-9c6f70de4c9d" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7dd9290a-f231-4d89-bb32-e6515162ece4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vjvfixd239K2KfS54Qr5RaMzBC5\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDY=;sn=363946", + "x-ms-request-id" : "7dd9290a-f231-4d89-bb32-e6515162ece4", + "Body" : "{\"etag\":\"vjvfixd239K2KfS54Qr5RaMzBC5\",\"key\":\"key0034543894b\",\"label\":null,\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "07cb7315-77dd-4bbd-adfb-16663dce3c26", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key98100772618?label=ad3e15c719040d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key0034543894b?label=96d9dac8316034", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "23756874-df89-4b1a-800a-7787d849bf6f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjU=;sn=228165", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e303e5e0-7d70-4fc7-959e-a762a3bcb16c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"50c99tbMKlTsFscjkZW90EtJB4h\"", - "x-ms-request-id" : "e303e5e0-7d70-4fc7-959e-a762a3bcb16c", - "Body" : "{\"etag\":\"50c99tbMKlTsFscjkZW90EtJB4h\",\"key\":\"key98100772618\",\"label\":\"ad3e15c719040d\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "6bc64077-7b78-4514-95e1-8f74fb58be32" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "78954591-8c11-4f28-8953-c2cae9759658", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"35zXxtmAiDDsSqPqXtadQDo82LF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDc=;sn=363947", + "x-ms-request-id" : "78954591-8c11-4f28-8953-c2cae9759658", + "Body" : "{\"etag\":\"35zXxtmAiDDsSqPqXtadQDo82LF\",\"key\":\"key0034543894b\",\"label\":\"96d9dac8316034\",\"content_type\":\"text\",\"value\":\"myNewValue\",\"tags\":{\"AnotherTag\":\"AnotherTagValue\",\"MyTag\":\"TagValue\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "23756874-df89-4b1a-800a-7787d849bf6f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key98100", "ad3e15c7", "key98100772618", "ad3e15c719040d" ] + "variables" : [ "key00345", "96d9dac8", "key0034543894b", "96d9dac8316034" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json index 0c8c82c81772..712214e97141 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyKey.json @@ -1,44 +1,58 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a8930378-964c-4a88-a585-c6516c49e752", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "405", - "x-ms-request-id" : "2499868c-f629-47a7-82c0-9e0a9b1fdaae", - "x-ms-client-request-id" : "c136932a-690c-44cd-b283-a3d4ad6bb471", - "x-ms-correlation-request-id" : "2499868c-f629-47a7-82c0-9e0a9b1fdaae", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "071d2a0d-dd15-4089-82d2-0c32860ece09", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "071d2a0d-dd15-4089-82d2-0c32860ece09", + "x-ms-client-request-id" : "a8930378-964c-4a88-a585-c6516c49e752" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key70302%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key24633%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e2dcaa68-5659-438b-ab1c-41d1d9909647", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "04438896-680d-4872-8e72-7f5bb60279bb", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c06da1c7-4eb9-42f8-a2bc-f549cde3167f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "c06da1c7-4eb9-42f8-a2bc-f549cde3167f", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "0d8ddd8e-1543-4933-87eb-da7c166494c2", - "x-ms-correlation-request-id" : "04438896-680d-4872-8e72-7f5bb60279bb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "e2dcaa68-5659-438b-ab1c-41d1d9909647", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key70302", "bdc23573" ] + "variables" : [ "key24633", "2422a064" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json index 26a21d529aac..238606e9a3d8 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingEmptyValue.json @@ -1,170 +1,219 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "118fb440-54cb-4cd4-a75a-f903bebe0ba5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTM=;sn=228313", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "936a09ee-cae4-4bec-9313-3abdce8edc10", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\"", - "x-ms-request-id" : "936a09ee-cae4-4bec-9313-3abdce8edc10", - "Body" : "{\"etag\":\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\",\"key\":\"key53305215193\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "ee08cb0d-1467-4f47-a9ff-567375a97f4c" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1dcebf23-f2e3-416b-825e-b47ed8f1bc86", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"cczEFzHbxHi3JJRRAP5GTqS78cs\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDE=;sn=364141", + "x-ms-request-id" : "1dcebf23-f2e3-416b-825e-b47ed8f1bc86", + "Body" : "{\"etag\":\"cczEFzHbxHi3JJRRAP5GTqS78cs\",\"key\":\"key87464184709\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "118fb440-54cb-4cd4-a75a-f903bebe0ba5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bded4179-ecca-4b24-8ed9-2ad6025b7d4d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTM=;sn=228313", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "49b73cbd-c3e1-4e3f-aace-8a627ef77daa", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\"", - "x-ms-request-id" : "49b73cbd-c3e1-4e3f-aace-8a627ef77daa", - "Body" : "{\"etag\":\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\",\"key\":\"key53305215193\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "97268010-5b0a-4a8e-8751-52d48652e7c6" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3bad0fdd-9afb-4c39-b3c9-f0dba631360e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"cczEFzHbxHi3JJRRAP5GTqS78cs\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDE=;sn=364141", + "x-ms-request-id" : "3bad0fdd-9afb-4c39-b3c9-f0dba631360e", + "Body" : "{\"etag\":\"cczEFzHbxHi3JJRRAP5GTqS78cs\",\"key\":\"key87464184709\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "bded4179-ecca-4b24-8ed9-2ad6025b7d4d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8b2f3da6-1a68-459b-9305-f549588745c9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTQ=;sn=228314", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3926b40c-c408-456f-a183-3b2101d3136c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"7ewpeZcbeZc1exrOohOgAEKacFq\"", - "x-ms-request-id" : "3926b40c-c408-456f-a183-3b2101d3136c", - "Body" : "{\"etag\":\"7ewpeZcbeZc1exrOohOgAEKacFq\",\"key\":\"key53305215193-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "6c686668-48ff-4f6a-8cda-9f3b9537c08d" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "824f4a80-58a4-4649-9f3a-4bbf1138bdbb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"R4igMc6D9lCr9ahrI6je7bqFWUz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDI=;sn=364142", + "x-ms-request-id" : "824f4a80-58a4-4649-9f3a-4bbf1138bdbb", + "Body" : "{\"etag\":\"R4igMc6D9lCr9ahrI6je7bqFWUz\",\"key\":\"key87464184709-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "8b2f3da6-1a68-459b-9305-f549588745c9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a658c98d-9636-43dc-980f-6660e5b305a4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTQ=;sn=228314", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b5c0906d-c00c-45f8-ae38-df916a9ac9f3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"7ewpeZcbeZc1exrOohOgAEKacFq\"", - "x-ms-request-id" : "b5c0906d-c00c-45f8-ae38-df916a9ac9f3", - "Body" : "{\"etag\":\"7ewpeZcbeZc1exrOohOgAEKacFq\",\"key\":\"key53305215193-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "2db10d0e-6811-4d24-8fb5-52262f1f3b76" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "69208f39-637b-46cf-bb73-5908e984e6f5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"R4igMc6D9lCr9ahrI6je7bqFWUz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDI=;sn=364142", + "x-ms-request-id" : "69208f39-637b-46cf-bb73-5908e984e6f5", + "Body" : "{\"etag\":\"R4igMc6D9lCr9ahrI6je7bqFWUz\",\"key\":\"key87464184709-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "a658c98d-9636-43dc-980f-6660e5b305a4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key53305%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key87464%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "814f5af7-bf1b-4bd2-8897-4b910b9f50ee", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTQ=;sn=228314", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "df8b5bf0-3e92-483d-9840-6292e97169b3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "df8b5bf0-3e92-483d-9840-6292e97169b3", - "Body" : "{\"items\":[{\"etag\":\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\",\"key\":\"key53305215193\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"7ewpeZcbeZc1exrOohOgAEKacFq\",\"key\":\"key53305215193-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}]}", - "x-ms-client-request-id" : "cdb52230-00cc-47a1-8099-2861cb5a3ce0" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d687b7bb-e1b8-48e6-a3d0-ee3d47970762", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDI=;sn=364142", + "x-ms-request-id" : "d687b7bb-e1b8-48e6-a3d0-ee3d47970762", + "Body" : "{\"items\":[{\"etag\":\"cczEFzHbxHi3JJRRAP5GTqS78cs\",\"key\":\"key87464184709\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"},{\"etag\":\"R4igMc6D9lCr9ahrI6je7bqFWUz\",\"key\":\"key87464184709-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}]}", + "x-ms-client-request-id" : "814f5af7-bf1b-4bd2-8897-4b910b9f50ee", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "68fdc489-34dd-4405-950f-7197140613bb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTU=;sn=228315", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "339ea52f-bfbf-4752-92be-d5965fb28506", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\"", - "x-ms-request-id" : "339ea52f-bfbf-4752-92be-d5965fb28506", - "Body" : "{\"etag\":\"RyAcgQ2ViIj71FGuRIb1V4WqTPM\",\"key\":\"key53305215193\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "79f77a0b-44f2-4ccb-9679-6f9504ec721a" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "926ff98b-c0a0-4e63-9ac2-ef164a98f8dc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"cczEFzHbxHi3JJRRAP5GTqS78cs\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDM=;sn=364143", + "x-ms-request-id" : "926ff98b-c0a0-4e63-9ac2-ef164a98f8dc", + "Body" : "{\"etag\":\"cczEFzHbxHi3JJRRAP5GTqS78cs\",\"key\":\"key87464184709\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "68fdc489-34dd-4405-950f-7197140613bb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key53305215193-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key87464184709-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6c5f614b-3873-4a6e-93f7-da709c284253", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTY=;sn=228316", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f31fdd5e-1be3-495e-9a82-ebe3a016ae01", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"7ewpeZcbeZc1exrOohOgAEKacFq\"", - "x-ms-request-id" : "f31fdd5e-1be3-495e-9a82-ebe3a016ae01", - "Body" : "{\"etag\":\"7ewpeZcbeZc1exrOohOgAEKacFq\",\"key\":\"key53305215193-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "21141d81-ba88-4b44-8f08-190c22a4acbb" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "759ba2a3-65ee-47cc-a659-44ce642e159f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"R4igMc6D9lCr9ahrI6je7bqFWUz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDQ=;sn=364144", + "x-ms-request-id" : "759ba2a3-65ee-47cc-a659-44ce642e159f", + "Body" : "{\"etag\":\"R4igMc6D9lCr9ahrI6je7bqFWUz\",\"key\":\"key87464184709-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "6c5f614b-3873-4a6e-93f7-da709c284253", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key53305", "37bcf714", "key53305215193" ] + "variables" : [ "key87464", "95158079", "key87464184709" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json index 3cad627bc3a6..aa66c9668459 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/addSettingNullKey.json @@ -1,25 +1,32 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key01004%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key35213%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c2daa6bb-8519-4854-bf48-4c6c09b7b0b7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "086c5c4b-3651-494b-b337-d80898113c46", + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fb9797ba-090c-4373-be15-5505261ee9d1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "fb9797ba-090c-4373-be15-5505261ee9d1", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "faf5f8bf-6949-4a34-994a-689a9808793a", - "x-ms-correlation-request-id" : "086c5c4b-3651-494b-b337-d80898113c46", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "c2daa6bb-8519-4854-bf48-4c6c09b7b0b7", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key01004", "c0632c8a" ] + "variables" : [ "key35213", "c96c21a0" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json index d518bfc56cb0..ec3c93ceda99 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSetting.json @@ -1,207 +1,270 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a78eeffe-48ab-4a7d-879e-34b72de008a0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTc=;sn=228317", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "60cb942f-24a9-4b15-afad-9a08c03d0b5e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"MquuUpBhmaUorhmlZUJi7FP40gJ\"", - "x-ms-request-id" : "60cb942f-24a9-4b15-afad-9a08c03d0b5e", - "Body" : "{\"etag\":\"MquuUpBhmaUorhmlZUJi7FP40gJ\",\"key\":\"key9141447209c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "acddcbd7-7097-4d59-8762-13ec2f2dce59" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "753a9738-ee46-44b3-8538-b8c8489c9c66", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDU=;sn=364145", + "x-ms-request-id" : "753a9738-ee46-44b3-8538-b8c8489c9c66", + "Body" : "{\"etag\":\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\",\"key\":\"key1922037141f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "a78eeffe-48ab-4a7d-879e-34b72de008a0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e0d447d8-695f-4408-a16f-86fb3d37e57f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTc=;sn=228317", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0ec70387-ce9f-48e7-a44c-7397218f4173", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"MquuUpBhmaUorhmlZUJi7FP40gJ\"", - "x-ms-request-id" : "0ec70387-ce9f-48e7-a44c-7397218f4173", - "Body" : "{\"etag\":\"MquuUpBhmaUorhmlZUJi7FP40gJ\",\"key\":\"key9141447209c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "0c8c36e1-4e3d-4141-8216-97740e6611b9" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "843caa8e-8daf-4d8f-a0e3-8f1289e96e07", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDU=;sn=364145", + "x-ms-request-id" : "843caa8e-8daf-4d8f-a0e3-8f1289e96e07", + "Body" : "{\"etag\":\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\",\"key\":\"key1922037141f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "e0d447d8-695f-4408-a16f-86fb3d37e57f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc392908-49ae-4f71-948d-4320f99f0864", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTg=;sn=228318", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ab0b385f-41ac-4da9-96d0-de578cde55a7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"MquuUpBhmaUorhmlZUJi7FP40gJ\"", - "x-ms-request-id" : "ab0b385f-41ac-4da9-96d0-de578cde55a7", - "Body" : "{\"etag\":\"MquuUpBhmaUorhmlZUJi7FP40gJ\",\"key\":\"key9141447209c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "adeaf4c6-c91c-440b-a565-be2422f0be33" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f73a79b3-5388-483c-86d5-082459e3082a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDY=;sn=364146", + "x-ms-request-id" : "f73a79b3-5388-483c-86d5-082459e3082a", + "Body" : "{\"etag\":\"1pmSOo5uoaOXZ5rhFW8adKD3Rgf\",\"key\":\"key1922037141f\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "cc392908-49ae-4f71-948d-4320f99f0864", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8324480e-274e-4891-a6a2-393bb96f1ee4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "d5c3e997-24a0-43df-8db1-084daf5252e6", - "x-ms-client-request-id" : "62dff712-0766-4128-a093-bd5f6cc7dc31", - "x-ms-correlation-request-id" : "d5c3e997-24a0-43df-8db1-084daf5252e6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c66637b4-e246-4ec3-9f37-421cd00826ef", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "c66637b4-e246-4ec3-9f37-421cd00826ef", + "x-ms-client-request-id" : "8324480e-274e-4891-a6a2-393bb96f1ee4" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c?label=3683efc9821206", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f?label=45852abc83672a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7bdae150-9451-4268-8734-3039fa21dc6a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTk=;sn=228319", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6870595b-dace-4691-8ca5-c833c1d16bf5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"85Q1xUoCztqXp2TP0mezUY9ChYI\"", - "x-ms-request-id" : "6870595b-dace-4691-8ca5-c833c1d16bf5", - "Body" : "{\"etag\":\"85Q1xUoCztqXp2TP0mezUY9ChYI\",\"key\":\"key9141447209c\",\"label\":\"3683efc9821206\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "16fbb6b2-1e33-460e-87f7-60636dd492f6" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0860e4f5-ea92-468b-8ea2-c0ff0debf9cf", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDc=;sn=364147", + "x-ms-request-id" : "0860e4f5-ea92-468b-8ea2-c0ff0debf9cf", + "Body" : "{\"etag\":\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\",\"key\":\"key1922037141f\",\"label\":\"45852abc83672a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "7bdae150-9451-4268-8734-3039fa21dc6a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c?label=3683efc9821206", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f?label=45852abc83672a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5153fe7d-0e17-45b1-a95a-05ad90f27191", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTk=;sn=228319", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "408465a6-67f2-4758-8dd7-0396726c9a28", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"85Q1xUoCztqXp2TP0mezUY9ChYI\"", - "x-ms-request-id" : "408465a6-67f2-4758-8dd7-0396726c9a28", - "Body" : "{\"etag\":\"85Q1xUoCztqXp2TP0mezUY9ChYI\",\"key\":\"key9141447209c\",\"label\":\"3683efc9821206\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "5f46a95a-864a-40dc-b1c9-0e482431cb22" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "082af40e-8725-4510-8fe6-44fd55bb62b2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDc=;sn=364147", + "x-ms-request-id" : "082af40e-8725-4510-8fe6-44fd55bb62b2", + "Body" : "{\"etag\":\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\",\"key\":\"key1922037141f\",\"label\":\"45852abc83672a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "5153fe7d-0e17-45b1-a95a-05ad90f27191", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c?label=3683efc9821206", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f?label=45852abc83672a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6b3dfb90-deea-4f96-9a61-cb6fa628b75c", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjA=;sn=228320", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "704be250-3f57-47b9-8466-74218ae14b25", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"85Q1xUoCztqXp2TP0mezUY9ChYI\"", - "x-ms-request-id" : "704be250-3f57-47b9-8466-74218ae14b25", - "Body" : "{\"etag\":\"85Q1xUoCztqXp2TP0mezUY9ChYI\",\"key\":\"key9141447209c\",\"label\":\"3683efc9821206\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "1a5285ba-0b53-444e-9cc6-df267cf71621" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1604df1c-90a8-4397-b882-4471ba76fa74", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDg=;sn=364148", + "x-ms-request-id" : "1604df1c-90a8-4397-b882-4471ba76fa74", + "Body" : "{\"etag\":\"eQ7wZHhhpLh4X2DPTMm1aWYLWLQ\",\"key\":\"key1922037141f\",\"label\":\"45852abc83672a\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "6b3dfb90-deea-4f96-9a61-cb6fa628b75c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key9141447209c?label=3683efc9821206", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key1922037141f?label=45852abc83672a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "69b96018-bca8-4470-a08d-ef5662292c83", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "2e110407-1894-48e6-878a-71277f0e5237", - "x-ms-client-request-id" : "6f1c84c0-de2e-4755-bcbe-9fb7771b0107", - "x-ms-correlation-request-id" : "2e110407-1894-48e6-878a-71277f0e5237", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0177c791-c417-416e-b2d7-5a4e609c02cd", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "0177c791-c417-416e-b2d7-5a4e609c02cd", + "x-ms-client-request-id" : "69b96018-bca8-4470-a08d-ef5662292c83" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key91414%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key19220%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ea1c1926-0a63-4d29-ab63-85b9ff7926e9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "10275b69-fefe-4033-8b62-344e3e93b97e", + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "71abee70-0e43-41ac-92b1-f9bbcc391f08", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "71abee70-0e43-41ac-92b1-f9bbcc391f08", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "00eec9de-c8b4-417c-909b-e11864229321", - "x-ms-correlation-request-id" : "10275b69-fefe-4033-8b62-344e3e93b97e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "ea1c1926-0a63-4d29-ab63-85b9ff7926e9", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key91414", "3683efc9", "key9141447209c", "3683efc9821206" ] + "variables" : [ "key19220", "45852abc", "key1922037141f", "45852abc83672a" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json index f35328b19c29..52d9520b4778 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNotFound.json @@ -1,136 +1,178 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key2911840751c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62618789774", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "537c6429-2091-45c0-aac8-01ba5d45ffcb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzI=;sn=228172", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "533d4a9e-1bb9-4901-a7e4-6da7144ef193", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "close", - "etag" : "\"ORToW71l4FMUGm8pOD2YomQwLfB\"", - "x-ms-request-id" : "533d4a9e-1bb9-4901-a7e4-6da7144ef193", - "Body" : "{\"etag\":\"ORToW71l4FMUGm8pOD2YomQwLfB\",\"key\":\"key2911840751c\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "5b97e2c0-ff60-4322-b04a-533f29d87c34" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "619e42ce-446a-48b6-baf4-b2fbce907fe6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"M6xMa0QjZKFaKAIken0YhUE7law\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDU=;sn=364005", + "x-ms-request-id" : "619e42ce-446a-48b6-baf4-b2fbce907fe6", + "Body" : "{\"etag\":\"M6xMa0QjZKFaKAIken0YhUE7law\",\"key\":\"key62618789774\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "537c6429-2091-45c0-aac8-01ba5d45ffcb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/myNonExistentKey", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/myNonExistentKey", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3286d65d-0a82-472b-9a17-31ff39021f6b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "204", - "x-ms-request-id" : "68a82e6d-dc63-448a-b2e7-9ba80e546ce7", - "x-ms-client-request-id" : "41785ce7-d99d-4fea-b3a5-3942923ec24f", - "x-ms-correlation-request-id" : "68a82e6d-dc63-448a-b2e7-9ba80e546ce7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7aef4e98-71ea-4654-8145-f0cbc5481c88", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "7aef4e98-71ea-4654-8145-f0cbc5481c88", + "x-ms-client-request-id" : "3286d65d-0a82-472b-9a17-31ff39021f6b" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key2911840751c?label=myNonExistentLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62618789774?label=myNonExistentLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "06e4633a-7081-4c74-bc85-ff7242899c6a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "204", - "x-ms-request-id" : "25b60647-bcd3-401e-87c5-bd46777824e0", - "x-ms-client-request-id" : "42ab1a09-28ff-4b02-a565-0ecca7e67244", - "x-ms-correlation-request-id" : "25b60647-bcd3-401e-87c5-bd46777824e0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1415609a-e91f-45f3-acc0-63fa57f03546", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "1415609a-e91f-45f3-acc0-63fa57f03546", + "x-ms-client-request-id" : "06e4633a-7081-4c74-bc85-ff7242899c6a" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key2911840751c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62618789774", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c1c01ced-9aa7-4b80-91d7-30c3a6ff6e1f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzI=;sn=228172", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "af4cd65c-cb09-4692-a3e2-8319161a77d2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ORToW71l4FMUGm8pOD2YomQwLfB\"", - "x-ms-request-id" : "af4cd65c-cb09-4692-a3e2-8319161a77d2", - "Body" : "{\"etag\":\"ORToW71l4FMUGm8pOD2YomQwLfB\",\"key\":\"key2911840751c\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "5cbe06fe-64d2-48dc-b963-f21600c4cfbd" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a9838eae-a9c6-457e-b754-df6dc40ccf98", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"M6xMa0QjZKFaKAIken0YhUE7law\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDU=;sn=364005", + "x-ms-request-id" : "a9838eae-a9c6-457e-b754-df6dc40ccf98", + "Body" : "{\"etag\":\"M6xMa0QjZKFaKAIken0YhUE7law\",\"key\":\"key62618789774\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "c1c01ced-9aa7-4b80-91d7-30c3a6ff6e1f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key29118%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key62618%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b078401-7070-4cbf-a7bf-85fd93404288", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzI=;sn=228172", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "15e36451-4434-4eb6-829d-0721e9cf5025", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "15e36451-4434-4eb6-829d-0721e9cf5025", - "Body" : "{\"items\":[{\"etag\":\"ORToW71l4FMUGm8pOD2YomQwLfB\",\"key\":\"key2911840751c\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "e0bafdc9-d346-4740-9498-1d792e6c3305" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4ba6f0bf-aee9-40ba-ba04-22d837eb05e3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDU=;sn=364005", + "x-ms-request-id" : "4ba6f0bf-aee9-40ba-ba04-22d837eb05e3", + "Body" : "{\"items\":[{\"etag\":\"M6xMa0QjZKFaKAIken0YhUE7law\",\"key\":\"key62618789774\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}]}", + "x-ms-client-request-id" : "9b078401-7070-4cbf-a7bf-85fd93404288", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key2911840751c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key62618789774", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "039fb4c0-2961-4ad6-988e-490c780a33bc", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzM=;sn=228173", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7ceb5c29-20e5-440b-894e-ff4b1adc6e80", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ORToW71l4FMUGm8pOD2YomQwLfB\"", - "x-ms-request-id" : "7ceb5c29-20e5-440b-894e-ff4b1adc6e80", - "Body" : "{\"etag\":\"ORToW71l4FMUGm8pOD2YomQwLfB\",\"key\":\"key2911840751c\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "ee674392-2611-4b75-9a15-ca3bc4e530e5" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a9ccc5a8-17e1-445d-a2d9-676a617a1413", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"M6xMa0QjZKFaKAIken0YhUE7law\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDY=;sn=364006", + "x-ms-request-id" : "a9ccc5a8-17e1-445d-a2d9-676a617a1413", + "Body" : "{\"etag\":\"M6xMa0QjZKFaKAIken0YhUE7law\",\"key\":\"key62618789774\",\"label\":null,\"content_type\":null,\"value\":\"myNeverDeletedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "039fb4c0-2961-4ad6-988e-490c780a33bc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key29118", "6e5dc82e", "key2911840751c" ] + "variables" : [ "key62618", "cbe9e637", "key62618789774" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json index 18e2a756811e..f0afbe17f7a7 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingNullKey.json @@ -1,25 +1,32 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key02321%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key72810%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b825cc1f-e96d-481e-8f07-ae3fcde2ac15", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "40616dc1-8da6-473d-a43a-977a774d92e5", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4308a5a6-1415-47f6-81e7-ee12c32f9b56", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "4308a5a6-1415-47f6-81e7-ee12c32f9b56", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "e10e2df5-0499-4e47-80b9-bb350e31f4b1", - "x-ms-correlation-request-id" : "40616dc1-8da6-473d-a43a-977a774d92e5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "b825cc1f-e96d-481e-8f07-ae3fcde2ac15", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key02321", "401ef412" ] + "variables" : [ "key72810", "7124139d" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json index 9ac60268183b..7cacdf3c580e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/deleteSettingWithETag.json @@ -1,293 +1,384 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "421b2de2-f671-4047-81bb-a3dc9b6d9244", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjE=;sn=228321", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:56 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "64f008a4-e38b-41d5-b436-9a83d14fb3b4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"q5PM1j1zNYzmubcUfEWVCjfogO4\"", - "x-ms-request-id" : "64f008a4-e38b-41d5-b436-9a83d14fb3b4", - "Body" : "{\"etag\":\"q5PM1j1zNYzmubcUfEWVCjfogO4\",\"key\":\"key89618045239\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "91ae2133-11a0-4ee0-9808-ced90de8c7f4" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b7f8f02a-2868-41e3-abf9-e425483599c2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"i6CpHSTHW76loXuiD8fl8KxfbXR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDk=;sn=364149", + "x-ms-request-id" : "b7f8f02a-2868-41e3-abf9-e425483599c2", + "Body" : "{\"etag\":\"i6CpHSTHW76loXuiD8fl8KxfbXR\",\"key\":\"key95288082384\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:56+00:00\"}", + "x-ms-client-request-id" : "421b2de2-f671-4047-81bb-a3dc9b6d9244", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a3d93096-5a84-4865-83a0-73a6c55d2ff2", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjI=;sn=228322", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "989e16be-a277-49fb-80e2-cd1d264b2c1b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1eCYO4PONBbobAZsOzf9Qycz2vQ\"", - "x-ms-request-id" : "989e16be-a277-49fb-80e2-cd1d264b2c1b", - "Body" : "{\"etag\":\"1eCYO4PONBbobAZsOzf9Qycz2vQ\",\"key\":\"key89618045239\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "51629400-beeb-47d2-b4c1-1e8418349cbd" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ced1e5a3-e679-4bb4-a2c1-c998e19b45de", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5bEhvHjn7XuegIRfecoO0eH625w\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTA=;sn=364150", + "x-ms-request-id" : "ced1e5a3-e679-4bb4-a2c1-c998e19b45de", + "Body" : "{\"etag\":\"5bEhvHjn7XuegIRfecoO0eH625w\",\"key\":\"key95288082384\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "a3d93096-5a84-4865-83a0-73a6c55d2ff2", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb16e6a4-360d-4b2b-8cd7-b06873646be2", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjI=;sn=228322", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0f24caf0-2422-4652-b011-af65e538dcc6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1eCYO4PONBbobAZsOzf9Qycz2vQ\"", - "x-ms-request-id" : "0f24caf0-2422-4652-b011-af65e538dcc6", - "Body" : "{\"etag\":\"1eCYO4PONBbobAZsOzf9Qycz2vQ\",\"key\":\"key89618045239\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "0f056581-17f4-42a1-a51c-386e6a567ebe" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5a2b0557-e36d-4f5e-9417-e6db28259117", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5bEhvHjn7XuegIRfecoO0eH625w\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTA=;sn=364150", + "x-ms-request-id" : "5a2b0557-e36d-4f5e-9417-e6db28259117", + "Body" : "{\"etag\":\"5bEhvHjn7XuegIRfecoO0eH625w\",\"key\":\"key95288082384\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "eb16e6a4-360d-4b2b-8cd7-b06873646be2", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "707f11b4-3003-4cab-92ec-bb74ebe4c44f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "d2d82e39-b045-4781-be2b-2e38e4b8df3a", - "x-ms-client-request-id" : "f3cb5fc5-329d-4ef3-b602-1305fd784585", - "x-ms-correlation-request-id" : "d2d82e39-b045-4781-be2b-2e38e4b8df3a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "be1d01ed-81b0-4d23-b70b-529c59cb5a12", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "be1d01ed-81b0-4d23-b70b-529c59cb5a12", + "x-ms-client-request-id" : "707f11b4-3003-4cab-92ec-bb74ebe4c44f" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4e2fe5be-db02-4b4b-aa72-68267d3c58ea", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjM=;sn=228323", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8d9d70fe-ca3e-471f-9309-778053995ae7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1eCYO4PONBbobAZsOzf9Qycz2vQ\"", - "x-ms-request-id" : "8d9d70fe-ca3e-471f-9309-778053995ae7", - "Body" : "{\"etag\":\"1eCYO4PONBbobAZsOzf9Qycz2vQ\",\"key\":\"key89618045239\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "1b651a13-97f9-4fcd-9b2e-f5ca561e18a9" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2624edeb-2809-4849-a6f5-8ffba58bbfb3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5bEhvHjn7XuegIRfecoO0eH625w\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTE=;sn=364151", + "x-ms-request-id" : "2624edeb-2809-4849-a6f5-8ffba58bbfb3", + "Body" : "{\"etag\":\"5bEhvHjn7XuegIRfecoO0eH625w\",\"key\":\"key95288082384\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "4e2fe5be-db02-4b4b-aa72-68267d3c58ea", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7fe37d2c-6634-46f9-a731-7ff2e84aaf7e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "3a40d73f-ddb9-4e9b-9c6e-4b02e23f45c0", - "x-ms-client-request-id" : "8372d67e-4a0a-49e3-a81d-e87f4d32fa16", - "x-ms-correlation-request-id" : "3a40d73f-ddb9-4e9b-9c6e-4b02e23f45c0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d196f8ec-b9bb-4eb6-9dc0-1027b407bee2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "d196f8ec-b9bb-4eb6-9dc0-1027b407bee2", + "x-ms-client-request-id" : "7fe37d2c-6634-46f9-a731-7ff2e84aaf7e" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d2c1ed12-dfe5-41bf-b0a8-962fcfb20c09", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjQ=;sn=228324", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f6fdabbc-0127-4f79-8ab3-695dd0efecd3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"54sniT2cDiBn3WmWLNn5s7pYHVH\"", - "x-ms-request-id" : "f6fdabbc-0127-4f79-8ab3-695dd0efecd3", - "Body" : "{\"etag\":\"54sniT2cDiBn3WmWLNn5s7pYHVH\",\"key\":\"key89618045239\",\"label\":\"ac66f5b0151795\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "7fee5483-66ef-4f27-9256-40483bc1d3bf" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e28e4168-d118-489e-be3b-833c42fa1cf5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Let4W7Goy0aY5oyYVAkcZrxNP6d\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTI=;sn=364152", + "x-ms-request-id" : "e28e4168-d118-489e-be3b-833c42fa1cf5", + "Body" : "{\"etag\":\"Let4W7Goy0aY5oyYVAkcZrxNP6d\",\"key\":\"key95288082384\",\"label\":\"21c3aed1702801\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "d2c1ed12-dfe5-41bf-b0a8-962fcfb20c09", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f4c7aa6f-d3da-4eca-9837-d84d6289e083", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjU=;sn=228325", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "73e8e111-2350-485e-9298-dd924e08c45d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1Cekn7FheTB5bPUqmRfVUXWgQsh\"", - "x-ms-request-id" : "73e8e111-2350-485e-9298-dd924e08c45d", - "Body" : "{\"etag\":\"1Cekn7FheTB5bPUqmRfVUXWgQsh\",\"key\":\"key89618045239\",\"label\":\"ac66f5b0151795\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "a85b838d-3239-4932-955b-ab3a2f9695ca" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4685f924-395e-47f1-a7f7-f9d3a986551a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qhj8k2SgNEZ9KImMftWvWH3HUxS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTM=;sn=364153", + "x-ms-request-id" : "4685f924-395e-47f1-a7f7-f9d3a986551a", + "Body" : "{\"etag\":\"qhj8k2SgNEZ9KImMftWvWH3HUxS\",\"key\":\"key95288082384\",\"label\":\"21c3aed1702801\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "f4c7aa6f-d3da-4eca-9837-d84d6289e083", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ba928a5a-4f9d-44e8-be32-aa84f31da9d3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjU=;sn=228325", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f56829dd-75fa-4ed4-9a4c-fde238fe5f8f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1Cekn7FheTB5bPUqmRfVUXWgQsh\"", - "x-ms-request-id" : "f56829dd-75fa-4ed4-9a4c-fde238fe5f8f", - "Body" : "{\"etag\":\"1Cekn7FheTB5bPUqmRfVUXWgQsh\",\"key\":\"key89618045239\",\"label\":\"ac66f5b0151795\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "c126919e-a832-4ccf-93aa-126d858bee6e" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "149b1444-b9df-4275-abf7-7a99d73d45d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qhj8k2SgNEZ9KImMftWvWH3HUxS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTM=;sn=364153", + "x-ms-request-id" : "149b1444-b9df-4275-abf7-7a99d73d45d8", + "Body" : "{\"etag\":\"qhj8k2SgNEZ9KImMftWvWH3HUxS\",\"key\":\"key95288082384\",\"label\":\"21c3aed1702801\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "ba928a5a-4f9d-44e8-be32-aa84f31da9d3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c0a76fa8-7035-4de2-ab40-39968bc4ac82", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "1bac4716-7a0e-4514-af56-a3e2f80094da", - "x-ms-client-request-id" : "b159f29b-d6ac-4f26-bf23-c1a5f9d1b872", - "x-ms-correlation-request-id" : "1bac4716-7a0e-4514-af56-a3e2f80094da", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "62489756-bf31-4684-8f7e-bb5ec4f357ee", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "62489756-bf31-4684-8f7e-bb5ec4f357ee", + "x-ms-client-request-id" : "c0a76fa8-7035-4de2-ab40-39968bc4ac82" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a12f09da-7528-45c2-bd64-857c259523bb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMjY=;sn=228326", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7e314a62-7853-44c0-809d-a820efd627ed", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:02 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1Cekn7FheTB5bPUqmRfVUXWgQsh\"", - "x-ms-request-id" : "7e314a62-7853-44c0-809d-a820efd627ed", - "Body" : "{\"etag\":\"1Cekn7FheTB5bPUqmRfVUXWgQsh\",\"key\":\"key89618045239\",\"label\":\"ac66f5b0151795\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:02+00:00\"}", - "x-ms-client-request-id" : "95c78a93-5872-4006-a55e-de05ea079289" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f48f625d-8d69-40a5-a344-bd66879ee61f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qhj8k2SgNEZ9KImMftWvWH3HUxS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNTQ=;sn=364154", + "x-ms-request-id" : "f48f625d-8d69-40a5-a344-bd66879ee61f", + "Body" : "{\"etag\":\"qhj8k2SgNEZ9KImMftWvWH3HUxS\",\"key\":\"key95288082384\",\"label\":\"21c3aed1702801\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:57+00:00\"}", + "x-ms-client-request-id" : "a12f09da-7528-45c2-bd64-857c259523bb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key89618045239?label=ac66f5b0151795", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key95288082384?label=21c3aed1702801", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d8b3c433-f6e0-4dcf-854e-75e739c879d5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "e62ba3a3-af79-4a7b-ab62-b389f192826e", - "x-ms-client-request-id" : "8ec492cd-6fb6-406e-9eac-a10ccf19b88d", - "x-ms-correlation-request-id" : "e62ba3a3-af79-4a7b-ab62-b389f192826e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a7e6bf74-c5f2-46e0-9571-b1dbd1d239c7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "a7e6bf74-c5f2-46e0-9571-b1dbd1d239c7", + "x-ms-client-request-id" : "d8b3c433-f6e0-4dcf-854e-75e739c879d5" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key89618%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key95288%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "29ec7343-30a4-4e97-815a-8f713e19bf1a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37077aec-befc-49da-97da-482c5cfc99a1", + "Date" : "Wed, 02 Oct 2019 20:46:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c64170d3-ebe7-4afb-946a-c20ff870715f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "c64170d3-ebe7-4afb-946a-c20ff870715f", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "86dddbd2-2d4c-4a18-a941-a2535a9e115a", - "x-ms-correlation-request-id" : "37077aec-befc-49da-97da-482c5cfc99a1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "29ec7343-30a4-4e97-815a-8f713e19bf1a", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key89618", "ac66f5b0", "key89618045239", "ac66f5b0151795" ] + "variables" : [ "key95288", "21c3aed1", "key95288082384", "21c3aed1702801" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json index 25c6adda47a8..9c434f745f3f 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSetting.json @@ -1,170 +1,219 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3d522ef4-e132-4238-980e-d34776064915", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODU=;sn=228085", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1c306919-b3e7-4500-be2a-c28ca016f209", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1VeGhrxP4hIZ97vkJyZugauCWpa\"", - "x-ms-request-id" : "1c306919-b3e7-4500-be2a-c28ca016f209", - "Body" : "{\"etag\":\"1VeGhrxP4hIZ97vkJyZugauCWpa\",\"key\":\"key52088596112\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "7f14bd84-df7b-4b5f-9b58-2f0ff20d4068" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "224b708d-a31e-4319-a9b7-bb9a82ee6a78", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"26T0PXMC4SHmYoukdeMcG4ylsVN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTI=;sn=363812", + "x-ms-request-id" : "224b708d-a31e-4319-a9b7-bb9a82ee6a78", + "Body" : "{\"etag\":\"26T0PXMC4SHmYoukdeMcG4ylsVN\",\"key\":\"key72426302678\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "3d522ef4-e132-4238-980e-d34776064915", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a1a5d09c-7dab-47c8-8d6e-aa69ec523dee", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODU=;sn=228085", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5d82e8ae-8be0-4cc2-a366-67a0be8be8b7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1VeGhrxP4hIZ97vkJyZugauCWpa\"", - "x-ms-request-id" : "5d82e8ae-8be0-4cc2-a366-67a0be8be8b7", - "Body" : "{\"etag\":\"1VeGhrxP4hIZ97vkJyZugauCWpa\",\"key\":\"key52088596112\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "21fce845-6085-483b-b5d8-59dcc21c978d" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d91915e7-6170-49d7-aad8-0b3b766e52b3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"26T0PXMC4SHmYoukdeMcG4ylsVN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTI=;sn=363812", + "x-ms-request-id" : "d91915e7-6170-49d7-aad8-0b3b766e52b3", + "Body" : "{\"etag\":\"26T0PXMC4SHmYoukdeMcG4ylsVN\",\"key\":\"key72426302678\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "a1a5d09c-7dab-47c8-8d6e-aa69ec523dee", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "91a78a44-61c3-421b-b791-ef03753fcbab", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODY=;sn=228086", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "35d6c6bc-91c7-442e-b97e-e1359351ad4f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2Ou4IAindudw0rEyc19wIckLgyS\"", - "x-ms-request-id" : "35d6c6bc-91c7-442e-b97e-e1359351ad4f", - "Body" : "{\"etag\":\"2Ou4IAindudw0rEyc19wIckLgyS\",\"key\":\"key52088596112\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "5b51db0e-a5a3-42c2-a87b-7b5ae3f7ea8f" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3b80d88a-a632-42d0-ac95-39cfecd1b329", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"KB3mSGkpezEBwQwaM6VDSqhXGyH\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTM=;sn=363813", + "x-ms-request-id" : "3b80d88a-a632-42d0-ac95-39cfecd1b329", + "Body" : "{\"etag\":\"KB3mSGkpezEBwQwaM6VDSqhXGyH\",\"key\":\"key72426302678\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "91a78a44-61c3-421b-b791-ef03753fcbab", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fa4e770d-69e8-4c0f-9373-96287eae6fd9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODY=;sn=228086", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3d23f331-799a-4024-8069-4a4149719a49", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2Ou4IAindudw0rEyc19wIckLgyS\"", - "x-ms-request-id" : "3d23f331-799a-4024-8069-4a4149719a49", - "Body" : "{\"etag\":\"2Ou4IAindudw0rEyc19wIckLgyS\",\"key\":\"key52088596112\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "18a3283a-2b0e-4230-92b1-c76eadf4f193" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "077b7d01-19d3-40af-ac91-836bc2ba69c5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"KB3mSGkpezEBwQwaM6VDSqhXGyH\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTM=;sn=363813", + "x-ms-request-id" : "077b7d01-19d3-40af-ac91-836bc2ba69c5", + "Body" : "{\"etag\":\"KB3mSGkpezEBwQwaM6VDSqhXGyH\",\"key\":\"key72426302678\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "fa4e770d-69e8-4c0f-9373-96287eae6fd9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key52088%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key72426%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "86354e32-e1aa-4774-aa50-a2ae3fd11382", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODY=;sn=228086", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "cf048ff6-07a7-4352-bba3-20fc3ca81e6e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "cf048ff6-07a7-4352-bba3-20fc3ca81e6e", - "Body" : "{\"items\":[{\"etag\":\"1VeGhrxP4hIZ97vkJyZugauCWpa\",\"key\":\"key52088596112\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"2Ou4IAindudw0rEyc19wIckLgyS\",\"key\":\"key52088596112\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}]}", - "x-ms-client-request-id" : "abd67b8d-37f6-44fe-9e72-44550c335255" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "db89e8de-3976-4457-afde-a51ab9e25046", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTM=;sn=363813", + "x-ms-request-id" : "db89e8de-3976-4457-afde-a51ab9e25046", + "Body" : "{\"items\":[{\"etag\":\"26T0PXMC4SHmYoukdeMcG4ylsVN\",\"key\":\"key72426302678\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"},{\"etag\":\"KB3mSGkpezEBwQwaM6VDSqhXGyH\",\"key\":\"key72426302678\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}]}", + "x-ms-client-request-id" : "86354e32-e1aa-4774-aa50-a2ae3fd11382", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5aa55e70-5ccb-4415-b532-a6e05877488c", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODc=;sn=228087", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9830ad8e-3108-4613-b043-c2226fee04e4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"1VeGhrxP4hIZ97vkJyZugauCWpa\"", - "x-ms-request-id" : "9830ad8e-3108-4613-b043-c2226fee04e4", - "Body" : "{\"etag\":\"1VeGhrxP4hIZ97vkJyZugauCWpa\",\"key\":\"key52088596112\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "8211abd6-3769-4ae4-9329-ef963f7fe349" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2973f7dc-67be-40c8-8104-2686f7b6b0d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"26T0PXMC4SHmYoukdeMcG4ylsVN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTQ=;sn=363814", + "x-ms-request-id" : "2973f7dc-67be-40c8-8104-2686f7b6b0d8", + "Body" : "{\"etag\":\"26T0PXMC4SHmYoukdeMcG4ylsVN\",\"key\":\"key72426302678\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "5aa55e70-5ccb-4415-b532-a6e05877488c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key52088596112?label=myLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72426302678?label=myLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ad4bf0a9-c21e-4556-be01-663d16f82e18", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODg=;sn=228088", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9a13beac-f4da-47d2-9733-0a2d461fd83d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2Ou4IAindudw0rEyc19wIckLgyS\"", - "x-ms-request-id" : "9a13beac-f4da-47d2-9733-0a2d461fd83d", - "Body" : "{\"etag\":\"2Ou4IAindudw0rEyc19wIckLgyS\",\"key\":\"key52088596112\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "6eeb34c8-ca13-415e-8f8a-0bbcb10ec3af" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2c3fabd3-42b1-4bb7-8be2-51ea445f9bea", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"KB3mSGkpezEBwQwaM6VDSqhXGyH\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTU=;sn=363815", + "x-ms-request-id" : "2c3fabd3-42b1-4bb7-8be2-51ea445f9bea", + "Body" : "{\"etag\":\"KB3mSGkpezEBwQwaM6VDSqhXGyH\",\"key\":\"key72426302678\",\"label\":\"myLabel\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "ad4bf0a9-c21e-4556-be01-663d16f82e18", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key52088", "afdc88a7", "key52088596112" ] + "variables" : [ "key72426", "9fd25be5", "key72426302678" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json index 249a69ec9325..ab5dc199fbb9 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/getSettingNotFound.json @@ -1,112 +1,147 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5036289543f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9242521813a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b3ae37fd-5764-427f-9f1a-9e50accb758b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzA=;sn=228170", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "868973ac-a710-46c7-91a3-ad75892fb599", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"BugDP9UiuXxpIDsIMEx2TpoE8tK\"", - "x-ms-request-id" : "868973ac-a710-46c7-91a3-ad75892fb599", - "Body" : "{\"etag\":\"BugDP9UiuXxpIDsIMEx2TpoE8tK\",\"key\":\"key5036289543f\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "f502b3e2-add2-4813-b347-4463f8bbe16c" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2cb4720c-66de-4885-839f-80f9157dc843", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B0iHzJlM8rl4AIyldjExX6OSque\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDM=;sn=364003", + "x-ms-request-id" : "2cb4720c-66de-4885-839f-80f9157dc843", + "Body" : "{\"etag\":\"B0iHzJlM8rl4AIyldjExX6OSque\",\"key\":\"key9242521813a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "b3ae37fd-5764-427f-9f1a-9e50accb758b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/myNonExistentKey", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/myNonExistentKey", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "31938d14-f5e7-40d0-8543-5c61c0eeb164", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "c488206d-705c-471f-81b7-605ac9f063fc", - "x-ms-client-request-id" : "60ee2863-b507-4c3d-8268-862b43cce9ab", - "x-ms-correlation-request-id" : "c488206d-705c-471f-81b7-605ac9f063fc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "327c480f-9108-4f3e-946d-453fb4a7fbdc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "327c480f-9108-4f3e-946d-453fb4a7fbdc", + "x-ms-client-request-id" : "31938d14-f5e7-40d0-8543-5c61c0eeb164" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5036289543f?label=myNonExistentLabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9242521813a?label=myNonExistentLabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "064f713e-76ae-4121-9811-f39aa55c5e52", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "2bfb81ee-d3e2-4640-9cf2-93aa88c2bd7e", - "x-ms-client-request-id" : "f0c2d3a1-f0d8-4ffb-ba8e-774ea8902d9f", - "x-ms-correlation-request-id" : "2bfb81ee-d3e2-4640-9cf2-93aa88c2bd7e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "34840ae2-e7cd-4cf8-bde2-682bbf08342b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "34840ae2-e7cd-4cf8-bde2-682bbf08342b", + "x-ms-client-request-id" : "064f713e-76ae-4121-9811-f39aa55c5e52" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key50362%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key92425%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3a03a316-64c0-4b4e-bee4-a0da99c74c7e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzA=;sn=228170", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a256ef4c-32bd-43c0-9cb5-b101b10c8677", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "a256ef4c-32bd-43c0-9cb5-b101b10c8677", - "Body" : "{\"items\":[{\"etag\":\"BugDP9UiuXxpIDsIMEx2TpoE8tK\",\"key\":\"key5036289543f\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "fc923f22-4764-430a-9c00-74f259588e64" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4fceac53-7968-49be-9b3d-28c281c30368", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDM=;sn=364003", + "x-ms-request-id" : "4fceac53-7968-49be-9b3d-28c281c30368", + "Body" : "{\"items\":[{\"etag\":\"B0iHzJlM8rl4AIyldjExX6OSque\",\"key\":\"key9242521813a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}]}", + "x-ms-client-request-id" : "3a03a316-64c0-4b4e-bee4-a0da99c74c7e", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5036289543f", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key9242521813a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "42c92d99-8827-4845-8c92-c516b36afcb4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzE=;sn=228171", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1819b2cd-6cc1-43d1-a353-4e2f0395bef3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"BugDP9UiuXxpIDsIMEx2TpoE8tK\"", - "x-ms-request-id" : "1819b2cd-6cc1-43d1-a353-4e2f0395bef3", - "Body" : "{\"etag\":\"BugDP9UiuXxpIDsIMEx2TpoE8tK\",\"key\":\"key5036289543f\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "59b05991-f5ae-4f73-bdd1-4aad77fc1471" - } + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "519e5344-db18-445a-b937-e1d9767f962f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B0iHzJlM8rl4AIyldjExX6OSque\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDQ=;sn=364004", + "x-ms-request-id" : "519e5344-db18-445a-b937-e1d9767f962f", + "Body" : "{\"etag\":\"B0iHzJlM8rl4AIyldjExX6OSque\",\"key\":\"key9242521813a\",\"label\":null,\"content_type\":null,\"value\":\"myNeverRetreivedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "42c92d99-8827-4845-8c92-c516b36afcb4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key50362", "a89383e2", "key5036289543f" ] + "variables" : [ "key92425", "89853284", "key9242521813a" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json index 2c176345784c..2777546774dd 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisions.json @@ -1,168 +1,217 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key8033919528a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14977723472", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3b3a13e4-9d0d-43cb-9415-7d17276efabf", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjY=;sn=228166", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "21c1d272-707d-4600-a2cc-8f507d24b4c8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"UYMOxVDhRFLM0hqd2Y1IXryMYCE\"", - "x-ms-request-id" : "21c1d272-707d-4600-a2cc-8f507d24b4c8", - "Body" : "{\"etag\":\"UYMOxVDhRFLM0hqd2Y1IXryMYCE\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "457a37aa-35f2-458b-abb1-58bd7436b5bf" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5fb84e14-544e-41d2-8e6b-2ea2806cf622", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fdvW4GexamUDGA2hp2KfFMsN7Kf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDg=;sn=363948", + "x-ms-request-id" : "5fb84e14-544e-41d2-8e6b-2ea2806cf622", + "Body" : "{\"etag\":\"fdvW4GexamUDGA2hp2KfFMsN7Kf\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "3b3a13e4-9d0d-43cb-9415-7d17276efabf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key8033919528a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14977723472", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2cae5e7a-b2e3-40c3-8f7c-55d0583606e5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjc=;sn=228167", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "2b25ea1d-06db-479e-823b-79a0a896c18b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"MSiD4qGopNIL08baoNkNGv8H3jj\"", - "x-ms-request-id" : "2b25ea1d-06db-479e-823b-79a0a896c18b", - "Body" : "{\"etag\":\"MSiD4qGopNIL08baoNkNGv8H3jj\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "2b3d6b7a-b095-4b76-a5eb-a735a7b16d92" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8bf49d38-1884-4604-971c-03a0f8a0b560", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"i7kvvhlG3hUHPF7z6daJlwNMHak\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDk=;sn=363949", + "x-ms-request-id" : "8bf49d38-1884-4604-971c-03a0f8a0b560", + "Body" : "{\"etag\":\"i7kvvhlG3hUHPF7z6daJlwNMHak\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "2cae5e7a-b2e3-40c3-8f7c-55d0583606e5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key8033919528a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14977723472", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3223e3fa-ca53-4e8c-9cfd-cc4016f858b5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjg=;sn=228168", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7a75ab1b-d87a-449d-934e-abae71b10d35", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"M3ZR2USQO4boLXJYc2mAIbs7A8y\"", - "x-ms-request-id" : "7a75ab1b-d87a-449d-934e-abae71b10d35", - "Body" : "{\"etag\":\"M3ZR2USQO4boLXJYc2mAIbs7A8y\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "af33100e-0704-4952-b474-bc942c5e677b" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "62f8f369-81bf-4112-8849-50d2db04e609", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"A1t5l8FWwIZXNEFkNrZSKnitxKd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTA=;sn=363950", + "x-ms-request-id" : "62f8f369-81bf-4112-8849-50d2db04e609", + "Body" : "{\"etag\":\"A1t5l8FWwIZXNEFkNrZSKnitxKd\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "3223e3fa-ca53-4e8c-9cfd-cc4016f858b5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key8033919528a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key14977723472", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "df283e73-f586-4376-bc03-e8910f803646", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjg=;sn=228168", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "da235abd-d28c-4289-9862-70e85c9266b8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "da235abd-d28c-4289-9862-70e85c9266b8", - "Body" : "{\"items\":[{\"etag\":\"M3ZR2USQO4boLXJYc2mAIbs7A8y\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"},{\"etag\":\"MSiD4qGopNIL08baoNkNGv8H3jj\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"},{\"etag\":\"UYMOxVDhRFLM0hqd2Y1IXryMYCE\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}]}", - "x-ms-client-request-id" : "f9bedb69-28ec-47d1-89c5-a1cf4385112a" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "df9445ec-a391-4d7d-b706-2222240025dc", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTA=;sn=363950", + "x-ms-request-id" : "df9445ec-a391-4d7d-b706-2222240025dc", + "Body" : "{\"items\":[{\"etag\":\"A1t5l8FWwIZXNEFkNrZSKnitxKd\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"},{\"etag\":\"i7kvvhlG3hUHPF7z6daJlwNMHak\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"},{\"etag\":\"fdvW4GexamUDGA2hp2KfFMsN7Kf\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}]}", + "x-ms-client-request-id" : "df283e73-f586-4376-bc03-e8910f803646", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key8033919528a&$select=key%2cetag", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key14977723472&$select=key%2cetag", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a545e636-fff4-4ee6-8be2-910267d22ab5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjg=;sn=228168", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "eca94b66-114c-4bd9-a014-72364fb4d5ae", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "eca94b66-114c-4bd9-a014-72364fb4d5ae", - "Body" : "{\"items\":[{\"etag\":\"M3ZR2USQO4boLXJYc2mAIbs7A8y\",\"key\":\"key8033919528a\"},{\"etag\":\"MSiD4qGopNIL08baoNkNGv8H3jj\",\"key\":\"key8033919528a\"},{\"etag\":\"UYMOxVDhRFLM0hqd2Y1IXryMYCE\",\"key\":\"key8033919528a\"}]}", - "x-ms-client-request-id" : "a5b960f7-002a-4fa8-958e-9f3404174881" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8c3f03bb-d4af-4948-9cb4-f0a28c7929cd", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTA=;sn=363950", + "x-ms-request-id" : "8c3f03bb-d4af-4948-9cb4-f0a28c7929cd", + "Body" : "{\"items\":[{\"etag\":\"A1t5l8FWwIZXNEFkNrZSKnitxKd\",\"key\":\"key14977723472\"},{\"etag\":\"i7kvvhlG3hUHPF7z6daJlwNMHak\",\"key\":\"key14977723472\"},{\"etag\":\"fdvW4GexamUDGA2hp2KfFMsN7Kf\",\"key\":\"key14977723472\"}]}", + "x-ms-client-request-id" : "a545e636-fff4-4ee6-8be2-910267d22ab5", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key80339%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key14977%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1ee19b9b-3988-4ecf-aac8-c825a0f69a13", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjg=;sn=228168", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "48d3cde1-8181-45d9-95f0-88686bb1bb65", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "48d3cde1-8181-45d9-95f0-88686bb1bb65", - "Body" : "{\"items\":[{\"etag\":\"M3ZR2USQO4boLXJYc2mAIbs7A8y\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "97e17ed7-d25d-4527-9b7c-956544af2db9" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "345bdaf5-5ad4-4baf-a6de-87ae87ea7d05", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTA=;sn=363950", + "x-ms-request-id" : "345bdaf5-5ad4-4baf-a6de-87ae87ea7d05", + "Body" : "{\"items\":[{\"etag\":\"A1t5l8FWwIZXNEFkNrZSKnitxKd\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}]}", + "x-ms-client-request-id" : "1ee19b9b-3988-4ecf-aac8-c825a0f69a13", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key8033919528a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14977723472", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2bc71660-804d-4e18-9405-af5642a19671", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjk=;sn=228169", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:44 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4d8757b9-ce85-46f7-bda5-69c76ebde481", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"M3ZR2USQO4boLXJYc2mAIbs7A8y\"", - "x-ms-request-id" : "4d8757b9-ce85-46f7-bda5-69c76ebde481", - "Body" : "{\"etag\":\"M3ZR2USQO4boLXJYc2mAIbs7A8y\",\"key\":\"key8033919528a\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "259f2984-24c3-4ffc-ae3a-96eacbca7294" - } + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3532ef92-b554-4346-897c-83b01d8eb5de", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"A1t5l8FWwIZXNEFkNrZSKnitxKd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTE=;sn=363951", + "x-ms-request-id" : "3532ef92-b554-4346-897c-83b01d8eb5de", + "Body" : "{\"etag\":\"A1t5l8FWwIZXNEFkNrZSKnitxKd\",\"key\":\"key14977723472\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:44+00:00\"}", + "x-ms-client-request-id" : "2bc71660-804d-4e18-9405-af5642a19671", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key80339", "f6706566", "key8033919528a" ] + "variables" : [ "key14977", "21d72ace", "key14977723472" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json index 8e2c618e8b17..2db7f3ba80fc 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsAcceptDateTime.json @@ -1,170 +1,219 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f39cfac2-ad63-492b-a519-9af9251b9ebf", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODc=;sn=228187", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e9e44420-468a-416b-8513-13f54e53a633", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:52 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Nv41lvwxPnMAB4PpNLvnBbsz0a4\"", - "x-ms-request-id" : "e9e44420-468a-416b-8513-13f54e53a633", - "Body" : "{\"etag\":\"Nv41lvwxPnMAB4PpNLvnBbsz0a4\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:52+00:00\"}", - "x-ms-client-request-id" : "570659b6-2135-4e34-9d9e-ce47493b13cf" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d0156c92-8102-48ae-a7a2-6e4382d6fa13", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"9vaM0xuuWMeK0pBYPV5fHVTHK0B\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTU=;sn=364015", + "x-ms-request-id" : "d0156c92-8102-48ae-a7a2-6e4382d6fa13", + "Body" : "{\"etag\":\"9vaM0xuuWMeK0pBYPV5fHVTHK0B\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "f39cfac2-ad63-492b-a519-9af9251b9ebf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "56ca4d0a-e586-4410-b1ed-5dbbd673f3e5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:53 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODg=;sn=228188", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3d221596-bec0-4277-94dc-ca6b499b92c2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:54 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6B6CM1fW5op3uClizSKjRgeLxVf\"", - "x-ms-request-id" : "3d221596-bec0-4277-94dc-ca6b499b92c2", - "Body" : "{\"etag\":\"6B6CM1fW5op3uClizSKjRgeLxVf\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:54+00:00\"}", - "x-ms-client-request-id" : "d76c4a9c-9f64-4569-b84d-24f39eb58ef9" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "55f83c31-6946-4641-b1ec-15d49bf836f9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TwqdGYYC3nhqgC9uaWWZj4xoRnK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTY=;sn=364016", + "x-ms-request-id" : "55f83c31-6946-4641-b1ec-15d49bf836f9", + "Body" : "{\"etag\":\"TwqdGYYC3nhqgC9uaWWZj4xoRnK\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "56ca4d0a-e586-4410-b1ed-5dbbd673f3e5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c002bfc-d6cb-4f84-8e06-ede44480241a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:55 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODk=;sn=228189", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f68c682a-10e9-4e5c-badd-5046e401c2b2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:56 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\"", - "x-ms-request-id" : "f68c682a-10e9-4e5c-badd-5046e401c2b2", - "Body" : "{\"etag\":\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:56+00:00\"}", - "x-ms-client-request-id" : "792a8ded-9f72-49d2-aded-d4a2d4a62700" - } + "Date" : "Wed, 02 Oct 2019 20:46:53 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "66324693-feb7-428e-b709-3f69c8fc5853", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"9TaHllAUCOiVdq6jvzZg089sdye\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTc=;sn=364017", + "x-ms-request-id" : "66324693-feb7-428e-b709-3f69c8fc5853", + "Body" : "{\"etag\":\"9TaHllAUCOiVdq6jvzZg089sdye\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5c002bfc-d6cb-4f84-8e06-ede44480241a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a295ce90-fb4d-423b-a8e7-28d00f7edf06", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:55 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODk=;sn=228189", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "31e1a0fa-f8e4-405a-b7ff-1f3899065de4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "31e1a0fa-f8e4-405a-b7ff-1f3899065de4", - "Body" : "{\"items\":[{\"etag\":\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:56+00:00\"},{\"etag\":\"6B6CM1fW5op3uClizSKjRgeLxVf\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:54+00:00\"},{\"etag\":\"Nv41lvwxPnMAB4PpNLvnBbsz0a4\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:52+00:00\"}]}", - "x-ms-client-request-id" : "bbd1b761-eb9d-4df3-8ef6-922d7a6c5eea" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6a8b59c2-42f8-47ac-8836-7e05c6cf6391", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTc=;sn=364017", + "x-ms-request-id" : "6a8b59c2-42f8-47ac-8836-7e05c6cf6391", + "Body" : "{\"items\":[{\"etag\":\"9TaHllAUCOiVdq6jvzZg089sdye\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"TwqdGYYC3nhqgC9uaWWZj4xoRnK\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"},{\"etag\":\"9vaM0xuuWMeK0pBYPV5fHVTHK0B\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}]}", + "x-ms-client-request-id" : "a295ce90-fb4d-423b-a8e7-28d00f7edf06", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c50765c0-31d3-4b68-b038-718a9237f731", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:55 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "memento-datetime" : "Wed, 24 Apr 2019 18:48:54 GMT", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODk=;sn=228189", - "link" : "; rel=\"original\"", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Memento-Datetime" : "Wed, 02 Oct 2019 20:46:52 GMT", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ba7b7412-0dde-47a6-887e-53c410a20bb3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "ba7b7412-0dde-47a6-887e-53c410a20bb3", - "Body" : "{\"items\":[{\"etag\":\"6B6CM1fW5op3uClizSKjRgeLxVf\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:54+00:00\"},{\"etag\":\"Nv41lvwxPnMAB4PpNLvnBbsz0a4\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:52+00:00\"}]}", - "x-ms-client-request-id" : "48d44939-72d0-43df-b89e-36747990a289" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "82e73093-5ea2-4ff4-8234-6674491309a7", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTc=;sn=364017", + "x-ms-request-id" : "82e73093-5ea2-4ff4-8234-6674491309a7", + "Body" : "{\"items\":[{\"etag\":\"TwqdGYYC3nhqgC9uaWWZj4xoRnK\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"},{\"etag\":\"9vaM0xuuWMeK0pBYPV5fHVTHK0B\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}]}", + "Link" : "; rel=\"original\"", + "x-ms-client-request-id" : "c50765c0-31d3-4b68-b038-718a9237f731", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key64082%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key14683%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "68d5ea92-9ffa-4872-a689-c1a79e6e1435", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:55 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODk=;sn=228189", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ee9a72d4-9adc-426d-8d1f-c42d74bd1438", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "ee9a72d4-9adc-426d-8d1f-c42d74bd1438", - "Body" : "{\"items\":[{\"etag\":\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:56+00:00\"}]}", - "x-ms-client-request-id" : "7fd03a21-1f44-453e-8505-e75ff13e5ab1" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dc4811e1-df7f-4626-8675-46f517843f56", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTc=;sn=364017", + "x-ms-request-id" : "dc4811e1-df7f-4626-8675-46f517843f56", + "Body" : "{\"items\":[{\"etag\":\"9TaHllAUCOiVdq6jvzZg089sdye\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}]}", + "x-ms-client-request-id" : "68d5ea92-9ffa-4872-a689-c1a79e6e1435", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key6408272053c", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14683074167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3e64a2ee-8ecb-4808-b093-3ed542494257", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:55 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxOTA=;sn=228190", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "360dea66-80dc-4b21-a547-871277123533", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:56 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\"", - "x-ms-request-id" : "360dea66-80dc-4b21-a547-871277123533", - "Body" : "{\"etag\":\"rAHsWb7eAaTn4SxFzAIEHzPiDzZ\",\"key\":\"key6408272053c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:56+00:00\"}", - "x-ms-client-request-id" : "de19827d-2d0b-42fe-9e07-57c5942f7e81" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "39b3deb0-51f4-4e0b-8090-c8d1dcaf899e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"9TaHllAUCOiVdq6jvzZg089sdye\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTg=;sn=364018", + "x-ms-request-id" : "39b3deb0-51f4-4e0b-8090-c8d1dcaf899e", + "Body" : "{\"etag\":\"9TaHllAUCOiVdq6jvzZg089sdye\",\"key\":\"key14683074167\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3e64a2ee-8ecb-4808-b093-3ed542494257", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key64082", "52381b11", "key6408272053c" ] + "variables" : [ "key14683", "bd5523a3", "key14683074167" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsInvalidRange.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsInvalidRange.json deleted file mode 100644 index be1b6beb65d2..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsInvalidRange.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key78400967568", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Tue, 30 Apr 2019 21:50:58 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNTUyMDI=;sn=255202", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "92101e5b-177c-4bb6-aec2-8854b33d7c28", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 21:50:59 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2yr5PU4mnnfYH3hqjQIHcZsAmUk\"", - "x-ms-request-id" : "92101e5b-177c-4bb6-aec2-8854b33d7c28", - "Body" : "{\"etag\":\"2yr5PU4mnnfYH3hqjQIHcZsAmUk\",\"key\":\"key78400967568\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T21:50:59+00:00\"}", - "x-ms-client-request-id" : "77f30836-24a4-400f-8e41-f4f7e75878e1" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key78400967568", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Tue, 30 Apr 2019 21:50:59 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "416", - "x-ms-request-id" : "222e1643-1209-4b40-9ffc-5b9ffd511bca", - "x-ms-client-request-id" : "d4116441-f0e6-45a6-bc2c-04d0821a33d0", - "x-ms-correlation-request-id" : "222e1643-1209-4b40-9ffc-5b9ffd511bca", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key78400%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Tue, 30 Apr 2019 21:50:59 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNTUyMDI=;sn=255202", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "3b9aa2c5-9ff9-476e-9856-f5b1e13e06b5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "3b9aa2c5-9ff9-476e-9856-f5b1e13e06b5", - "Body" : "{\"items\":[{\"etag\":\"2yr5PU4mnnfYH3hqjQIHcZsAmUk\",\"key\":\"key78400967568\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T21:50:59+00:00\"}]}", - "x-ms-client-request-id" : "bcb0ffe3-6dc9-40a4-a204-5cf0de1f2a0d" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key78400967568", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Tue, 30 Apr 2019 21:50:59 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNTUyMDM=;sn=255203", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "1a641900-dada-4dad-bcad-3346156e902f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 21:50:59 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2yr5PU4mnnfYH3hqjQIHcZsAmUk\"", - "x-ms-request-id" : "1a641900-dada-4dad-bcad-3346156e902f", - "Body" : "{\"etag\":\"2yr5PU4mnnfYH3hqjQIHcZsAmUk\",\"key\":\"key78400967568\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T21:50:59+00:00\"}", - "x-ms-client-request-id" : "1f33f128-a16f-4420-a69d-5947c5bbc380" - } - } ], - "variables" : [ "key78400", "96ec25e9", "key78400967568" ] -} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json index a283068cca62..f990d2acc379 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleKeys.json @@ -1,193 +1,249 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343763391", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971165836", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0029db2a-412b-48f6-beae-22493adfbe7d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTE=;sn=228291", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9ce8c4cc-f175-4c48-845d-b94c186048df", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"cY5OeHWfMhQvvcMmG7oxoObJehp\"", - "x-ms-request-id" : "9ce8c4cc-f175-4c48-845d-b94c186048df", - "Body" : "{\"etag\":\"cY5OeHWfMhQvvcMmG7oxoObJehp\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "d7b72bf5-e537-4d08-b633-abb393ac8761" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fe04b82e-ed39-4f9a-83e8-b8b9bb15577d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ootyt3XWANIhqDnYDoqVRJH3pEQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTk=;sn=364119", + "x-ms-request-id" : "fe04b82e-ed39-4f9a-83e8-b8b9bb15577d", + "Body" : "{\"etag\":\"ootyt3XWANIhqDnYDoqVRJH3pEQ\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "0029db2a-412b-48f6-beae-22493adfbe7d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343763391", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971165836", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2675c210-b0e2-4639-96eb-996d1d0ac322", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTI=;sn=228292", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e60d0d42-75f5-4c34-a25b-099e3a1cd9b1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"j25JRsVATU1y7n7oh0rj9eunzn9\"", - "x-ms-request-id" : "e60d0d42-75f5-4c34-a25b-099e3a1cd9b1", - "Body" : "{\"etag\":\"j25JRsVATU1y7n7oh0rj9eunzn9\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "51dcda31-4d0c-47cf-85f6-f8cec6980012" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7b9e6f14-faea-41d3-b403-9c703c28bd39", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjA=;sn=364120", + "x-ms-request-id" : "7b9e6f14-faea-41d3-b403-9c703c28bd39", + "Body" : "{\"etag\":\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "2675c210-b0e2-4639-96eb-996d1d0ac322", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343156272", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971919855", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f72c416a-7f95-4af3-969c-747d0d9d4ccf", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTM=;sn=228293", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1a486004-93e6-46c2-b27e-9f320a526417", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TX9FP2yrl2Za6oJBaYc72g3PtJJ\"", - "x-ms-request-id" : "1a486004-93e6-46c2-b27e-9f320a526417", - "Body" : "{\"etag\":\"TX9FP2yrl2Za6oJBaYc72g3PtJJ\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "15c2a177-82ac-4e9c-8a01-ac1915aa4332" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e328b3f6-55a3-4b74-9530-2f32a2aa720b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"cKQMBnrNaYRx5EjUMRgOutCAyGp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjE=;sn=364121", + "x-ms-request-id" : "e328b3f6-55a3-4b74-9530-2f32a2aa720b", + "Body" : "{\"etag\":\"cKQMBnrNaYRx5EjUMRgOutCAyGp\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "f72c416a-7f95-4af3-969c-747d0d9d4ccf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343156272", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971919855", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5f82c482-e9af-4001-bde9-f01ad85e1b57", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTQ=;sn=228294", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "71e208ee-7bc0-4a7d-9b75-0cdd65e09a1b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TH05rjGAPN5rC4liYPaiELOjNDN\"", - "x-ms-request-id" : "71e208ee-7bc0-4a7d-9b75-0cdd65e09a1b", - "Body" : "{\"etag\":\"TH05rjGAPN5rC4liYPaiELOjNDN\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "bb11e6b2-b27f-4d2f-97f9-ed7670edebf2" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6c77b4ec-4f0d-4688-b796-4ee2fb5bb0eb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"i88GynyDXU9nA8jYoZdvbicg9zy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjI=;sn=364122", + "x-ms-request-id" : "6c77b4ec-4f0d-4688-b796-4ee2fb5bb0eb", + "Body" : "{\"etag\":\"i88GynyDXU9nA8jYoZdvbicg9zy\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "5f82c482-e9af-4001-bde9-f01ad85e1b57", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key73343763391%2ckey73343156272", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key52971165836%2ckey52971919855", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d0a33ef6-8c09-4518-91b1-a5df93cdf152", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTQ=;sn=228294", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ab89994d-bc27-4b6e-bd67-b24848f76bfc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "ab89994d-bc27-4b6e-bd67-b24848f76bfc", - "Body" : "{\"items\":[{\"etag\":\"TH05rjGAPN5rC4liYPaiELOjNDN\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"},{\"etag\":\"TX9FP2yrl2Za6oJBaYc72g3PtJJ\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"},{\"etag\":\"j25JRsVATU1y7n7oh0rj9eunzn9\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"},{\"etag\":\"cY5OeHWfMhQvvcMmG7oxoObJehp\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}]}", - "x-ms-client-request-id" : "315d4778-b5c4-4b86-924e-09e826532c79" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "eb6558dd-9cf0-438e-96dc-5a6be474ba6f", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjI=;sn=364122", + "x-ms-request-id" : "eb6558dd-9cf0-438e-96dc-5a6be474ba6f", + "Body" : "{\"items\":[{\"etag\":\"i88GynyDXU9nA8jYoZdvbicg9zy\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"cKQMBnrNaYRx5EjUMRgOutCAyGp\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"ootyt3XWANIhqDnYDoqVRJH3pEQ\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}]}", + "x-ms-client-request-id" : "d0a33ef6-8c09-4518-91b1-a5df93cdf152", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key73343%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52971%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca3b151a-a117-4424-bd9d-2f8e5f485979", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTQ=;sn=228294", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b0159341-8bb9-4d2c-9bab-509d9c73ffa5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "b0159341-8bb9-4d2c-9bab-509d9c73ffa5", - "Body" : "{\"items\":[{\"etag\":\"TH05rjGAPN5rC4liYPaiELOjNDN\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"},{\"etag\":\"j25JRsVATU1y7n7oh0rj9eunzn9\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}]}", - "x-ms-client-request-id" : "30056f64-8e69-4179-8087-709fefc12c39" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "63a7b09b-9599-4ac9-b582-7de667b78804", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjI=;sn=364122", + "x-ms-request-id" : "63a7b09b-9599-4ac9-b582-7de667b78804", + "Body" : "{\"items\":[{\"etag\":\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"i88GynyDXU9nA8jYoZdvbicg9zy\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}]}", + "x-ms-client-request-id" : "ca3b151a-a117-4424-bd9d-2f8e5f485979", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343156272", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971165836", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e92b162d-ced5-44d6-83b2-f0a4d2d886bc", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTU=;sn=228295", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f85cc8d1-a453-41ac-a7f1-1d17747a5773", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TH05rjGAPN5rC4liYPaiELOjNDN\"", - "x-ms-request-id" : "f85cc8d1-a453-41ac-a7f1-1d17747a5773", - "Body" : "{\"etag\":\"TH05rjGAPN5rC4liYPaiELOjNDN\",\"key\":\"key73343156272\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "6a5c0579-67e5-4008-a41e-b02f3bc71756" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c9b8f2b0-9ecf-4312-8fff-6bef4b7b67eb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjM=;sn=364123", + "x-ms-request-id" : "c9b8f2b0-9ecf-4312-8fff-6bef4b7b67eb", + "Body" : "{\"etag\":\"Ks1tkLhCbRK5dGtMp1oARYwMbMB\",\"key\":\"key52971165836\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "e92b162d-ced5-44d6-83b2-f0a4d2d886bc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key73343763391", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key52971919855", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2a31e8d7-efbf-4ba5-903f-de35b59f6935", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTY=;sn=228296", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "959eca01-4644-4720-9287-98366b4bbb05", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:00 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"j25JRsVATU1y7n7oh0rj9eunzn9\"", - "x-ms-request-id" : "959eca01-4644-4720-9287-98366b4bbb05", - "Body" : "{\"etag\":\"j25JRsVATU1y7n7oh0rj9eunzn9\",\"key\":\"key73343763391\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:00+00:00\"}", - "x-ms-client-request-id" : "2eb5a15b-3c5a-4146-8331-77a196188091" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f71d02fa-38f2-4630-a85c-c7f455727308", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"i88GynyDXU9nA8jYoZdvbicg9zy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjQ=;sn=364124", + "x-ms-request-id" : "f71d02fa-38f2-4630-a85c-c7f455727308", + "Body" : "{\"etag\":\"i88GynyDXU9nA8jYoZdvbicg9zy\",\"key\":\"key52971919855\",\"label\":null,\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "2a31e8d7-efbf-4ba5-903f-de35b59f6935", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key73343", "6be460d8", "key73343763391", "key73343156272" ] + "variables" : [ "key52971", "e628d0b6", "key52971165836", "key52971919855" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json index 5e3d7f8cf3e7..b8c23428d305 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithMultipleLabels.json @@ -1,193 +1,249 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc22402680", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56871564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b206306-8b4c-4105-a48b-c2ff9249595f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzk=;sn=228079", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "09189d52-82b2-4959-8018-3cbd8e926e51", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"c9OrcbC9t9ddJZRUjG4KhIglOIy\"", - "x-ms-request-id" : "09189d52-82b2-4959-8018-3cbd8e926e51", - "Body" : "{\"etag\":\"c9OrcbC9t9ddJZRUjG4KhIglOIy\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "4278458b-f82b-4ff8-b3eb-76db453009e6" - } + "Date" : "Wed, 02 Oct 2019 20:46:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "610eb852-d4b0-499b-90b6-b9dc1729e9ca", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"NusKOfhULANj4wVrqEvZIIXamM8\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDY=;sn=363806", + "x-ms-request-id" : "610eb852-d4b0-499b-90b6-b9dc1729e9ca", + "Body" : "{\"etag\":\"NusKOfhULANj4wVrqEvZIIXamM8\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "9b206306-8b4c-4105-a48b-c2ff9249595f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc22402680", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56871564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "702a400e-c870-478d-a35b-284ba13dd5a7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODA=;sn=228080", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b3933a9f-2f6a-4055-bb7e-e14be35d2e6c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\"", - "x-ms-request-id" : "b3933a9f-2f6a-4055-bb7e-e14be35d2e6c", - "Body" : "{\"etag\":\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "6ff57327-e287-4642-9b1e-a80c7145a622" - } + "Date" : "Wed, 02 Oct 2019 20:46:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4c1452ac-915f-4eef-9e17-9a8ae4ade4f7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4T9FAwmRvOdUloWfWlsIfoLAzWR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDc=;sn=363807", + "x-ms-request-id" : "4c1452ac-915f-4eef-9e17-9a8ae4ade4f7", + "Body" : "{\"etag\":\"4T9FAwmRvOdUloWfWlsIfoLAzWR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "702a400e-c870-478d-a35b-284ba13dd5a7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc2228813d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56692089", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3e349aa9-f7dc-4b53-8eaf-1f8821e34088", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODE=;sn=228081", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e8653552-2bf9-47f4-9c5f-3b4bd7ea2b38", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"hSYu7QRRDowN03tGfORkFp2KcQa\"", - "x-ms-request-id" : "e8653552-2bf9-47f4-9c5f-3b4bd7ea2b38", - "Body" : "{\"etag\":\"hSYu7QRRDowN03tGfORkFp2KcQa\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "e2bf79a1-f38e-4303-ab84-16b0fac8032e" - } + "Date" : "Wed, 02 Oct 2019 20:46:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "07336269-9524-48f6-b886-0abb894db279", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YdKrngyF5mNheVwFMEpouIIxHQR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDg=;sn=363808", + "x-ms-request-id" : "07336269-9524-48f6-b886-0abb894db279", + "Body" : "{\"etag\":\"YdKrngyF5mNheVwFMEpouIIxHQR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "3e349aa9-f7dc-4b53-8eaf-1f8821e34088", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc2228813d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56692089", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "01535d89-bc0d-4e3e-b953-596a013f4291", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODI=;sn=228082", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "2870d25a-dacd-4eb6-a45d-722d4c39b6fc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\"", - "x-ms-request-id" : "2870d25a-dacd-4eb6-a45d-722d4c39b6fc", - "Body" : "{\"etag\":\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "5cf1fba6-1c23-4ad6-a089-03f4c6435d70" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b9da1262-6545-448e-b44d-f35833313cd2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jfjzObocLQOoFZJjKrG68PuiZOI\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDk=;sn=363809", + "x-ms-request-id" : "b9da1262-6545-448e-b44d-f35833313cd2", + "Body" : "{\"etag\":\"jfjzObocLQOoFZJjKrG68PuiZOI\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "01535d89-bc0d-4e3e-b953-596a013f4291", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key5935433720d&label=d7a5fc22402680%2cd7a5fc2228813d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key3661473688b&label=f2526a56871564%2cf2526a56692089", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "68ac7bd2-5e74-4cca-95ab-793f8485c52a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODI=;sn=228082", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9ab7b14d-3b6e-4f62-94c3-de2e66078178", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "9ab7b14d-3b6e-4f62-94c3-de2e66078178", - "Body" : "{\"items\":[{\"etag\":\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"hSYu7QRRDowN03tGfORkFp2KcQa\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"},{\"etag\":\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"},{\"etag\":\"c9OrcbC9t9ddJZRUjG4KhIglOIy\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}]}", - "x-ms-client-request-id" : "cc1117f5-0187-4d7f-bc70-989338729269" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9051d662-4afe-4e4a-b4af-6a3a663f2c05", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDk=;sn=363809", + "x-ms-request-id" : "9051d662-4afe-4e4a-b4af-6a3a663f2c05", + "Body" : "{\"items\":[{\"etag\":\"jfjzObocLQOoFZJjKrG68PuiZOI\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"},{\"etag\":\"YdKrngyF5mNheVwFMEpouIIxHQR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"},{\"etag\":\"4T9FAwmRvOdUloWfWlsIfoLAzWR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"},{\"etag\":\"NusKOfhULANj4wVrqEvZIIXamM8\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}]}", + "x-ms-client-request-id" : "68ac7bd2-5e74-4cca-95ab-793f8485c52a", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key59354%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key36614%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bb20a5fe-c388-4d5a-a0a0-6d2adc914079", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODI=;sn=228082", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f718bdb6-e514-4876-b601-be077edf27b9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "f718bdb6-e514-4876-b601-be077edf27b9", - "Body" : "{\"items\":[{\"etag\":\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}]}", - "x-ms-client-request-id" : "ab7f03f2-73d2-4030-b55a-bb8295e9a4e4" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3f6e79d1-d50e-473b-be0b-e08b659e0c35", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MDk=;sn=363809", + "x-ms-request-id" : "3f6e79d1-d50e-473b-be0b-e08b659e0c35", + "Body" : "{\"items\":[{\"etag\":\"jfjzObocLQOoFZJjKrG68PuiZOI\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"},{\"etag\":\"4T9FAwmRvOdUloWfWlsIfoLAzWR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}]}", + "x-ms-client-request-id" : "bb20a5fe-c388-4d5a-a0a0-6d2adc914079", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc2228813d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56871564", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ba21acb5-71fb-4b3a-8f26-c4e1d98a5367", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODM=;sn=228083", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "29b63720-9a06-41b3-a000-6d9e7cea2316", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\"", - "x-ms-request-id" : "29b63720-9a06-41b3-a000-6d9e7cea2316", - "Body" : "{\"etag\":\"2ZZ8XrlodzbqJsDU2nueaVYKDsI\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc2228813d\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "2f081bec-dff3-4678-ad33-1f4dc8d21ca5" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "08c18434-0982-481a-a917-e2328120a26e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4T9FAwmRvOdUloWfWlsIfoLAzWR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTA=;sn=363810", + "x-ms-request-id" : "08c18434-0982-481a-a917-e2328120a26e", + "Body" : "{\"etag\":\"4T9FAwmRvOdUloWfWlsIfoLAzWR\",\"key\":\"key3661473688b\",\"label\":\"f2526a56871564\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "ba21acb5-71fb-4b3a-8f26-c4e1d98a5367", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key5935433720d?label=d7a5fc22402680", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key3661473688b?label=f2526a56692089", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "96acdfba-ba94-4db2-b7da-345f04e24740", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODQ=;sn=228084", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3028e11f-ae66-4d92-b19c-548fcc1b5170", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\"", - "x-ms-request-id" : "3028e11f-ae66-4d92-b19c-548fcc1b5170", - "Body" : "{\"etag\":\"Kzih7wKNZH1r5qD6Cfl8ARbgDaj\",\"key\":\"key5935433720d\",\"label\":\"d7a5fc22402680\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "449642e8-b005-420e-9446-5cbca6deafc4" - } + "Date" : "Wed, 02 Oct 2019 20:46:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1e7f5810-c725-4a47-ab96-f1f68f6c3657", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jfjzObocLQOoFZJjKrG68PuiZOI\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTE=;sn=363811", + "x-ms-request-id" : "1e7f5810-c725-4a47-ab96-f1f68f6c3657", + "Body" : "{\"etag\":\"jfjzObocLQOoFZJjKrG68PuiZOI\",\"key\":\"key3661473688b\",\"label\":\"f2526a56692089\",\"content_type\":null,\"value\":\"updatedValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:31+00:00\"}", + "x-ms-client-request-id" : "96acdfba-ba94-4db2-b7da-345f04e24740", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key59354", "d7a5fc22", "key5935433720d", "d7a5fc22402680", "d7a5fc2228813d" ] + "variables" : [ "key36614", "f2526a56", "key3661473688b", "f2526a56871564", "f2526a56692089" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json index c66b0db7e1ba..f7e6b4bc6a25 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPagination.json @@ -1,1273 +1,1644 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3a3545ae-3786-438d-a7ce-414df5592142", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDE=;sn=228101", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ee731fb4-a0c7-4cb1-81f2-1f5c91a89be1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"qRkZXWfSVpRCgzY91EKW1er6Cg6\"", - "x-ms-request-id" : "ee731fb4-a0c7-4cb1-81f2-1f5c91a89be1", - "Body" : "{\"etag\":\"qRkZXWfSVpRCgzY91EKW1er6Cg6\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "90790e18-184c-4d6d-b343-4bfe80809105" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4ce21f91-bcb9-4d30-8012-14cad4311b5f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XRUfWGbGM7udUwgS8dnNc91D8sl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mjg=;sn=363828", + "x-ms-request-id" : "4ce21f91-bcb9-4d30-8012-14cad4311b5f", + "Body" : "{\"etag\":\"XRUfWGbGM7udUwgS8dnNc91D8sl\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "3a3545ae-3786-438d-a7ce-414df5592142", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "234e68a0-11e3-4db6-8c8b-a917d021a4a3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDI=;sn=228102", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "11791bd7-9495-4927-be62-b31200ed35cb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"AoDYGKhDsBiMKoPvZ2ZvRuczmPQ\"", - "x-ms-request-id" : "11791bd7-9495-4927-be62-b31200ed35cb", - "Body" : "{\"etag\":\"AoDYGKhDsBiMKoPvZ2ZvRuczmPQ\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "086378be-0828-4754-b766-288d3fbb883e" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a343b56f-253c-4a4b-a023-f4f5648eccb8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"aD2t809c1XfKPDgR67IW48Awvma\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mjk=;sn=363829", + "x-ms-request-id" : "a343b56f-253c-4a4b-a023-f4f5648eccb8", + "Body" : "{\"etag\":\"aD2t809c1XfKPDgR67IW48Awvma\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "234e68a0-11e3-4db6-8c8b-a917d021a4a3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dfd94a2e-02f0-46e4-8cf8-9aed51b1dd97", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDM=;sn=228103", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d01ecfd3-6395-4038-b36d-44a9a65304d3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"D6BbIEVZdJVoT24r93Myz27Krpw\"", - "x-ms-request-id" : "d01ecfd3-6395-4038-b36d-44a9a65304d3", - "Body" : "{\"etag\":\"D6BbIEVZdJVoT24r93Myz27Krpw\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "1ac1cb37-624e-4c74-8701-8d7fee4bfe58" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cebcdc73-30bc-407c-a276-e0e3906fd830", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"pZZOp4eAbqU7qyuoAFBguzSipfj\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzA=;sn=363830", + "x-ms-request-id" : "cebcdc73-30bc-407c-a276-e0e3906fd830", + "Body" : "{\"etag\":\"pZZOp4eAbqU7qyuoAFBguzSipfj\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "dfd94a2e-02f0-46e4-8cf8-9aed51b1dd97", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7aac92ae-fc11-4277-ae7c-cf9d40ca4b2b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDQ=;sn=228104", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e4d431ab-0e15-4d34-bfd7-65cc19457a84", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"iNILhRBid2pHrxV4Askz4B8nKcN\"", - "x-ms-request-id" : "e4d431ab-0e15-4d34-bfd7-65cc19457a84", - "Body" : "{\"etag\":\"iNILhRBid2pHrxV4Askz4B8nKcN\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "69bf6c8a-d352-4ee4-970d-379b555abd9c" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2f46e40e-c76d-452e-8d45-329016cdc55e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"bUlkzGclEcDxq7cHVcFLcY1uliY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzE=;sn=363831", + "x-ms-request-id" : "2f46e40e-c76d-452e-8d45-329016cdc55e", + "Body" : "{\"etag\":\"bUlkzGclEcDxq7cHVcFLcY1uliY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "7aac92ae-fc11-4277-ae7c-cf9d40ca4b2b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "818a6ec7-fb6c-45de-97b9-c838c4e0c8c7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDU=;sn=228105", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "20f21be2-9d58-440e-994b-289796e45b97", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"hFxHEaiclDQHjuP7Rb7k5NdgZIL\"", - "x-ms-request-id" : "20f21be2-9d58-440e-994b-289796e45b97", - "Body" : "{\"etag\":\"hFxHEaiclDQHjuP7Rb7k5NdgZIL\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "9f517b5b-cd36-4fca-8e00-03824b2406a2" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "10050892-7d0c-4de9-9024-0d32776b4448", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xCV69pXNp1QdKmevMOUceqO2TCC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzI=;sn=363832", + "x-ms-request-id" : "10050892-7d0c-4de9-9024-0d32776b4448", + "Body" : "{\"etag\":\"xCV69pXNp1QdKmevMOUceqO2TCC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "818a6ec7-fb6c-45de-97b9-c838c4e0c8c7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "76ad63a7-5c86-4c62-bb78-b8695b042bfd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDY=;sn=228106", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8b9fafde-8d04-4f66-891a-854c2926dd17", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zJcmrLAfioW02cI0H2zXmomDtPR\"", - "x-ms-request-id" : "8b9fafde-8d04-4f66-891a-854c2926dd17", - "Body" : "{\"etag\":\"zJcmrLAfioW02cI0H2zXmomDtPR\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "3df530bb-e459-41ea-9c69-22bc97fc2814" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0291c509-6dcd-4533-a76b-448e27199c4d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"iIbdButYdKillKUWxNUCogzA4Ch\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzM=;sn=363833", + "x-ms-request-id" : "0291c509-6dcd-4533-a76b-448e27199c4d", + "Body" : "{\"etag\":\"iIbdButYdKillKUWxNUCogzA4Ch\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "76ad63a7-5c86-4c62-bb78-b8695b042bfd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b531aa7-090f-4bdc-a2bd-e72aa07bbca0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDc=;sn=228107", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "33e181f8-7517-44dc-8b9a-695c3a4c7405", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ZU5GYxGzmKlWAItGpaK6iEYFl6r\"", - "x-ms-request-id" : "33e181f8-7517-44dc-8b9a-695c3a4c7405", - "Body" : "{\"etag\":\"ZU5GYxGzmKlWAItGpaK6iEYFl6r\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "2c8f810b-a82e-4e1b-a61c-79b57d334d26" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b2a420a2-51b4-4eb2-85d3-75d067c7fc44", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"48YL4ecBbdAoFMO0U141xx6JOmU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzQ=;sn=363834", + "x-ms-request-id" : "b2a420a2-51b4-4eb2-85d3-75d067c7fc44", + "Body" : "{\"etag\":\"48YL4ecBbdAoFMO0U141xx6JOmU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "7b531aa7-090f-4bdc-a2bd-e72aa07bbca0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a00fd3c4-2c6b-4013-8988-77a48b5df990", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDg=;sn=228108", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c312eb28-4494-4736-b599-2da2ec160e5b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"0Yuy0lz0S5F2eNEqrvrPKFowOIy\"", - "x-ms-request-id" : "c312eb28-4494-4736-b599-2da2ec160e5b", - "Body" : "{\"etag\":\"0Yuy0lz0S5F2eNEqrvrPKFowOIy\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "8999bd90-24f5-417b-afd7-ad36e734b9ca" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c3e6d37a-df8b-48d7-add1-a3dca11ad3ff", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"K7W6KtSQ3QvpTSOuEZep6P3dBsC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzU=;sn=363835", + "x-ms-request-id" : "c3e6d37a-df8b-48d7-add1-a3dca11ad3ff", + "Body" : "{\"etag\":\"K7W6KtSQ3QvpTSOuEZep6P3dBsC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "a00fd3c4-2c6b-4013-8988-77a48b5df990", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "39135467-4327-4fcf-af22-9a864cfa28ca", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDk=;sn=228109", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f9dbd743-9d32-4c3b-8545-e2d73481b098", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"O4tmD8kvLRZT3rF3LK4hGSSkGyV\"", - "x-ms-request-id" : "f9dbd743-9d32-4c3b-8545-e2d73481b098", - "Body" : "{\"etag\":\"O4tmD8kvLRZT3rF3LK4hGSSkGyV\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "e2dd4db0-d9df-4d37-9c19-2b01b2a6cde2" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4df82a0e-573b-4e4a-b308-06651be3a404", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"typjWcIDSdqHPYWjgSV5DL0tK2H\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MzY=;sn=363836", + "x-ms-request-id" : "4df82a0e-573b-4e4a-b308-06651be3a404", + "Body" : "{\"etag\":\"typjWcIDSdqHPYWjgSV5DL0tK2H\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "39135467-4327-4fcf-af22-9a864cfa28ca", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d3e0554c-96e8-44f9-9475-0fbca7d80485", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTA=;sn=228110", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "2f5adc3c-ff11-405e-9f3f-402ab9f3342e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"sse2D2lB4wTsNuS7ShIugZpp8gz\"", - "x-ms-request-id" : "2f5adc3c-ff11-405e-9f3f-402ab9f3342e", - "Body" : "{\"etag\":\"sse2D2lB4wTsNuS7ShIugZpp8gz\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "420be385-8291-42ce-90f8-8936145657ee" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9045418f-f83a-49de-ab4f-976ceef44f92", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"aDt75SUnshrON0jL5rF6byckhHi\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mzc=;sn=363837", + "x-ms-request-id" : "9045418f-f83a-49de-ab4f-976ceef44f92", + "Body" : "{\"etag\":\"aDt75SUnshrON0jL5rF6byckhHi\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "d3e0554c-96e8-44f9-9475-0fbca7d80485", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "010596f5-79fa-4687-8547-4254fc26ec9f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTE=;sn=228111", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8234f254-1e19-4ebe-8cf5-809e4007c267", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"19tMSZGqtQwMkt3lnfIRmThmxGy\"", - "x-ms-request-id" : "8234f254-1e19-4ebe-8cf5-809e4007c267", - "Body" : "{\"etag\":\"19tMSZGqtQwMkt3lnfIRmThmxGy\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "f5174bec-0037-41e4-bc4d-a7875a8c6367" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fac57423-09c1-4282-a987-3f38ccf7ccac", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vhNHIdCJbtN5EcJBL6DI6o5SIEh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mzg=;sn=363838", + "x-ms-request-id" : "fac57423-09c1-4282-a987-3f38ccf7ccac", + "Body" : "{\"etag\":\"vhNHIdCJbtN5EcJBL6DI6o5SIEh\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "010596f5-79fa-4687-8547-4254fc26ec9f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7e6e54b-89da-4d10-a5ae-87442f212ffd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTI=;sn=228112", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ac6b99c3-6ea1-46dd-9961-7018b0361462", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"G7f3584dLNd6hIXgJCupL4EeJY3\"", - "x-ms-request-id" : "ac6b99c3-6ea1-46dd-9961-7018b0361462", - "Body" : "{\"etag\":\"G7f3584dLNd6hIXgJCupL4EeJY3\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "0b5977f1-dd99-4a84-a9ca-e33e3a345cad" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "89b7b427-cd28-4813-b209-31c90fe21ac5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WDqLOV8Ohd1VGdsFTTuIVnOfBVL\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mzk=;sn=363839", + "x-ms-request-id" : "89b7b427-cd28-4813-b209-31c90fe21ac5", + "Body" : "{\"etag\":\"WDqLOV8Ohd1VGdsFTTuIVnOfBVL\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "a7e6e54b-89da-4d10-a5ae-87442f212ffd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a8a893f-fbd4-4866-a6df-60852b2f3e4b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTM=;sn=228113", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "fbf382df-85cb-4526-a876-b3cbe39675c9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"4jUrIlTULm04E2yzFqpLNO9Yv6Y\"", - "x-ms-request-id" : "fbf382df-85cb-4526-a876-b3cbe39675c9", - "Body" : "{\"etag\":\"4jUrIlTULm04E2yzFqpLNO9Yv6Y\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "e054272e-c3c7-4bac-9d91-12525c9eb369" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3259eb66-112d-495a-ba6d-b3476636f1ff", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"mutDMwGKPqn06wpxbjKWNhd4D2E\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDA=;sn=363840", + "x-ms-request-id" : "3259eb66-112d-495a-ba6d-b3476636f1ff", + "Body" : "{\"etag\":\"mutDMwGKPqn06wpxbjKWNhd4D2E\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "1a8a893f-fbd4-4866-a6df-60852b2f3e4b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "283ce679-f832-44fa-902e-52ef3c12f87b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTQ=;sn=228114", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b91e824d-73a9-488e-90c7-ec2f5933da9e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"cvZUaKecZlNyPMb8TKHnuDSNqwK\"", - "x-ms-request-id" : "b91e824d-73a9-488e-90c7-ec2f5933da9e", - "Body" : "{\"etag\":\"cvZUaKecZlNyPMb8TKHnuDSNqwK\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "7cddad1e-b90b-4a1d-8a55-e781f752a74a" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d1604a39-c855-4bb1-aa1b-b32c12f3e817", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"d29I6FSYscaqehZS7JKeKwBmUEd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDE=;sn=363841", + "x-ms-request-id" : "d1604a39-c855-4bb1-aa1b-b32c12f3e817", + "Body" : "{\"etag\":\"d29I6FSYscaqehZS7JKeKwBmUEd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "283ce679-f832-44fa-902e-52ef3c12f87b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e754371f-d680-4060-a7eb-a3ecfa5c62d5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTU=;sn=228115", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "05e21230-90c1-44d7-b999-17befaf84b41", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HfSoHXz56Lh4hrawplcr71I1v5b\"", - "x-ms-request-id" : "05e21230-90c1-44d7-b999-17befaf84b41", - "Body" : "{\"etag\":\"HfSoHXz56Lh4hrawplcr71I1v5b\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "634c9712-e951-4980-b949-bd6c84e03f97" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a00cc652-3d2f-4c56-aa3f-3bbb6df74fb8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WufPOegUpEXBLwx4PF25aluDUKM\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDI=;sn=363842", + "x-ms-request-id" : "a00cc652-3d2f-4c56-aa3f-3bbb6df74fb8", + "Body" : "{\"etag\":\"WufPOegUpEXBLwx4PF25aluDUKM\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "e754371f-d680-4060-a7eb-a3ecfa5c62d5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f043bd31-5ef6-4ef0-a2d0-80def8de519d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTY=;sn=228116", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6d70330a-1d99-4e59-aa9c-04bfa77e0f5d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"o6jmWmK6LOO133FPd0yQIh00Oiv\"", - "x-ms-request-id" : "6d70330a-1d99-4e59-aa9c-04bfa77e0f5d", - "Body" : "{\"etag\":\"o6jmWmK6LOO133FPd0yQIh00Oiv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "edd86856-28bc-4aa1-88a5-a54e470c30b3" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b30d5d30-c5e1-4b7b-92fc-784553471a9d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xQy9I3eEUGlT48KwoEE71rTjyyg\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDM=;sn=363843", + "x-ms-request-id" : "b30d5d30-c5e1-4b7b-92fc-784553471a9d", + "Body" : "{\"etag\":\"xQy9I3eEUGlT48KwoEE71rTjyyg\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "f043bd31-5ef6-4ef0-a2d0-80def8de519d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "faf3cb0e-4255-45e0-bc87-54dd01bf4ea9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTc=;sn=228117", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7d735593-56ca-4201-8382-8591fac127e7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"jnmotBxgHMixuKXVeEppUDFXS9X\"", - "x-ms-request-id" : "7d735593-56ca-4201-8382-8591fac127e7", - "Body" : "{\"etag\":\"jnmotBxgHMixuKXVeEppUDFXS9X\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "20ca1e13-dd01-43ac-9683-d12438707938" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9d61b53c-a0c3-4efc-a07e-9b3cb101495a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"e1BUilO21q6aJC0CiWAgguOxCwp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDQ=;sn=363844", + "x-ms-request-id" : "9d61b53c-a0c3-4efc-a07e-9b3cb101495a", + "Body" : "{\"etag\":\"e1BUilO21q6aJC0CiWAgguOxCwp\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "faf3cb0e-4255-45e0-bc87-54dd01bf4ea9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8e18a594-0e63-426d-9652-7877ed7e7d78", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTg=;sn=228118", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a219871f-4953-4569-a97b-eaa330363d3c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"4GEtzwi9cwDcbqFZT5RU74viWsC\"", - "x-ms-request-id" : "a219871f-4953-4569-a97b-eaa330363d3c", - "Body" : "{\"etag\":\"4GEtzwi9cwDcbqFZT5RU74viWsC\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "1cac957b-7e56-4024-98a5-81b0b233354a" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8bcec445-7061-408b-958c-ecf1f92272ea", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Q50LkZtQkGmmQBQnTHuPvCv9QpC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDU=;sn=363845", + "x-ms-request-id" : "8bcec445-7061-408b-958c-ecf1f92272ea", + "Body" : "{\"etag\":\"Q50LkZtQkGmmQBQnTHuPvCv9QpC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "8e18a594-0e63-426d-9652-7877ed7e7d78", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5936891b-b1fe-433f-a8c3-2a0744b1ef47", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMTk=;sn=228119", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6c4b8715-5171-482e-8b45-a5959f9c2f36", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TuJrEXQWYvHYrM0Iy7ON9nMm2PH\"", - "x-ms-request-id" : "6c4b8715-5171-482e-8b45-a5959f9c2f36", - "Body" : "{\"etag\":\"TuJrEXQWYvHYrM0Iy7ON9nMm2PH\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "79c8f502-7f05-4c30-9e1e-8cf3b770ec23" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f3cfcd61-d551-4ded-b1df-4eb6a477209b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"0kdyOa1c3ysVUVHzcK8ES3KvFvB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDY=;sn=363846", + "x-ms-request-id" : "f3cfcd61-d551-4ded-b1df-4eb6a477209b", + "Body" : "{\"etag\":\"0kdyOa1c3ysVUVHzcK8ES3KvFvB\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "5936891b-b1fe-433f-a8c3-2a0744b1ef47", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2099c89e-8156-4751-b708-08b9d995e9de", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjA=;sn=228120", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "25bef6ad-bd58-4122-a83e-bbd7d1edfe46", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"xhTg3zgbuRttFBR7zmOnEpVp14T\"", - "x-ms-request-id" : "25bef6ad-bd58-4122-a83e-bbd7d1edfe46", - "Body" : "{\"etag\":\"xhTg3zgbuRttFBR7zmOnEpVp14T\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "720e34c8-1520-43cb-9368-ef41860ff67e" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9ebd194f-064b-4606-b7a5-cd69ae011919", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"OeUBv2Qh2Imvg4qjvyqffuZsSJc\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDc=;sn=363847", + "x-ms-request-id" : "9ebd194f-064b-4606-b7a5-cd69ae011919", + "Body" : "{\"etag\":\"OeUBv2Qh2Imvg4qjvyqffuZsSJc\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "2099c89e-8156-4751-b708-08b9d995e9de", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "538e312d-6217-4a29-9369-84b4d10857b7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjE=;sn=228121", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "25891099-8d33-4246-ac70-ea35b123be42", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"l9vi8Dzse4VrwkeqF2lExahCc06\"", - "x-ms-request-id" : "25891099-8d33-4246-ac70-ea35b123be42", - "Body" : "{\"etag\":\"l9vi8Dzse4VrwkeqF2lExahCc06\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "0271919a-02c6-42ce-8a49-d8b405fb7305" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d14d5e96-5fed-4950-8326-ade761858443", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"J4I0QWkjXCcMJLbJOejPouE5e4R\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDg=;sn=363848", + "x-ms-request-id" : "d14d5e96-5fed-4950-8326-ade761858443", + "Body" : "{\"etag\":\"J4I0QWkjXCcMJLbJOejPouE5e4R\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "538e312d-6217-4a29-9369-84b4d10857b7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3866e146-99c3-4b7d-a484-01568e7142a7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjI=;sn=228122", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "189b543c-3f42-4a9d-8b55-00e7d5d65897", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HoO9SvlTGzRWahezRwtWkTvuRT7\"", - "x-ms-request-id" : "189b543c-3f42-4a9d-8b55-00e7d5d65897", - "Body" : "{\"etag\":\"HoO9SvlTGzRWahezRwtWkTvuRT7\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "d593c3a8-f823-4bb8-8fc1-52cfd40fb954" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8f9c3a54-c988-440d-ad03-3e37c442825e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"lVnIy4oGkPg0HWYywxKGPARGMYX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NDk=;sn=363849", + "x-ms-request-id" : "8f9c3a54-c988-440d-ad03-3e37c442825e", + "Body" : "{\"etag\":\"lVnIy4oGkPg0HWYywxKGPARGMYX\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "3866e146-99c3-4b7d-a484-01568e7142a7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "887dc139-8504-499f-bee0-e1c106e28b37", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjM=;sn=228123", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3921bd78-1c27-402e-b0aa-9039b2d5e687", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"eeaJzg4jHRGndIC65hpip6xacJX\"", - "x-ms-request-id" : "3921bd78-1c27-402e-b0aa-9039b2d5e687", - "Body" : "{\"etag\":\"eeaJzg4jHRGndIC65hpip6xacJX\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "baa057c5-cadf-4e2c-bb38-e8379d6d2d3e" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cba955e0-3f8e-404e-8b4d-2c2065bf0ea6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"mlMNCrPHR77n83OZrhW8HffJwJx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTA=;sn=363850", + "x-ms-request-id" : "cba955e0-3f8e-404e-8b4d-2c2065bf0ea6", + "Body" : "{\"etag\":\"mlMNCrPHR77n83OZrhW8HffJwJx\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "887dc139-8504-499f-bee0-e1c106e28b37", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c95a4dd-46a7-410b-bc51-a2f991323362", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjQ=;sn=228124", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ade61e4b-8abc-41a8-a6f1-2ba16cdc3082", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"W9z4y0A1lJguQNuojEzRQ9Jo5Gd\"", - "x-ms-request-id" : "ade61e4b-8abc-41a8-a6f1-2ba16cdc3082", - "Body" : "{\"etag\":\"W9z4y0A1lJguQNuojEzRQ9Jo5Gd\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "6096d5d7-32c2-400f-8778-3a328ffa4a77" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "be76d3c1-fa38-4f48-a572-145e4bbc70c6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xQNkLnmI78XQWodmkgOGyletM1t\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTE=;sn=363851", + "x-ms-request-id" : "be76d3c1-fa38-4f48-a572-145e4bbc70c6", + "Body" : "{\"etag\":\"xQNkLnmI78XQWodmkgOGyletM1t\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "1c95a4dd-46a7-410b-bc51-a2f991323362", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7ce3c477-c99c-4683-b6ea-2b7b716b0280", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjU=;sn=228125", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "eb58cf36-3f4f-4a10-a035-f3a758467d39", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:46 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HgFDko3E20PQy9ZDftFMAzXl4ow\"", - "x-ms-request-id" : "eb58cf36-3f4f-4a10-a035-f3a758467d39", - "Body" : "{\"etag\":\"HgFDko3E20PQy9ZDftFMAzXl4ow\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"}", - "x-ms-client-request-id" : "7b001431-c027-4116-ace5-6af3f827b083" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "187a4351-4e6f-495d-bc56-02b576438ffe", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4vfA8YLKkbplWTabIwHfrdGAnJm\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTI=;sn=363852", + "x-ms-request-id" : "187a4351-4e6f-495d-bc56-02b576438ffe", + "Body" : "{\"etag\":\"4vfA8YLKkbplWTabIwHfrdGAnJm\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "7ce3c477-c99c-4683-b6ea-2b7b716b0280", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cdb8fe9d-4cda-4bb4-8dec-1ef3a94c2640", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjY=;sn=228126", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "bb7275f3-3b5a-4e82-b2ee-e4382632c8cf", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"LX83enQ7x6Esb0jyohrQbodBwhM\"", - "x-ms-request-id" : "bb7275f3-3b5a-4e82-b2ee-e4382632c8cf", - "Body" : "{\"etag\":\"LX83enQ7x6Esb0jyohrQbodBwhM\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "34046c5f-7793-4b1c-a0ea-3bd5837c5766" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5b8df67b-77b9-4fa2-befa-01f8b576eeb1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ZxJZlNMsEkSBUrExW1kfbEQauRd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTM=;sn=363853", + "x-ms-request-id" : "5b8df67b-77b9-4fa2-befa-01f8b576eeb1", + "Body" : "{\"etag\":\"ZxJZlNMsEkSBUrExW1kfbEQauRd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "cdb8fe9d-4cda-4bb4-8dec-1ef3a94c2640", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38a3be29-7e87-4bb2-9c37-ba3aa8c6a166", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjc=;sn=228127", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a13709ca-ed48-4d96-83ea-b984ce0440d9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"BVZEJM7m7YrV6JGthk84Q6yCFgx\"", - "x-ms-request-id" : "a13709ca-ed48-4d96-83ea-b984ce0440d9", - "Body" : "{\"etag\":\"BVZEJM7m7YrV6JGthk84Q6yCFgx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "8438862e-ace6-4767-a179-510db07f4d46" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1558e49f-b05c-4bfb-8503-0c7f15854dc4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1CcJjB6GfKWRvHCWZDmANtaBmrd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTQ=;sn=363854", + "x-ms-request-id" : "1558e49f-b05c-4bfb-8503-0c7f15854dc4", + "Body" : "{\"etag\":\"1CcJjB6GfKWRvHCWZDmANtaBmrd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "38a3be29-7e87-4bb2-9c37-ba3aa8c6a166", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6c21ffd0-d755-43c8-a2e8-29b682c6f603", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjg=;sn=228128", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "bf07da59-d103-46fa-92a3-f928327dbaf3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"3i39XUq87pKifUTZvVkia3xWya8\"", - "x-ms-request-id" : "bf07da59-d103-46fa-92a3-f928327dbaf3", - "Body" : "{\"etag\":\"3i39XUq87pKifUTZvVkia3xWya8\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "e87dd2c7-ecb1-485d-953a-76dd6bdcf48b" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "923973fd-7f60-41a8-92a2-785f347a5d6d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Qb3cDf0L4rs6sky7PKnX73kKGJY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTU=;sn=363855", + "x-ms-request-id" : "923973fd-7f60-41a8-92a2-785f347a5d6d", + "Body" : "{\"etag\":\"Qb3cDf0L4rs6sky7PKnX73kKGJY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "6c21ffd0-d755-43c8-a2e8-29b682c6f603", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6ec12f2f-e751-4fb5-a7b3-2b73a1fccacd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMjk=;sn=228129", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8ce7d8a2-4fb6-4ad2-a403-c0fa619d7a54", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "close", - "etag" : "\"CxNhB40ptG7sY34UaOTJtydfpSu\"", - "x-ms-request-id" : "8ce7d8a2-4fb6-4ad2-a403-c0fa619d7a54", - "Body" : "{\"etag\":\"CxNhB40ptG7sY34UaOTJtydfpSu\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "b06e8a87-17ee-49c7-a8a3-a7098070c340" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bbe157e4-5d5a-48ab-aa39-a668ca41ff02", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"2ad7LYTn7b00Zsbc8ExlHChtCDY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTY=;sn=363856", + "x-ms-request-id" : "bbe157e4-5d5a-48ab-aa39-a668ca41ff02", + "Body" : "{\"etag\":\"2ad7LYTn7b00Zsbc8ExlHChtCDY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "6ec12f2f-e751-4fb5-a7b3-2b73a1fccacd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38576b9f-2cd3-4f0b-a2f3-72118b45210e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzA=;sn=228130", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1075e0d6-3349-44c3-a07f-cce3e2f6ef99", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"9lzsaJWBqAPoWJAGqHC5EZdD7Hj\"", - "x-ms-request-id" : "1075e0d6-3349-44c3-a07f-cce3e2f6ef99", - "Body" : "{\"etag\":\"9lzsaJWBqAPoWJAGqHC5EZdD7Hj\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "894c66ba-ac06-4ae6-a9d4-52d06454493e" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d1dd518f-bfb7-4df8-a50e-3bd6a33306c2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TLMcNBoAhZ5pWyhmlH5LnnV0IWi\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTc=;sn=363857", + "x-ms-request-id" : "d1dd518f-bfb7-4df8-a50e-3bd6a33306c2", + "Body" : "{\"etag\":\"TLMcNBoAhZ5pWyhmlH5LnnV0IWi\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "38576b9f-2cd3-4f0b-a2f3-72118b45210e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f9511cd7-6694-4e26-8d10-8ebd70a73fe9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzE=;sn=228131", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "970a04e7-ce12-4911-9f28-1360fa33b10f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"nrPOye0tJY7zM0fQQ1GJ8EDSlPp\"", - "x-ms-request-id" : "970a04e7-ce12-4911-9f28-1360fa33b10f", - "Body" : "{\"etag\":\"nrPOye0tJY7zM0fQQ1GJ8EDSlPp\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "c340f8ed-1702-47dd-8560-5e8e11d87232" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4555eff0-cdc0-4391-ac37-1e5c0d2e2c43", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YKlMBaY1pNkkzNrtqrNOP0G0BP1\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTg=;sn=363858", + "x-ms-request-id" : "4555eff0-cdc0-4391-ac37-1e5c0d2e2c43", + "Body" : "{\"etag\":\"YKlMBaY1pNkkzNrtqrNOP0G0BP1\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "f9511cd7-6694-4e26-8d10-8ebd70a73fe9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72d0968d-b496-4511-8ea0-b05a59fe4711", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzI=;sn=228132", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "fd24e647-4b80-44d0-bed1-5aafa5b86883", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Nfmr5mN9kWQI99iCgfP9v17WrhB\"", - "x-ms-request-id" : "fd24e647-4b80-44d0-bed1-5aafa5b86883", - "Body" : "{\"etag\":\"Nfmr5mN9kWQI99iCgfP9v17WrhB\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "4c65385f-3dd7-4157-b2b6-4cbd260e20d1" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b28496d5-2437-433b-b582-39633b5772eb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"aMgN8Jnqgyw75mb7E69f4Gnb2PB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NTk=;sn=363859", + "x-ms-request-id" : "b28496d5-2437-433b-b582-39633b5772eb", + "Body" : "{\"etag\":\"aMgN8Jnqgyw75mb7E69f4Gnb2PB\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "72d0968d-b496-4511-8ea0-b05a59fe4711", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca0af859-fa82-4e00-8c76-0ff1a0012a42", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzM=;sn=228133", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4f5eae04-4ab4-4b28-b5f1-2bef4036672d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Ff5iMnHXXSt1XzYGYJa9xnapUnD\"", - "x-ms-request-id" : "4f5eae04-4ab4-4b28-b5f1-2bef4036672d", - "Body" : "{\"etag\":\"Ff5iMnHXXSt1XzYGYJa9xnapUnD\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "1a823f4f-b1a2-4d97-a70e-baf0cb12ac1d" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f1b0f638-e6ff-416d-b7a4-54bed7009e84", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xlgoCHeQpS7grMhMOVhfHXycbCQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjA=;sn=363860", + "x-ms-request-id" : "f1b0f638-e6ff-416d-b7a4-54bed7009e84", + "Body" : "{\"etag\":\"xlgoCHeQpS7grMhMOVhfHXycbCQ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "ca0af859-fa82-4e00-8c76-0ff1a0012a42", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "37cacd9b-6c6c-487a-8049-9dc586d24814", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzQ=;sn=228134", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b451e183-39ae-425b-9af5-a54fdc729a50", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ll02kbfpOHaMgXN5F3R36ARdvl8\"", - "x-ms-request-id" : "b451e183-39ae-425b-9af5-a54fdc729a50", - "Body" : "{\"etag\":\"ll02kbfpOHaMgXN5F3R36ARdvl8\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "d9459c09-c6a3-4efd-a084-45587919d531" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "38c3eb7a-21dd-4286-9701-c3fa96541874", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TRwkf2Jfxrx3upwA0wYSZs4zkls\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjE=;sn=363861", + "x-ms-request-id" : "38c3eb7a-21dd-4286-9701-c3fa96541874", + "Body" : "{\"etag\":\"TRwkf2Jfxrx3upwA0wYSZs4zkls\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "37cacd9b-6c6c-487a-8049-9dc586d24814", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ccf85599-4c36-4b15-943b-a74ecc4aece1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzU=;sn=228135", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5ed5c594-b406-4c45-bbb9-4b38457c4a05", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6ymRGD6eiExHrZoYFBCQpTYJLkx\"", - "x-ms-request-id" : "5ed5c594-b406-4c45-bbb9-4b38457c4a05", - "Body" : "{\"etag\":\"6ymRGD6eiExHrZoYFBCQpTYJLkx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "fa80dcb0-b44a-4b4d-b2e3-81ef689acfb6" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ee7ae183-2723-4a13-9fbe-7f8eb0826e1c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3rMfee1ViXRSMSnhmuYl7V4biM8\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjI=;sn=363862", + "x-ms-request-id" : "ee7ae183-2723-4a13-9fbe-7f8eb0826e1c", + "Body" : "{\"etag\":\"3rMfee1ViXRSMSnhmuYl7V4biM8\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "ccf85599-4c36-4b15-943b-a74ecc4aece1", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "177d9e41-9cb2-4653-b854-b30b5fbbb702", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:46 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzY=;sn=228136", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7c83c50f-5792-4e7f-be4c-b50e41ae140f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"YpNPSBS2RWriObsQMPAG6QI2Y1y\"", - "x-ms-request-id" : "7c83c50f-5792-4e7f-be4c-b50e41ae140f", - "Body" : "{\"etag\":\"YpNPSBS2RWriObsQMPAG6QI2Y1y\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "8e3c6162-98f8-48f8-aed2-395e2ce8cad4" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4575c749-cf40-4b7b-8d4f-0f2be38620a9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"L2EiBP7odqovHw07gBS2ob8CiFZ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjM=;sn=363863", + "x-ms-request-id" : "4575c749-cf40-4b7b-8d4f-0f2be38620a9", + "Body" : "{\"etag\":\"L2EiBP7odqovHw07gBS2ob8CiFZ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "177d9e41-9cb2-4653-b854-b30b5fbbb702", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "96e64674-443d-4574-a7c2-ac4e431afdd6", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzc=;sn=228137", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ccd5e047-740e-482e-b931-75ed8e712963", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"boQgUn9uR9cSGIKf7c1LfM6tHAY\"", - "x-ms-request-id" : "ccd5e047-740e-482e-b931-75ed8e712963", - "Body" : "{\"etag\":\"boQgUn9uR9cSGIKf7c1LfM6tHAY\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "f3d85dfe-4be8-4e2a-86d1-fd030e5a4a0f" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e14700a8-94c7-4ad5-97f9-956ef32d4249", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XdVtfB07ZCPG7h5s0LwgkYYAA1Z\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjQ=;sn=363864", + "x-ms-request-id" : "e14700a8-94c7-4ad5-97f9-956ef32d4249", + "Body" : "{\"etag\":\"XdVtfB07ZCPG7h5s0LwgkYYAA1Z\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "96e64674-443d-4574-a7c2-ac4e431afdd6", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c1f2bfdf-2593-4c75-b7de-516c80c4cb72", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzg=;sn=228138", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "317c355f-381c-431a-9a70-20e0ebe7c048", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zwgTMHrYW5FCxyqDXXhVBMkjLif\"", - "x-ms-request-id" : "317c355f-381c-431a-9a70-20e0ebe7c048", - "Body" : "{\"etag\":\"zwgTMHrYW5FCxyqDXXhVBMkjLif\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "658d363b-0a16-4657-be5b-3575e0e9f275" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1a5d04a9-cbbc-4f5c-95c8-e3481f429175", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WNBKANFvUczvxPWHSaQp8RCQWVZ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjU=;sn=363865", + "x-ms-request-id" : "1a5d04a9-cbbc-4f5c-95c8-e3481f429175", + "Body" : "{\"etag\":\"WNBKANFvUczvxPWHSaQp8RCQWVZ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "c1f2bfdf-2593-4c75-b7de-516c80c4cb72", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62cb2bcf-9fae-4b93-a4b7-8fe0fd15c49a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMzk=;sn=228139", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ea0cdf21-8513-4315-b857-dce3987ddb12", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"4y1jQpDVbaimQZsQDBRXhiLZt3E\"", - "x-ms-request-id" : "ea0cdf21-8513-4315-b857-dce3987ddb12", - "Body" : "{\"etag\":\"4y1jQpDVbaimQZsQDBRXhiLZt3E\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "73012374-6bcc-4dec-b184-ce27d8475a60" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1cab4cb9-491e-4026-a7f6-e5cff0fdb8f5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YlnUVLtETmOVJ5xvTvmrVEZBq2y\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NjY=;sn=363866", + "x-ms-request-id" : "1cab4cb9-491e-4026-a7f6-e5cff0fdb8f5", + "Body" : "{\"etag\":\"YlnUVLtETmOVJ5xvTvmrVEZBq2y\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "62cb2bcf-9fae-4b93-a4b7-8fe0fd15c49a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6636ad2a-41c7-40a6-9276-c5fb03416e33", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDA=;sn=228140", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "eea5aea1-bab2-498e-a379-c1c95373d0eb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FdF1IBkKseGEhgLErMy0xiGTBYv\"", - "x-ms-request-id" : "eea5aea1-bab2-498e-a379-c1c95373d0eb", - "Body" : "{\"etag\":\"FdF1IBkKseGEhgLErMy0xiGTBYv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "78241313-8f13-4272-ac6c-3d2b4e9077a9" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5ef5e6fc-420f-4554-a360-92fe3167ab7f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"oCQdpbw3xnpl4f5Mgong0M43ze9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Njc=;sn=363867", + "x-ms-request-id" : "5ef5e6fc-420f-4554-a360-92fe3167ab7f", + "Body" : "{\"etag\":\"oCQdpbw3xnpl4f5Mgong0M43ze9\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "6636ad2a-41c7-40a6-9276-c5fb03416e33", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b8138786-6e69-4e8d-9bad-3bbb01032e4c", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDE=;sn=228141", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f7b29ff8-c8d1-44db-b5d2-bd211275c1fa", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"5hPBJIEAk6El8JhlwIKJLKfNGSv\"", - "x-ms-request-id" : "f7b29ff8-c8d1-44db-b5d2-bd211275c1fa", - "Body" : "{\"etag\":\"5hPBJIEAk6El8JhlwIKJLKfNGSv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "44708842-c99e-4603-8a47-11b5b9e3b98f" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "087c4e64-aa04-4258-93df-7ebce771bc52", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"GPWPax23gBBiRDs9P2j93LnaMJF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Njg=;sn=363868", + "x-ms-request-id" : "087c4e64-aa04-4258-93df-7ebce771bc52", + "Body" : "{\"etag\":\"GPWPax23gBBiRDs9P2j93LnaMJF\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "b8138786-6e69-4e8d-9bad-3bbb01032e4c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e4dc8f91-bb1e-4456-becd-9c085717f845", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDI=;sn=228142", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f95b80cc-0c56-491a-b294-90a370a9111e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"C6jExeLeg0dW84J2reNK5Ozop4L\"", - "x-ms-request-id" : "f95b80cc-0c56-491a-b294-90a370a9111e", - "Body" : "{\"etag\":\"C6jExeLeg0dW84J2reNK5Ozop4L\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "ec9df436-f7a4-4707-beca-79c9855d74e3" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d39924d5-63d8-449f-9e2b-abafc47a75f9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"DuRB4X32cYbNKHr1jQoHDXKAb55\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Njk=;sn=363869", + "x-ms-request-id" : "d39924d5-63d8-449f-9e2b-abafc47a75f9", + "Body" : "{\"etag\":\"DuRB4X32cYbNKHr1jQoHDXKAb55\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "e4dc8f91-bb1e-4456-becd-9c085717f845", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e28bce7d-e1f3-4295-976c-96337041a3e3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDM=;sn=228143", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e13ce05f-b8ba-4472-8f9a-b058b592c014", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6kJfD9yNSb1VfYB5fqTsZRqwyxV\"", - "x-ms-request-id" : "e13ce05f-b8ba-4472-8f9a-b058b592c014", - "Body" : "{\"etag\":\"6kJfD9yNSb1VfYB5fqTsZRqwyxV\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "b4f3f24c-608d-4103-9c2c-37366d396f33" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b6639cc8-f137-417f-9ee0-96cd974532d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"crhtPqICBvHl0gHwsLEIibWDZQE\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzA=;sn=363870", + "x-ms-request-id" : "b6639cc8-f137-417f-9ee0-96cd974532d8", + "Body" : "{\"etag\":\"crhtPqICBvHl0gHwsLEIibWDZQE\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"}", + "x-ms-client-request-id" : "e28bce7d-e1f3-4295-976c-96337041a3e3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ddaba046-73e6-49bd-8121-cbcdadf8ee62", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDQ=;sn=228144", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3fa98e19-b243-4567-a00a-98f04eacf4cd", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"BOAuMUcuBqvv16NpRXeYMnxR87S\"", - "x-ms-request-id" : "3fa98e19-b243-4567-a00a-98f04eacf4cd", - "Body" : "{\"etag\":\"BOAuMUcuBqvv16NpRXeYMnxR87S\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "cfdf7853-ec8c-4933-8f8d-264c442e9531" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "de7f012f-89c1-4781-96be-76c1567d89c4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7JS8J30FMQAE46WTARAXQzUXnPT\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzE=;sn=363871", + "x-ms-request-id" : "de7f012f-89c1-4781-96be-76c1567d89c4", + "Body" : "{\"etag\":\"7JS8J30FMQAE46WTARAXQzUXnPT\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"}", + "x-ms-client-request-id" : "ddaba046-73e6-49bd-8121-cbcdadf8ee62", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "89042b60-7816-4617-a70a-0a2bfa191f88", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDU=;sn=228145", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a81e5f55-508b-4a01-8289-0c5e9e957879", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"7ISBCRNunyxN2RmYEOa6XZE6Ddf\"", - "x-ms-request-id" : "a81e5f55-508b-4a01-8289-0c5e9e957879", - "Body" : "{\"etag\":\"7ISBCRNunyxN2RmYEOa6XZE6Ddf\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "86d3d460-85f0-4568-a738-4d222a4f0bcb" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bb6abfb7-8106-4414-b5c9-9575b0c5c8a9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"zGDVQD8z4cfh4EHvfYVZuubmxlU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzI=;sn=363872", + "x-ms-request-id" : "bb6abfb7-8106-4414-b5c9-9575b0c5c8a9", + "Body" : "{\"etag\":\"zGDVQD8z4cfh4EHvfYVZuubmxlU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"}", + "x-ms-client-request-id" : "89042b60-7816-4617-a70a-0a2bfa191f88", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38b42f6e-3a33-45b0-a55c-20413663445b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDY=;sn=228146", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "04c8538e-dcf3-4724-a5ba-c0b2dd32e67e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:47 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ZXW7kUG4V5JrhGaTNDURTk4PBfo\"", - "x-ms-request-id" : "04c8538e-dcf3-4724-a5ba-c0b2dd32e67e", - "Body" : "{\"etag\":\"ZXW7kUG4V5JrhGaTNDURTk4PBfo\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"}", - "x-ms-client-request-id" : "72eed59b-f9d1-4fee-aa3a-1672494d862a" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fbc9f938-5586-4a14-b9dc-a998f9f4da76", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7ENqe1U9NS7MbZrNShAx4zZvklk\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzM=;sn=363873", + "x-ms-request-id" : "fbc9f938-5586-4a14-b9dc-a998f9f4da76", + "Body" : "{\"etag\":\"7ENqe1U9NS7MbZrNShAx4zZvklk\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"}", + "x-ms-client-request-id" : "38b42f6e-3a33-45b0-a55c-20413663445b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3db39116-ee0d-466a-8441-314d21b793cb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDc=;sn=228147", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9f01672a-3c03-405d-8a6e-d7d2773b505a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"WbS1MzhFvgZWtfxb8AIuyS3Gvln\"", - "x-ms-request-id" : "9f01672a-3c03-405d-8a6e-d7d2773b505a", - "Body" : "{\"etag\":\"WbS1MzhFvgZWtfxb8AIuyS3Gvln\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "9113fabe-0d99-49ff-aff2-3b40b1867ff3" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "70493ca7-00dc-4dfd-82f3-cc52a3e29e09", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Q4JRSVwIHHGnkVffqe7QBbPz1ZY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzQ=;sn=363874", + "x-ms-request-id" : "70493ca7-00dc-4dfd-82f3-cc52a3e29e09", + "Body" : "{\"etag\":\"Q4JRSVwIHHGnkVffqe7QBbPz1ZY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"}", + "x-ms-client-request-id" : "3db39116-ee0d-466a-8441-314d21b793cb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7272a9b1-02a4-4b48-8d4e-a2a18d088cbd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDg=;sn=228148", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "96d43f5e-830e-4e7f-95fe-c650c62f86cd", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"GErzoJ4VHONG17wfTKLrr6NR0sx\"", - "x-ms-request-id" : "96d43f5e-830e-4e7f-95fe-c650c62f86cd", - "Body" : "{\"etag\":\"GErzoJ4VHONG17wfTKLrr6NR0sx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "7f8fc575-eec8-4bce-9f3f-6958b35ece7b" - } + "Date" : "Wed, 02 Oct 2019 20:46:36 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a1f492a4-4fe5-4520-abdb-a8a3a00a07f1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"6OUaq05m2Si78mL6srglFLzOIJU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzU=;sn=363875", + "x-ms-request-id" : "a1f492a4-4fe5-4520-abdb-a8a3a00a07f1", + "Body" : "{\"etag\":\"6OUaq05m2Si78mL6srglFLzOIJU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"}", + "x-ms-client-request-id" : "7272a9b1-02a4-4b48-8d4e-a2a18d088cbd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5fbc865f-cdf8-426a-9f86-298bd7d6878e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNDk=;sn=228149", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:38 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "cbf454f0-0cb7-4f81-839e-3f6d1f5b9230", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Atv0EmClkcDcL3cn64SKrWqrJz6\"", - "x-ms-request-id" : "cbf454f0-0cb7-4f81-839e-3f6d1f5b9230", - "Body" : "{\"etag\":\"Atv0EmClkcDcL3cn64SKrWqrJz6\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "cdfaf8b8-fb7a-4360-bccd-bdc2c53b7322" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ef8c3aac-44bc-4e55-a760-00801f1c6bae", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TiSxP7hxJDoDy6J2gglHeX8QVUS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4NzY=;sn=363876", + "x-ms-request-id" : "ef8c3aac-44bc-4e55-a760-00801f1c6bae", + "Body" : "{\"etag\":\"TiSxP7hxJDoDy6J2gglHeX8QVUS\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"}", + "x-ms-client-request-id" : "5fbc865f-cdf8-426a-9f86-298bd7d6878e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d5c8f60e-c1fd-47a2-87ef-6c23f2245118", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTA=;sn=228150", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:38 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ec9700e9-6140-435a-897d-aa1a6eabc321", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2yTAxazS9B09I5qfPPbvzYgYzGt\"", - "x-ms-request-id" : "ec9700e9-6140-435a-897d-aa1a6eabc321", - "Body" : "{\"etag\":\"2yTAxazS9B09I5qfPPbvzYgYzGt\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "06574bc9-c0eb-4210-b222-e3f1cd3254e6" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1f0e6c4b-55e6-4fb6-ba1f-1db7e3b966fc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"BScUIrmX4qiYFgDChYf76F3YXwU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Nzc=;sn=363877", + "x-ms-request-id" : "1f0e6c4b-55e6-4fb6-ba1f-1db7e3b966fc", + "Body" : "{\"etag\":\"BScUIrmX4qiYFgDChYf76F3YXwU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"}", + "x-ms-client-request-id" : "d5c8f60e-c1fd-47a2-87ef-6c23f2245118", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key21507&label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key82443&label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "04e1e32b-eff0-4e0e-a0b5-64125d97cb51", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTA=;sn=228150", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3c87aaf4-1509-459b-8bca-fc94d13cb370", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "3c87aaf4-1509-459b-8bca-fc94d13cb370", - "Body" : "{\"items\":[{\"etag\":\"2yTAxazS9B09I5qfPPbvzYgYzGt\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"Atv0EmClkcDcL3cn64SKrWqrJz6\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"GErzoJ4VHONG17wfTKLrr6NR0sx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"WbS1MzhFvgZWtfxb8AIuyS3Gvln\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"ZXW7kUG4V5JrhGaTNDURTk4PBfo\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"7ISBCRNunyxN2RmYEOa6XZE6Ddf\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"BOAuMUcuBqvv16NpRXeYMnxR87S\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"6kJfD9yNSb1VfYB5fqTsZRqwyxV\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"C6jExeLeg0dW84J2reNK5Ozop4L\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"5hPBJIEAk6El8JhlwIKJLKfNGSv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"FdF1IBkKseGEhgLErMy0xiGTBYv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"4y1jQpDVbaimQZsQDBRXhiLZt3E\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"zwgTMHrYW5FCxyqDXXhVBMkjLif\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"boQgUn9uR9cSGIKf7c1LfM6tHAY\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"YpNPSBS2RWriObsQMPAG6QI2Y1y\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"6ymRGD6eiExHrZoYFBCQpTYJLkx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"ll02kbfpOHaMgXN5F3R36ARdvl8\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"Ff5iMnHXXSt1XzYGYJa9xnapUnD\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"Nfmr5mN9kWQI99iCgfP9v17WrhB\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"nrPOye0tJY7zM0fQQ1GJ8EDSlPp\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"9lzsaJWBqAPoWJAGqHC5EZdD7Hj\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"CxNhB40ptG7sY34UaOTJtydfpSu\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"3i39XUq87pKifUTZvVkia3xWya8\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"BVZEJM7m7YrV6JGthk84Q6yCFgx\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"LX83enQ7x6Esb0jyohrQbodBwhM\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:47+00:00\"},{\"etag\":\"HgFDko3E20PQy9ZDftFMAzXl4ow\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"W9z4y0A1lJguQNuojEzRQ9Jo5Gd\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"eeaJzg4jHRGndIC65hpip6xacJX\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"HoO9SvlTGzRWahezRwtWkTvuRT7\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"l9vi8Dzse4VrwkeqF2lExahCc06\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"xhTg3zgbuRttFBR7zmOnEpVp14T\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"TuJrEXQWYvHYrM0Iy7ON9nMm2PH\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"4GEtzwi9cwDcbqFZT5RU74viWsC\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"jnmotBxgHMixuKXVeEppUDFXS9X\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"o6jmWmK6LOO133FPd0yQIh00Oiv\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"HfSoHXz56Lh4hrawplcr71I1v5b\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"cvZUaKecZlNyPMb8TKHnuDSNqwK\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"4jUrIlTULm04E2yzFqpLNO9Yv6Y\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"G7f3584dLNd6hIXgJCupL4EeJY3\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"19tMSZGqtQwMkt3lnfIRmThmxGy\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"sse2D2lB4wTsNuS7ShIugZpp8gz\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"O4tmD8kvLRZT3rF3LK4hGSSkGyV\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"0Yuy0lz0S5F2eNEqrvrPKFowOIy\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:46+00:00\"},{\"etag\":\"ZU5GYxGzmKlWAItGpaK6iEYFl6r\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"zJcmrLAfioW02cI0H2zXmomDtPR\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"hFxHEaiclDQHjuP7Rb7k5NdgZIL\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"iNILhRBid2pHrxV4Askz4B8nKcN\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"D6BbIEVZdJVoT24r93Myz27Krpw\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"AoDYGKhDsBiMKoPvZ2ZvRuczmPQ\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"qRkZXWfSVpRCgzY91EKW1er6Cg6\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}]}", - "x-ms-client-request-id" : "d0bac18c-d44a-407e-90ab-6571d64ecf5b" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b23a5023-bb35-4602-b831-062f11ba93b4", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Nzc=;sn=363877", + "x-ms-request-id" : "b23a5023-bb35-4602-b831-062f11ba93b4", + "Body" : "{\"items\":[{\"etag\":\"BScUIrmX4qiYFgDChYf76F3YXwU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"},{\"etag\":\"TiSxP7hxJDoDy6J2gglHeX8QVUS\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"},{\"etag\":\"6OUaq05m2Si78mL6srglFLzOIJU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"},{\"etag\":\"Q4JRSVwIHHGnkVffqe7QBbPz1ZY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"},{\"etag\":\"7ENqe1U9NS7MbZrNShAx4zZvklk\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"},{\"etag\":\"zGDVQD8z4cfh4EHvfYVZuubmxlU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"},{\"etag\":\"7JS8J30FMQAE46WTARAXQzUXnPT\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:37+00:00\"},{\"etag\":\"crhtPqICBvHl0gHwsLEIibWDZQE\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"DuRB4X32cYbNKHr1jQoHDXKAb55\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"GPWPax23gBBiRDs9P2j93LnaMJF\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"oCQdpbw3xnpl4f5Mgong0M43ze9\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"YlnUVLtETmOVJ5xvTvmrVEZBq2y\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"WNBKANFvUczvxPWHSaQp8RCQWVZ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"XdVtfB07ZCPG7h5s0LwgkYYAA1Z\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"L2EiBP7odqovHw07gBS2ob8CiFZ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"3rMfee1ViXRSMSnhmuYl7V4biM8\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"TRwkf2Jfxrx3upwA0wYSZs4zkls\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"xlgoCHeQpS7grMhMOVhfHXycbCQ\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"aMgN8Jnqgyw75mb7E69f4Gnb2PB\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"YKlMBaY1pNkkzNrtqrNOP0G0BP1\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"TLMcNBoAhZ5pWyhmlH5LnnV0IWi\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"2ad7LYTn7b00Zsbc8ExlHChtCDY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"Qb3cDf0L4rs6sky7PKnX73kKGJY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"1CcJjB6GfKWRvHCWZDmANtaBmrd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"ZxJZlNMsEkSBUrExW1kfbEQauRd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"4vfA8YLKkbplWTabIwHfrdGAnJm\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:36+00:00\"},{\"etag\":\"xQNkLnmI78XQWodmkgOGyletM1t\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"mlMNCrPHR77n83OZrhW8HffJwJx\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"lVnIy4oGkPg0HWYywxKGPARGMYX\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"J4I0QWkjXCcMJLbJOejPouE5e4R\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"OeUBv2Qh2Imvg4qjvyqffuZsSJc\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"0kdyOa1c3ysVUVHzcK8ES3KvFvB\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"Q50LkZtQkGmmQBQnTHuPvCv9QpC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"e1BUilO21q6aJC0CiWAgguOxCwp\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"xQy9I3eEUGlT48KwoEE71rTjyyg\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"WufPOegUpEXBLwx4PF25aluDUKM\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"d29I6FSYscaqehZS7JKeKwBmUEd\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"mutDMwGKPqn06wpxbjKWNhd4D2E\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"WDqLOV8Ohd1VGdsFTTuIVnOfBVL\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"vhNHIdCJbtN5EcJBL6DI6o5SIEh\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"aDt75SUnshrON0jL5rF6byckhHi\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"typjWcIDSdqHPYWjgSV5DL0tK2H\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"K7W6KtSQ3QvpTSOuEZep6P3dBsC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"48YL4ecBbdAoFMO0U141xx6JOmU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"iIbdButYdKillKUWxNUCogzA4Ch\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"xCV69pXNp1QdKmevMOUceqO2TCC\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"bUlkzGclEcDxq7cHVcFLcY1uliY\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"pZZOp4eAbqU7qyuoAFBguzSipfj\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"aD2t809c1XfKPDgR67IW48Awvma\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"XRUfWGbGM7udUwgS8dnNc91D8sl\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}]}", + "x-ms-client-request-id" : "04e1e32b-eff0-4e0e-a0b5-64125d97cb51", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key21507%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key82443%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "930809aa-f05f-4dfa-8273-5984fe74783b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTA=;sn=228150", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "410637ae-9eac-40dd-98c2-0d5669dbc036", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "410637ae-9eac-40dd-98c2-0d5669dbc036", - "Body" : "{\"items\":[{\"etag\":\"2yTAxazS9B09I5qfPPbvzYgYzGt\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}]}", - "x-ms-client-request-id" : "2fcba2ad-320b-46b2-8788-61e86b42761f" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6a7fc715-e76e-46ae-9429-a306f2f81144", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Nzc=;sn=363877", + "x-ms-request-id" : "6a7fc715-e76e-46ae-9429-a306f2f81144", + "Body" : "{\"items\":[{\"etag\":\"BScUIrmX4qiYFgDChYf76F3YXwU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"}]}", + "x-ms-client-request-id" : "930809aa-f05f-4dfa-8273-5984fe74783b", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key21507?label=181d58c6", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key82443?label=f11424bc", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b78b8070-445b-4ca1-98f1-e76a8ba2056e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTE=;sn=228151", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:38 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8ec5a405-8302-43db-b5f2-c89ab3163826", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2yTAxazS9B09I5qfPPbvzYgYzGt\"", - "x-ms-request-id" : "8ec5a405-8302-43db-b5f2-c89ab3163826", - "Body" : "{\"etag\":\"2yTAxazS9B09I5qfPPbvzYgYzGt\",\"key\":\"key21507\",\"label\":\"181d58c6\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "e9d1e5ca-7b83-4f7b-8624-fdfeb03a126e" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dc2eea80-bedb-4425-b54b-91559ffd1261", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"BScUIrmX4qiYFgDChYf76F3YXwU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Nzg=;sn=363878", + "x-ms-request-id" : "dc2eea80-bedb-4425-b54b-91559ffd1261", + "Body" : "{\"etag\":\"BScUIrmX4qiYFgDChYf76F3YXwU\",\"key\":\"key82443\",\"label\":\"f11424bc\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:38+00:00\"}", + "x-ms-client-request-id" : "b78b8070-445b-4ca1-98f1-e76a8ba2056e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key21507", "181d58c6" ] + "variables" : [ "key82443", "f11424bc" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json index 5a8b8a78347b..1cbade448868 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json @@ -1,1566 +1,1674 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f61d7bee-0ba7-4048-b759-e865cb8c490e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bceb4088-c3b0-4454-a66a-0c9151fa7e71", + "x-ms-correlation-request-id" : "244dd51a-2cbf-4604-92de-2b7d92a0cea1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"p0MB3FVqBFZjVNLxsswPOLhAhbw\"", + "ETag" : "\"ZBMDstnwHSKslbKMi0XmcYDrdQH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzQ=;sn=355874", - "x-ms-request-id" : "bceb4088-c3b0-4454-a66a-0c9151fa7e71", - "Body" : "{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "d2bdf27e-408f-4b17-b493-d1ffacd6326d", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTI=;sn=363952", + "x-ms-request-id" : "244dd51a-2cbf-4604-92de-2b7d92a0cea1", + "Body" : "{\"etag\":\"ZBMDstnwHSKslbKMi0XmcYDrdQH\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "f61d7bee-0ba7-4048-b759-e865cb8c490e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e44528e3-89ff-4eff-b036-b9ed0d4567b5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4193214e-5f67-4270-ab89-54f42fa54127", + "x-ms-correlation-request-id" : "03af525a-e459-428f-84c1-2ea27135e6e4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"00dvZCg3Agikg0apkpzWHdwbWg3\"", + "ETag" : "\"QvPN3p87MEvTdpA1a29thw1X1IX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzU=;sn=355875", - "x-ms-request-id" : "4193214e-5f67-4270-ab89-54f42fa54127", - "Body" : "{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "3000c086-0f8a-47f1-aeaa-9a69161312d7", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTM=;sn=363953", + "x-ms-request-id" : "03af525a-e459-428f-84c1-2ea27135e6e4", + "Body" : "{\"etag\":\"QvPN3p87MEvTdpA1a29thw1X1IX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "e44528e3-89ff-4eff-b036-b9ed0d4567b5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5871e546-956a-441c-856c-cbd0abc9d066", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "54658145-c0fb-47fa-b631-1cc420a6b02d", + "x-ms-correlation-request-id" : "e990cde8-fa41-42b7-b9f5-e1d2a700929d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\"", + "ETag" : "\"qlt5dv1mwvKMaaL4EJZmYXnK4eL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzY=;sn=355876", - "x-ms-request-id" : "54658145-c0fb-47fa-b631-1cc420a6b02d", - "Body" : "{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "07d6814d-ab25-46e1-afa4-655d3b0b6590", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTQ=;sn=363954", + "x-ms-request-id" : "e990cde8-fa41-42b7-b9f5-e1d2a700929d", + "Body" : "{\"etag\":\"qlt5dv1mwvKMaaL4EJZmYXnK4eL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "5871e546-956a-441c-856c-cbd0abc9d066", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "05bd1bcb-e33a-4c0e-9f09-2763b58d521d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a7fa2fe0-fe9c-4abb-9271-0e9d6f312b27", + "x-ms-correlation-request-id" : "51b922f5-684e-4a68-8711-a941b6325be2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\"", + "ETag" : "\"HZfCIyy8nuUKi3XBnLtTeTRgM2S\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzc=;sn=355877", - "x-ms-request-id" : "a7fa2fe0-fe9c-4abb-9271-0e9d6f312b27", - "Body" : "{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "de2ef565-d821-4034-baab-c0c9a40126cc", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTU=;sn=363955", + "x-ms-request-id" : "51b922f5-684e-4a68-8711-a941b6325be2", + "Body" : "{\"etag\":\"HZfCIyy8nuUKi3XBnLtTeTRgM2S\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "05bd1bcb-e33a-4c0e-9f09-2763b58d521d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f5c29938-eb6b-43b2-a879-a0b25abddc2e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7e383573-4916-4de1-b8d8-fa1f9efdc5d0", + "x-ms-correlation-request-id" : "030a498c-059b-4523-ba8d-0c6e0fdf01bc", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"p9RxmrmZRawSLeckvkXstrivMyo\"", + "ETag" : "\"tq7vcx1dA0aveMiiB0erBP8p6zc\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzg=;sn=355878", - "x-ms-request-id" : "7e383573-4916-4de1-b8d8-fa1f9efdc5d0", - "Body" : "{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "1c7acd25-7b63-4577-acb3-8ad7ea36ae69", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTY=;sn=363956", + "x-ms-request-id" : "030a498c-059b-4523-ba8d-0c6e0fdf01bc", + "Body" : "{\"etag\":\"tq7vcx1dA0aveMiiB0erBP8p6zc\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "f5c29938-eb6b-43b2-a879-a0b25abddc2e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1f49c245-8015-4371-b334-420f165a704a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "136b4995-a72d-4904-b6ba-060ad4944288", + "x-ms-correlation-request-id" : "74c026d6-89cf-43eb-9837-198587bffb41", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8Devdke7sMPe04s3PwZKw6qfk6z\"", + "ETag" : "\"uxAy7Kir57cQkZ2VIJgw3VkC2Br\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzk=;sn=355879", - "x-ms-request-id" : "136b4995-a72d-4904-b6ba-060ad4944288", - "Body" : "{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "c93dfa6f-fd73-42a4-b034-03408215476a", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTc=;sn=363957", + "x-ms-request-id" : "74c026d6-89cf-43eb-9837-198587bffb41", + "Body" : "{\"etag\":\"uxAy7Kir57cQkZ2VIJgw3VkC2Br\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "1f49c245-8015-4371-b334-420f165a704a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "976fb835-4992-47f1-9a78-db5ab3962966", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "be84bf67-fb78-4567-9e94-0048949e6268", + "x-ms-correlation-request-id" : "9b8f058c-d420-4e31-af11-87a26098d6c6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YhAhxzohYdYHtwflMeYCW9lGmSI\"", + "ETag" : "\"R3z6ktBJhWJ6o8flnmkK84I15O3\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODA=;sn=355880", - "x-ms-request-id" : "be84bf67-fb78-4567-9e94-0048949e6268", - "Body" : "{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "c1d401aa-3848-4f54-88f6-efb2089d1ea6", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTg=;sn=363958", + "x-ms-request-id" : "9b8f058c-d420-4e31-af11-87a26098d6c6", + "Body" : "{\"etag\":\"R3z6ktBJhWJ6o8flnmkK84I15O3\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "976fb835-4992-47f1-9a78-db5ab3962966", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5ec99ce0-e077-4a32-8223-cde5c3511a92", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bd7e7b5f-2015-4321-a406-7e7803234eac", + "x-ms-correlation-request-id" : "d077fc75-e053-444c-8db0-626821d72d2c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"C8shr4IPeLKH9OH389cfhCWnluO\"", + "ETag" : "\"BMCEIbdqotTgWjrWNMXFzLkAMcK\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODE=;sn=355881", - "x-ms-request-id" : "bd7e7b5f-2015-4321-a406-7e7803234eac", - "Body" : "{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", - "x-ms-client-request-id" : "54bae747-9a00-453a-ae47-6d0156a712c9", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NTk=;sn=363959", + "x-ms-request-id" : "d077fc75-e053-444c-8db0-626821d72d2c", + "Body" : "{\"etag\":\"BMCEIbdqotTgWjrWNMXFzLkAMcK\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "5ec99ce0-e077-4a32-8223-cde5c3511a92", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "143d401a-fbb1-49b4-a198-d0f5a3e52d09", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bd0bfec6-f4c5-41d7-addf-77e69d7fe4a8", + "x-ms-correlation-request-id" : "8d043438-456f-4ce0-a02e-1b193774a10c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Up43irEjbjqalUXffHvAAY8IOSK\"", + "ETag" : "\"0yMSC7Dgx2vDDMcKr2OA3jr5nqA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODI=;sn=355882", - "x-ms-request-id" : "bd0bfec6-f4c5-41d7-addf-77e69d7fe4a8", - "Body" : "{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "a2a7eba3-7293-48cc-9a33-9e9d1d8296cf", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjA=;sn=363960", + "x-ms-request-id" : "8d043438-456f-4ce0-a02e-1b193774a10c", + "Body" : "{\"etag\":\"0yMSC7Dgx2vDDMcKr2OA3jr5nqA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "143d401a-fbb1-49b4-a198-d0f5a3e52d09", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a101aa9a-f472-468e-a213-55ed3331e217", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "48cfda9c-8d2b-479d-9f44-0141d7dd1360", + "x-ms-correlation-request-id" : "0a875eec-0792-4f67-b8bb-89e2e0c8de6c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\"", + "ETag" : "\"voJCHc4vcU4v35O2Uuf5Kiea9S6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODM=;sn=355883", - "x-ms-request-id" : "48cfda9c-8d2b-479d-9f44-0141d7dd1360", - "Body" : "{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "cb067747-0ce6-4b1f-a11d-f401bf07177f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjE=;sn=363961", + "x-ms-request-id" : "0a875eec-0792-4f67-b8bb-89e2e0c8de6c", + "Body" : "{\"etag\":\"voJCHc4vcU4v35O2Uuf5Kiea9S6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "a101aa9a-f472-468e-a213-55ed3331e217", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "55450c08-4d0a-4918-a312-b54af155dbb0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0af69448-1fc5-453e-8ae3-1f29cafdf993", + "x-ms-correlation-request-id" : "8172afdc-34ae-486a-8038-09e2d4282b36", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"udup4cnXm2J1wCkSX6hrEsmp0jS\"", + "ETag" : "\"pbJXQ83ulyK5ygXWxX0WKD77WGu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODQ=;sn=355884", - "x-ms-request-id" : "0af69448-1fc5-453e-8ae3-1f29cafdf993", - "Body" : "{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "3af5db32-27a1-489c-b880-78cc41073256", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjI=;sn=363962", + "x-ms-request-id" : "8172afdc-34ae-486a-8038-09e2d4282b36", + "Body" : "{\"etag\":\"pbJXQ83ulyK5ygXWxX0WKD77WGu\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "55450c08-4d0a-4918-a312-b54af155dbb0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2a9dce69-b78a-48ec-a5ea-efb850d720a4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b3395e3a-c98f-477d-88ac-14562005d1bc", + "x-ms-correlation-request-id" : "3ea677a9-fe70-4c9c-b6f2-ba045fe740b6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"620Rpelck23ILRestB0TMMwA0AX\"", + "ETag" : "\"6FeYxoi7q1bJem6wOKDpJdx2iC9\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODU=;sn=355885", - "x-ms-request-id" : "b3395e3a-c98f-477d-88ac-14562005d1bc", - "Body" : "{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "d1b59f2d-5aa1-42bb-b533-85ae24b89817", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjM=;sn=363963", + "x-ms-request-id" : "3ea677a9-fe70-4c9c-b6f2-ba045fe740b6", + "Body" : "{\"etag\":\"6FeYxoi7q1bJem6wOKDpJdx2iC9\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "2a9dce69-b78a-48ec-a5ea-efb850d720a4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6d07ad64-19e5-457d-8f35-e91afcda9045", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "61e68673-4082-4a35-bda2-8a3942331829", + "x-ms-correlation-request-id" : "6984962a-00dd-4870-8643-83dd208cad7f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"q5W7UXp1miYWUjOljt6NqIBxQCL\"", + "ETag" : "\"gKHvJVlVCCTll1sH28032Q3UFQJ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODY=;sn=355886", - "x-ms-request-id" : "61e68673-4082-4a35-bda2-8a3942331829", - "Body" : "{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "7620189b-34a9-4434-a5ff-64a14525b929", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjQ=;sn=363964", + "x-ms-request-id" : "6984962a-00dd-4870-8643-83dd208cad7f", + "Body" : "{\"etag\":\"gKHvJVlVCCTll1sH28032Q3UFQJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "6d07ad64-19e5-457d-8f35-e91afcda9045", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe40efa7-fdc9-4063-aae3-2b4b47057cff", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "39140317-21d7-45de-819e-d95abdebf35a", + "x-ms-correlation-request-id" : "b10540c6-c314-4dbb-9edc-32c97b2a3524", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Usldr2j3QJbxVgeNv8r9rNpwq05\"", + "ETag" : "\"iYFg2PMlmrL98sgrSzwEXQtblHR\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODc=;sn=355887", - "x-ms-request-id" : "39140317-21d7-45de-819e-d95abdebf35a", - "Body" : "{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "65ad371d-3858-4e73-826c-cd9d09320083", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjU=;sn=363965", + "x-ms-request-id" : "b10540c6-c314-4dbb-9edc-32c97b2a3524", + "Body" : "{\"etag\":\"iYFg2PMlmrL98sgrSzwEXQtblHR\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "fe40efa7-fdc9-4063-aae3-2b4b47057cff", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0f57d8a1-4ee5-47e2-9de0-1202381bf83e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "40ac7bb8-ed66-4ae2-b989-b337df250088", + "x-ms-correlation-request-id" : "5eaefd2d-fc33-4958-9cf6-e72e6e896820", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"vlaOlFXK0JhM5pTaFesWP2IjN4q\"", + "ETag" : "\"Dmbo1hxuaWXRs5DPItMyQOl0fcj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODg=;sn=355888", - "x-ms-request-id" : "40ac7bb8-ed66-4ae2-b989-b337df250088", - "Body" : "{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "cdefd95b-8608-4719-b83d-bed12685ca85", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NjY=;sn=363966", + "x-ms-request-id" : "5eaefd2d-fc33-4958-9cf6-e72e6e896820", + "Body" : "{\"etag\":\"Dmbo1hxuaWXRs5DPItMyQOl0fcj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "0f57d8a1-4ee5-47e2-9de0-1202381bf83e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7235d221-9528-4f5b-a965-76445fceb3cd", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bf774467-8a53-4f19-81a4-11a02cab034f", + "x-ms-correlation-request-id" : "33f3122d-b3c6-4c34-b13d-afed020378c7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PuS2hCuYdTOzQMN9DrsXpeAggwm\"", + "ETag" : "\"aloVx8HTkG3JdJ33lSB4EXW4FeB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODk=;sn=355889", - "x-ms-request-id" : "bf774467-8a53-4f19-81a4-11a02cab034f", - "Body" : "{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "006aec97-d3eb-4fca-9a1b-81cdab2c1bf2", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Njc=;sn=363967", + "x-ms-request-id" : "33f3122d-b3c6-4c34-b13d-afed020378c7", + "Body" : "{\"etag\":\"aloVx8HTkG3JdJ33lSB4EXW4FeB\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "7235d221-9528-4f5b-a965-76445fceb3cd", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "745fbc75-3c94-469c-97df-4a59fd267888", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "225f520a-d0ef-425a-80d4-fcc99ef4769e", + "x-ms-correlation-request-id" : "7f1c8408-8bb8-4793-a62d-4ab13ba36ee5", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"twa1k4YYgm4NxGP9nZHvYamP4CN\"", + "ETag" : "\"L1NGDQoJQiFX8Q44XBQxj7SveUj\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTA=;sn=355890", - "x-ms-request-id" : "225f520a-d0ef-425a-80d4-fcc99ef4769e", - "Body" : "{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "55b82130-96dd-4dae-9164-c0f895d93dab", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Njg=;sn=363968", + "x-ms-request-id" : "7f1c8408-8bb8-4793-a62d-4ab13ba36ee5", + "Body" : "{\"etag\":\"L1NGDQoJQiFX8Q44XBQxj7SveUj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "745fbc75-3c94-469c-97df-4a59fd267888", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f012ffc3-ec06-451a-9721-781cb4a3f1a9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f2e7480d-66bf-4ba4-be50-e0185ce45f5f", + "x-ms-correlation-request-id" : "6b61c523-c722-49d1-acc9-e7f9d895f474", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XP7Pbv623eatufHiKTkq5HpFDSa\"", + "ETag" : "\"gs8iQuVm1zmUahILpZPXq1iweWk\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTE=;sn=355891", - "x-ms-request-id" : "f2e7480d-66bf-4ba4-be50-e0185ce45f5f", - "Body" : "{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "70f80ed5-cfbb-47a2-8adf-38c8a86442a4", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Njk=;sn=363969", + "x-ms-request-id" : "6b61c523-c722-49d1-acc9-e7f9d895f474", + "Body" : "{\"etag\":\"gs8iQuVm1zmUahILpZPXq1iweWk\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "f012ffc3-ec06-451a-9721-781cb4a3f1a9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8eca5ba1-4efd-4528-923b-0bea8365b079", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "85cdb848-4c94-4d5e-951a-aed3241e3b0e", + "x-ms-correlation-request-id" : "9352f32c-d5f9-4e3a-ba7a-8c7c1789d19b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"wHw9EdHFL2ieEAXdBEPem9KW0A8\"", + "ETag" : "\"Yc91aTDZL7QGCYx1yTMMCSSg7K6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTI=;sn=355892", - "x-ms-request-id" : "85cdb848-4c94-4d5e-951a-aed3241e3b0e", - "Body" : "{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "12960f73-ddb1-4851-9111-7360667a7a56", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzA=;sn=363970", + "x-ms-request-id" : "9352f32c-d5f9-4e3a-ba7a-8c7c1789d19b", + "Body" : "{\"etag\":\"Yc91aTDZL7QGCYx1yTMMCSSg7K6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "8eca5ba1-4efd-4528-923b-0bea8365b079", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7c56975f-06bc-4365-83e1-8fdd769db9f8", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9fb59f85-2e10-429d-b81b-30db040b9fb9", + "x-ms-correlation-request-id" : "38546d21-97e3-4c6c-9d8b-432609443b67", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"oZwOhlAepkUSGd1qN7oTZLdKCJV\"", + "ETag" : "\"Q8p7dAYcgyOmQutc3OPlz1r6nny\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTM=;sn=355893", - "x-ms-request-id" : "9fb59f85-2e10-429d-b81b-30db040b9fb9", - "Body" : "{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "4130669e-ac5e-4f43-b1bd-43abe585533c", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzE=;sn=363971", + "x-ms-request-id" : "38546d21-97e3-4c6c-9d8b-432609443b67", + "Body" : "{\"etag\":\"Q8p7dAYcgyOmQutc3OPlz1r6nny\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "7c56975f-06bc-4365-83e1-8fdd769db9f8", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "31fab7dd-cd7c-41aa-983a-dae0c7fb0842", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3428896b-437d-4fac-abe3-5632d3cbd658", + "x-ms-correlation-request-id" : "a003739b-a352-4fcd-a07e-24382ee91216", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\"", + "ETag" : "\"69wU9q5fNDqd1JRfqvV3SvPAEDn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTQ=;sn=355894", - "x-ms-request-id" : "3428896b-437d-4fac-abe3-5632d3cbd658", - "Body" : "{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "a069cebe-a5b4-48c5-95c5-94c3d7d3eaf9", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzI=;sn=363972", + "x-ms-request-id" : "a003739b-a352-4fcd-a07e-24382ee91216", + "Body" : "{\"etag\":\"69wU9q5fNDqd1JRfqvV3SvPAEDn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "31fab7dd-cd7c-41aa-983a-dae0c7fb0842", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1ff975b6-b8df-4ed3-927d-2fa847be509d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "06ec0683-2f72-4744-bb42-ccd9d5c3652a", + "x-ms-correlation-request-id" : "3b581c20-d508-4207-8654-e800714f47ea", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"l9X9deLtYeTmwqTucwoYtzP2EQh\"", + "ETag" : "\"58cCWpwQSWBfB7ahKC7wDLXodlP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTU=;sn=355895", - "x-ms-request-id" : "06ec0683-2f72-4744-bb42-ccd9d5c3652a", - "Body" : "{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "f8c13f88-89a7-42b2-a5fc-48b34933a8e5", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzM=;sn=363973", + "x-ms-request-id" : "3b581c20-d508-4207-8654-e800714f47ea", + "Body" : "{\"etag\":\"58cCWpwQSWBfB7ahKC7wDLXodlP\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "1ff975b6-b8df-4ed3-927d-2fa847be509d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "209dc8c2-57c8-4c19-92d8-8e8856476c03", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "bc39a19e-73f7-4913-b375-ab902891f0d3", + "x-ms-correlation-request-id" : "a5f0d79a-7a53-4f95-b717-303b0afc7812", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"dSDAldBXJNPHSlUxrB3bVtAlrDr\"", + "ETag" : "\"aINSq9VZ1PdG64ubfrXU6zeIDeL\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTY=;sn=355896", - "x-ms-request-id" : "bc39a19e-73f7-4913-b375-ab902891f0d3", - "Body" : "{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "e3a6bc07-2c07-4d50-a0ee-9dafe1f29caf", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzQ=;sn=363974", + "x-ms-request-id" : "a5f0d79a-7a53-4f95-b717-303b0afc7812", + "Body" : "{\"etag\":\"aINSq9VZ1PdG64ubfrXU6zeIDeL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "209dc8c2-57c8-4c19-92d8-8e8856476c03", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7abb96ab-cae1-4658-bb06-4039e52480fe", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "b580fe5c-2f9b-458e-bf93-e332af7e7579", + "x-ms-correlation-request-id" : "c36e6835-af70-4fd5-bf8b-b99e1845b027", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bBXCRuTyjV48XDYWCld5T1wsJEK\"", + "ETag" : "\"kLmrQxfMZc1YSkgHJhVHmSMqKl4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTc=;sn=355897", - "x-ms-request-id" : "b580fe5c-2f9b-458e-bf93-e332af7e7579", - "Body" : "{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "ede36812-3d18-436e-9144-c57351baa827", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzU=;sn=363975", + "x-ms-request-id" : "c36e6835-af70-4fd5-bf8b-b99e1845b027", + "Body" : "{\"etag\":\"kLmrQxfMZc1YSkgHJhVHmSMqKl4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "7abb96ab-cae1-4658-bb06-4039e52480fe", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "45fda5d8-98d6-4f03-bd8b-a5b74ce06c46", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d6939593-32f1-4cbc-b1aa-4006dbe7125f", + "x-ms-correlation-request-id" : "96768448-2ed6-48c3-bb32-70e9df2e15c8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Xb3bwvgDRP2khWPffFH50MHQtCl\"", + "ETag" : "\"YvGmoOpCyEPNnTxOIF5GG8zDTnA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTg=;sn=355898", - "x-ms-request-id" : "d6939593-32f1-4cbc-b1aa-4006dbe7125f", - "Body" : "{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "dae9c320-abb0-4e6f-afcf-9223b445db24", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NzY=;sn=363976", + "x-ms-request-id" : "96768448-2ed6-48c3-bb32-70e9df2e15c8", + "Body" : "{\"etag\":\"YvGmoOpCyEPNnTxOIF5GG8zDTnA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "45fda5d8-98d6-4f03-bd8b-a5b74ce06c46", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c9a88b5e-813d-4332-b46b-76380de30e4c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:44 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "29327c51-8cc6-4834-bf1e-13d4dfeddd40", + "x-ms-correlation-request-id" : "e432bc24-01da-49db-9dab-85113ebab507", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"4kukVlmat3kcn834zTAvHSohV30\"", + "ETag" : "\"EYyMjwvtxUqLiju3HSl96qFWuxQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTk=;sn=355899", - "x-ms-request-id" : "29327c51-8cc6-4834-bf1e-13d4dfeddd40", - "Body" : "{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "8839dadb-9412-4702-8742-8aa3be5b6193", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Nzc=;sn=363977", + "x-ms-request-id" : "e432bc24-01da-49db-9dab-85113ebab507", + "Body" : "{\"etag\":\"EYyMjwvtxUqLiju3HSl96qFWuxQ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "c9a88b5e-813d-4332-b46b-76380de30e4c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "88de85f6-e493-4dc9-a425-79bf6bb5f33c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d3b5e300-a1dc-4ab7-951b-e8a04942759f", + "x-ms-correlation-request-id" : "bd8f8ad2-8f13-46b9-8d74-e48e8d471f6f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\"", + "ETag" : "\"7z1xydRFgw1r9Bh2tFxXMwXCh1A\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDA=;sn=355900", - "x-ms-request-id" : "d3b5e300-a1dc-4ab7-951b-e8a04942759f", - "Body" : "{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", - "x-ms-client-request-id" : "4fb5a3ed-f863-496a-9920-e4836e1db3a5", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Nzg=;sn=363978", + "x-ms-request-id" : "bd8f8ad2-8f13-46b9-8d74-e48e8d471f6f", + "Body" : "{\"etag\":\"7z1xydRFgw1r9Bh2tFxXMwXCh1A\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "88de85f6-e493-4dc9-a425-79bf6bb5f33c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5175f3d4-27a0-4296-a200-df142cc79aa5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1c113ae9-ac4b-42c9-81e5-8bc97e91aa0f", + "x-ms-correlation-request-id" : "7207eb28-8de7-46eb-95e6-3bbe6534e12b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7AQSsfZ2RojgFR1GXdyIsk1taDx\"", + "ETag" : "\"M7aBDTWGiHN27cBQ3PXzSYeIKrJ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDE=;sn=355901", - "x-ms-request-id" : "1c113ae9-ac4b-42c9-81e5-8bc97e91aa0f", - "Body" : "{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "a16b10f0-40e0-429c-afa8-07fab38beb4a", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Nzk=;sn=363979", + "x-ms-request-id" : "7207eb28-8de7-46eb-95e6-3bbe6534e12b", + "Body" : "{\"etag\":\"M7aBDTWGiHN27cBQ3PXzSYeIKrJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}", + "x-ms-client-request-id" : "5175f3d4-27a0-4296-a200-df142cc79aa5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb2697c3-d1b3-433a-af28-d4e30d4432c9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1fde4c4b-3980-4161-8769-e87010f8af85", + "x-ms-correlation-request-id" : "ad12a78a-7596-438a-890b-840d696aaf70", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\"", + "ETag" : "\"blKUY8gaJeb2n7B72mo2ohcvjyZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDI=;sn=355902", - "x-ms-request-id" : "1fde4c4b-3980-4161-8769-e87010f8af85", - "Body" : "{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "bb552f2b-e76a-418b-898f-7ba8ca8f4b04", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODA=;sn=363980", + "x-ms-request-id" : "ad12a78a-7596-438a-890b-840d696aaf70", + "Body" : "{\"etag\":\"blKUY8gaJeb2n7B72mo2ohcvjyZ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "eb2697c3-d1b3-433a-af28-d4e30d4432c9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a135b94c-01f4-4d0c-84e2-1a8f36a13e6d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "13c7f463-a3ab-4881-8539-fab9158cf413", + "x-ms-correlation-request-id" : "985b7bc8-6b33-4fc1-bc7c-90b744408e9d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MePefJ3j6qhoUpxBrrQVMazWYwF\"", + "ETag" : "\"Jd5Cf4rhnBzyGMqjiGDvEX0XfXA\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDM=;sn=355903", - "x-ms-request-id" : "13c7f463-a3ab-4881-8539-fab9158cf413", - "Body" : "{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "900e6871-c5cc-47f4-a0a7-15897af86e6d", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODE=;sn=363981", + "x-ms-request-id" : "985b7bc8-6b33-4fc1-bc7c-90b744408e9d", + "Body" : "{\"etag\":\"Jd5Cf4rhnBzyGMqjiGDvEX0XfXA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "a135b94c-01f4-4d0c-84e2-1a8f36a13e6d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3bd80d12-47a0-4ea2-be00-804d07873c5e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d650b894-71f1-42ca-ae70-e14f20e4a6ce", + "x-ms-correlation-request-id" : "14eca861-0400-4f3a-b262-37ea4e5995a0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"kahfNTljWMpvGYGG5ToAldMDbt3\"", + "ETag" : "\"v90gPjlDl6QcQRThbYvKaxqYcA2\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDQ=;sn=355904", - "x-ms-request-id" : "d650b894-71f1-42ca-ae70-e14f20e4a6ce", - "Body" : "{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "ceb5a2bd-a57b-471f-9db2-d894cf07ab46", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODI=;sn=363982", + "x-ms-request-id" : "14eca861-0400-4f3a-b262-37ea4e5995a0", + "Body" : "{\"etag\":\"v90gPjlDl6QcQRThbYvKaxqYcA2\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "3bd80d12-47a0-4ea2-be00-804d07873c5e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2ff705ce-7d19-4b43-abd6-36b28dc8a6d4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "0b7f919f-16fa-495f-8044-7dc8ebe15c6f", + "x-ms-correlation-request-id" : "8b2896ea-d945-4adf-85b9-dd87bfb12df0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jipB3VSo7sdhmaUZJuOmAaY9lgn\"", + "ETag" : "\"g9Fp8KFJoT0tWPPoc4RshHEjVxr\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDU=;sn=355905", - "x-ms-request-id" : "0b7f919f-16fa-495f-8044-7dc8ebe15c6f", - "Body" : "{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "3b2a6948-cfe3-46e3-b77c-b915ed145251", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODM=;sn=363983", + "x-ms-request-id" : "8b2896ea-d945-4adf-85b9-dd87bfb12df0", + "Body" : "{\"etag\":\"g9Fp8KFJoT0tWPPoc4RshHEjVxr\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "2ff705ce-7d19-4b43-abd6-36b28dc8a6d4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dd595764-66b5-4533-9612-4f564f4fc26f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ffa87632-69ba-4acd-a73b-407caf5b049c", + "x-ms-correlation-request-id" : "d8535820-716e-474e-8003-dcbdb8b68854", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\"", + "ETag" : "\"0BqAPR3B0jkgYpu1DppTkBlBZ7F\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDY=;sn=355906", - "x-ms-request-id" : "ffa87632-69ba-4acd-a73b-407caf5b049c", - "Body" : "{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "db9a426b-f9a3-483c-b905-6a578adc3231", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODQ=;sn=363984", + "x-ms-request-id" : "d8535820-716e-474e-8003-dcbdb8b68854", + "Body" : "{\"etag\":\"0BqAPR3B0jkgYpu1DppTkBlBZ7F\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "dd595764-66b5-4533-9612-4f564f4fc26f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b5e2ae0-e756-4d44-b2d1-16be5d461973", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "24f6641c-ef0d-4f91-8e79-0433aa1c4261", + "x-ms-correlation-request-id" : "bfdfafa4-72d3-43c9-8976-de81cac0169a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\"", + "ETag" : "\"GttWGk53sOYSY4PJ43iCN0EpDcb\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDc=;sn=355907", - "x-ms-request-id" : "24f6641c-ef0d-4f91-8e79-0433aa1c4261", - "Body" : "{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "826d15bc-dd6a-4f03-ab9f-332b631b6639", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODU=;sn=363985", + "x-ms-request-id" : "bfdfafa4-72d3-43c9-8976-de81cac0169a", + "Body" : "{\"etag\":\"GttWGk53sOYSY4PJ43iCN0EpDcb\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "0b5e2ae0-e756-4d44-b2d1-16be5d461973", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "85b98a2f-3182-4173-bd7f-1342e97fef1c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "134d2c55-8dd0-47f9-807b-0ae56872ab03", + "x-ms-correlation-request-id" : "293290a1-d400-429d-8bf5-567d7f4b68bf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7MoKeeNubE0KODpNpfTuGIzBlwd\"", + "ETag" : "\"CBpyRawkdMZZ2crjpPj8DY1GENU\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDg=;sn=355908", - "x-ms-request-id" : "134d2c55-8dd0-47f9-807b-0ae56872ab03", - "Body" : "{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "fce4b573-e443-4716-ad81-cf2b6af3bf43", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODY=;sn=363986", + "x-ms-request-id" : "293290a1-d400-429d-8bf5-567d7f4b68bf", + "Body" : "{\"etag\":\"CBpyRawkdMZZ2crjpPj8DY1GENU\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "85b98a2f-3182-4173-bd7f-1342e97fef1c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "597ff9ca-c961-4730-a401-7d0731b82612", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "99d685eb-18ab-4f52-acb1-49ae7c061328", + "x-ms-correlation-request-id" : "1de375eb-998d-47f9-a41f-c4065de233ec", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"7cLVmuRCZycFRHVEORZISnLXw24\"", + "ETag" : "\"5uW6tG2brO0adPKkdJ6aXt2UjzD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDk=;sn=355909", - "x-ms-request-id" : "99d685eb-18ab-4f52-acb1-49ae7c061328", - "Body" : "{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "8ac07158-e099-4244-8375-33cf52f22309", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODc=;sn=363987", + "x-ms-request-id" : "1de375eb-998d-47f9-a41f-c4065de233ec", + "Body" : "{\"etag\":\"5uW6tG2brO0adPKkdJ6aXt2UjzD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "597ff9ca-c961-4730-a401-7d0731b82612", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b9be0325-0e69-4723-ba37-67e692a78570", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "939f6381-9adb-42b6-a258-85c5e60b4e9d", + "x-ms-correlation-request-id" : "ca9515c4-f740-4689-a888-08eb7ca4f05b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Eh0OBSjMqf5WJo7XokfdLlegCAt\"", + "ETag" : "\"u7jTzhSwirxuShhShNfiY7jZViD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTA=;sn=355910", - "x-ms-request-id" : "939f6381-9adb-42b6-a258-85c5e60b4e9d", - "Body" : "{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "a90719d6-1772-46f4-a8d1-5fdc0ecdfaa6", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODg=;sn=363988", + "x-ms-request-id" : "ca9515c4-f740-4689-a888-08eb7ca4f05b", + "Body" : "{\"etag\":\"u7jTzhSwirxuShhShNfiY7jZViD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "b9be0325-0e69-4723-ba37-67e692a78570", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9a0502c4-c869-4916-b387-01cb105048c2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4fe59c3b-f372-4d30-8983-5dcbd9dbcbaa", + "x-ms-correlation-request-id" : "05ca8d7c-d899-40cc-a9ea-cdf147c79dc0", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gIdLMmhbXMggBZivNgx67KwqZhm\"", + "ETag" : "\"MI3WvwIgo5Kn5fyswTYiP8z7cMY\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTE=;sn=355911", - "x-ms-request-id" : "4fe59c3b-f372-4d30-8983-5dcbd9dbcbaa", - "Body" : "{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "400df51a-c26b-4e72-ba96-1750332db3a3", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5ODk=;sn=363989", + "x-ms-request-id" : "05ca8d7c-d899-40cc-a9ea-cdf147c79dc0", + "Body" : "{\"etag\":\"MI3WvwIgo5Kn5fyswTYiP8z7cMY\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "9a0502c4-c869-4916-b387-01cb105048c2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "beb91e57-f1e2-4307-9288-63d16ed9f04a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:45 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "3fdf9c2f-c8a3-4fa4-bae1-0d95bfb417f8", + "x-ms-correlation-request-id" : "cf1dab41-35ec-4bca-bfff-700ee136fc25", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"14PbIi2LwReXsOvpHAbKNjsr0XW\"", + "ETag" : "\"hkWetLTCNq9Ux6fRNuKh8WVCRZo\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTI=;sn=355912", - "x-ms-request-id" : "3fdf9c2f-c8a3-4fa4-bae1-0d95bfb417f8", - "Body" : "{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "ce1ec363-1ddb-45dd-93f1-8d4df87c0676", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTA=;sn=363990", + "x-ms-request-id" : "cf1dab41-35ec-4bca-bfff-700ee136fc25", + "Body" : "{\"etag\":\"hkWetLTCNq9Ux6fRNuKh8WVCRZo\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "beb91e57-f1e2-4307-9288-63d16ed9f04a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7cdb8d14-37e0-4cfc-98be-a155af8ba712", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:46 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "902ac7d1-7c3b-4485-b99e-6935b3624ee1", + "x-ms-correlation-request-id" : "9db0eb27-4eb6-47a5-ad44-f9746a5cd497", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"UfIowR4bMvwG95aQGEXNbbRehFD\"", + "ETag" : "\"V3rHEDVzQ95rkR7hDy8XprNrzLS\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTM=;sn=355913", - "x-ms-request-id" : "902ac7d1-7c3b-4485-b99e-6935b3624ee1", - "Body" : "{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "306a548d-f99b-4017-be6a-be66c47c4146", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTE=;sn=363991", + "x-ms-request-id" : "9db0eb27-4eb6-47a5-ad44-f9746a5cd497", + "Body" : "{\"etag\":\"V3rHEDVzQ95rkR7hDy8XprNrzLS\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "7cdb8d14-37e0-4cfc-98be-a155af8ba712", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dc43d04a-70b9-4e11-bbdb-ec0baaef092c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:46 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:46 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "79fcc3a8-4b00-4f42-bc0d-3481c49b0898", + "x-ms-correlation-request-id" : "069c3b86-5d38-4b08-b635-df637b0b7f33", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PLkDXVkfpxYR062op1QXDEIJPeP\"", + "ETag" : "\"RZfSJkksejp0X0VHqH4tXAs1lnn\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTQ=;sn=355914", - "x-ms-request-id" : "79fcc3a8-4b00-4f42-bc0d-3481c49b0898", - "Body" : "{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "04f0efbb-fc25-4519-aa79-329af3c3f11f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTI=;sn=363992", + "x-ms-request-id" : "069c3b86-5d38-4b08-b635-df637b0b7f33", + "Body" : "{\"etag\":\"RZfSJkksejp0X0VHqH4tXAs1lnn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"}", + "x-ms-client-request-id" : "dc43d04a-70b9-4e11-bbdb-ec0baaef092c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7e8ed67-0a77-4cf6-babd-0ac0077beca9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d150fad7-9754-4f6d-a8c8-40ac74686e7a", + "x-ms-correlation-request-id" : "4e4e3036-52e3-485f-b2b1-2762b6a1696f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\"", + "ETag" : "\"KWyHFwL3M7ccq2DTd1vOL5AKCvq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTU=;sn=355915", - "x-ms-request-id" : "d150fad7-9754-4f6d-a8c8-40ac74686e7a", - "Body" : "{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "d1d19ec4-e9a5-49a1-9bce-7c95d25d3566", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTM=;sn=363993", + "x-ms-request-id" : "4e4e3036-52e3-485f-b2b1-2762b6a1696f", + "Body" : "{\"etag\":\"KWyHFwL3M7ccq2DTd1vOL5AKCvq\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "a7e8ed67-0a77-4cf6-babd-0ac0077beca9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5af80f62-af3a-466f-9c5c-580d1a568220", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "af50b9c5-748a-4d30-96f8-82e5dbafb9eb", + "x-ms-correlation-request-id" : "cf0129ac-cab7-4e3f-9412-9e19c63ee084", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\"", + "ETag" : "\"AUILV1lUA5w8xtvvwzSkDVkibe7\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTY=;sn=355916", - "x-ms-request-id" : "af50b9c5-748a-4d30-96f8-82e5dbafb9eb", - "Body" : "{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "f6efcf61-6a26-4e4e-b203-f57edf2eae44", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTQ=;sn=363994", + "x-ms-request-id" : "cf0129ac-cab7-4e3f-9412-9e19c63ee084", + "Body" : "{\"etag\":\"AUILV1lUA5w8xtvvwzSkDVkibe7\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "5af80f62-af3a-466f-9c5c-580d1a568220", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "48c9d25a-58c2-4e5c-a392-7dfd7a3b75d5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2f45673f-9282-4a15-b872-12b165bc45bb", + "x-ms-correlation-request-id" : "a274c09a-8a41-4f70-9c7f-a5b69f5912c8", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"fnDLu9m9abKhRRpj5exGHghyNT2\"", + "ETag" : "\"9CHbLViV2PGkrcWgwetAS02mbh4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTc=;sn=355917", - "x-ms-request-id" : "2f45673f-9282-4a15-b872-12b165bc45bb", - "Body" : "{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "3a66dc81-48f5-49d6-8120-cab67ec994ad", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTU=;sn=363995", + "x-ms-request-id" : "a274c09a-8a41-4f70-9c7f-a5b69f5912c8", + "Body" : "{\"etag\":\"9CHbLViV2PGkrcWgwetAS02mbh4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "48c9d25a-58c2-4e5c-a392-7dfd7a3b75d5", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8de2c2e8-39a3-417c-8209-40d3f255c881", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "19b3197a-c6ba-4e22-8bc7-00a7312f426a", + "x-ms-correlation-request-id" : "cf55cace-3a75-42e8-bd40-c8c04807ecb9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lZJMSpLWpxr8fDMPv5MTslfH3es\"", + "ETag" : "\"cKs4EY4Mz3JBe0XVef2FaNLTkMf\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTg=;sn=355918", - "x-ms-request-id" : "19b3197a-c6ba-4e22-8bc7-00a7312f426a", - "Body" : "{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "7fa7acef-f262-4868-9a82-0b0508f2acad", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTY=;sn=363996", + "x-ms-request-id" : "cf55cace-3a75-42e8-bd40-c8c04807ecb9", + "Body" : "{\"etag\":\"cKs4EY4Mz3JBe0XVef2FaNLTkMf\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "8de2c2e8-39a3-417c-8209-40d3f255c881", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a78ddcb1-6267-4bf6-baf4-3b3970437238", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "46f02fb7-4cc6-4a65-982a-9de3ded6fbab", + "x-ms-correlation-request-id" : "a51265c4-ae10-48a8-9be2-1453a5e00483", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"KbRgqrExC3HwExbGiEURez7MCe7\"", + "ETag" : "\"MQpWowbQ4hpXKpSoW7KmsMldd3t\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTk=;sn=355919", - "x-ms-request-id" : "46f02fb7-4cc6-4a65-982a-9de3ded6fbab", - "Body" : "{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "d83c2ae0-419f-43e5-bffa-4c924ca11965", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTc=;sn=363997", + "x-ms-request-id" : "a51265c4-ae10-48a8-9be2-1453a5e00483", + "Body" : "{\"etag\":\"MQpWowbQ4hpXKpSoW7KmsMldd3t\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "a78ddcb1-6267-4bf6-baf4-3b3970437238", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "90f87cc1-3d43-4931-b046-93b809ffc9b4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "cb11df65-b755-4c3a-94bb-c70c343374ec", + "x-ms-correlation-request-id" : "0531dd43-7799-4f6d-bc55-8bd9e0377ae9", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SKQfsxODWRLzlc9W71gm9KlymaQ\"", + "ETag" : "\"chGQy4kTV5B76SCGFoXxjCQYx4i\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjA=;sn=355920", - "x-ms-request-id" : "cb11df65-b755-4c3a-94bb-c70c343374ec", - "Body" : "{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", - "x-ms-client-request-id" : "196078e0-61a2-458f-84df-2bb154b19bfa", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTg=;sn=363998", + "x-ms-request-id" : "0531dd43-7799-4f6d-bc55-8bd9e0377ae9", + "Body" : "{\"etag\":\"chGQy4kTV5B76SCGFoXxjCQYx4i\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "90f87cc1-3d43-4931-b046-93b809ffc9b4", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1b56d994-cc88-4a7e-b52d-d41b8eab4e06", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:47 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "96d9e214-32a1-4849-98d8-17c4bac4e827", + "x-ms-correlation-request-id" : "21e8f0fd-2fc1-4a49-b41b-828bf6a4b764", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"mwq67iQg4n3SJNxi2N84nLHVAjp\"", + "ETag" : "\"nhPXeBD1T7atDfflHiv4QscgLgp\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjE=;sn=355921", - "x-ms-request-id" : "96d9e214-32a1-4849-98d8-17c4bac4e827", - "Body" : "{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", - "x-ms-client-request-id" : "a6040bee-0015-4422-b9ce-3645b17a0ada", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5OTk=;sn=363999", + "x-ms-request-id" : "21e8f0fd-2fc1-4a49-b41b-828bf6a4b764", + "Body" : "{\"etag\":\"nhPXeBD1T7atDfflHiv4QscgLgp\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"}", + "x-ms-client-request-id" : "1b56d994-cc88-4a7e-b52d-d41b8eab4e06", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "74e91d8e-3080-45f8-9d38-b88793207ddc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:49 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "91960e5d-948a-4d19-ad07-76a3980416cc", + "x-ms-correlation-request-id" : "977733a5-2cd4-4ec5-bc9d-598a8e3dc18c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"TpKeD6knT84Bs1w9jurOrBpdSIV\"", + "ETag" : "\"AfG5GZ05MNlyUkgWD5UQr840mT4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjI=;sn=355922", - "x-ms-request-id" : "91960e5d-948a-4d19-ad07-76a3980416cc", - "Body" : "{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", - "x-ms-client-request-id" : "cda1f520-288e-4356-8e65-97fc3b2543d9", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDA=;sn=364000", + "x-ms-request-id" : "977733a5-2cd4-4ec5-bc9d-598a8e3dc18c", + "Body" : "{\"etag\":\"AfG5GZ05MNlyUkgWD5UQr840mT4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"}", + "x-ms-client-request-id" : "74e91d8e-3080-45f8-9d38-b88793207ddc", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1518aa04-0dce-440b-a5a4-e97f53f9853f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "63b39d90-8ad5-41ae-9417-6505154c8a9a", + "x-ms-correlation-request-id" : "7a086ca5-b77e-48b4-bcfd-c77b42a2cd4b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"sOK6GPuWPLaVj9h4PWvdIADBa7E\"", + "ETag" : "\"XgsIqdL7vFtl1JALK2wE9ggbDxX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", - "x-ms-request-id" : "63b39d90-8ad5-41ae-9417-6505154c8a9a", - "Body" : "{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", - "x-ms-client-request-id" : "28cf2fda-caf5-44e5-b51e-87cbcc710b31", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDE=;sn=364001", + "x-ms-request-id" : "7a086ca5-b77e-48b4-bcfd-c77b42a2cd4b", + "Body" : "{\"etag\":\"XgsIqdL7vFtl1JALK2wE9ggbDxX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"}", + "x-ms-client-request-id" : "1518aa04-0dce-440b-a5a4-e97f53f9853f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key74257&label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key22357&label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d69a7139-7437-4590-9f80-6eb7ebc26e96", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "8ac01a41-9074-4714-87b7-56a4ab749e11", + "x-ms-correlation-request-id" : "fabbbc71-4140-411d-ad01-0bc6d044869c", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", - "x-ms-request-id" : "8ac01a41-9074-4714-87b7-56a4ab749e11", - "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}]}", - "x-ms-client-request-id" : "8b6367f4-d5d5-44fc-88ba-2373a3ffc68c", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDE=;sn=364001", + "x-ms-request-id" : "fabbbc71-4140-411d-ad01-0bc6d044869c", + "Body" : "{\"items\":[{\"etag\":\"XgsIqdL7vFtl1JALK2wE9ggbDxX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"},{\"etag\":\"AfG5GZ05MNlyUkgWD5UQr840mT4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"},{\"etag\":\"nhPXeBD1T7atDfflHiv4QscgLgp\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"chGQy4kTV5B76SCGFoXxjCQYx4i\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"MQpWowbQ4hpXKpSoW7KmsMldd3t\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"cKs4EY4Mz3JBe0XVef2FaNLTkMf\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"9CHbLViV2PGkrcWgwetAS02mbh4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"AUILV1lUA5w8xtvvwzSkDVkibe7\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"KWyHFwL3M7ccq2DTd1vOL5AKCvq\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"RZfSJkksejp0X0VHqH4tXAs1lnn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"V3rHEDVzQ95rkR7hDy8XprNrzLS\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"hkWetLTCNq9Ux6fRNuKh8WVCRZo\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"MI3WvwIgo5Kn5fyswTYiP8z7cMY\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"u7jTzhSwirxuShhShNfiY7jZViD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"5uW6tG2brO0adPKkdJ6aXt2UjzD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"CBpyRawkdMZZ2crjpPj8DY1GENU\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"GttWGk53sOYSY4PJ43iCN0EpDcb\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"0BqAPR3B0jkgYpu1DppTkBlBZ7F\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"g9Fp8KFJoT0tWPPoc4RshHEjVxr\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"v90gPjlDl6QcQRThbYvKaxqYcA2\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"Jd5Cf4rhnBzyGMqjiGDvEX0XfXA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"blKUY8gaJeb2n7B72mo2ohcvjyZ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"M7aBDTWGiHN27cBQ3PXzSYeIKrJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"7z1xydRFgw1r9Bh2tFxXMwXCh1A\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"EYyMjwvtxUqLiju3HSl96qFWuxQ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"YvGmoOpCyEPNnTxOIF5GG8zDTnA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"kLmrQxfMZc1YSkgHJhVHmSMqKl4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"aINSq9VZ1PdG64ubfrXU6zeIDeL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"58cCWpwQSWBfB7ahKC7wDLXodlP\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"69wU9q5fNDqd1JRfqvV3SvPAEDn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Q8p7dAYcgyOmQutc3OPlz1r6nny\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Yc91aTDZL7QGCYx1yTMMCSSg7K6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"gs8iQuVm1zmUahILpZPXq1iweWk\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"L1NGDQoJQiFX8Q44XBQxj7SveUj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"aloVx8HTkG3JdJ33lSB4EXW4FeB\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Dmbo1hxuaWXRs5DPItMyQOl0fcj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"iYFg2PMlmrL98sgrSzwEXQtblHR\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"gKHvJVlVCCTll1sH28032Q3UFQJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"6FeYxoi7q1bJem6wOKDpJdx2iC9\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"pbJXQ83ulyK5ygXWxX0WKD77WGu\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"voJCHc4vcU4v35O2Uuf5Kiea9S6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"0yMSC7Dgx2vDDMcKr2OA3jr5nqA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"BMCEIbdqotTgWjrWNMXFzLkAMcK\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"R3z6ktBJhWJ6o8flnmkK84I15O3\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"uxAy7Kir57cQkZ2VIJgw3VkC2Br\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"tq7vcx1dA0aveMiiB0erBP8p6zc\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"HZfCIyy8nuUKi3XBnLtTeTRgM2S\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"qlt5dv1mwvKMaaL4EJZmYXnK4eL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"QvPN3p87MEvTdpA1a29thw1X1IX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"ZBMDstnwHSKslbKMi0XmcYDrdQH\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}]}", + "x-ms-client-request-id" : "d69a7139-7437-4590-9f80-6eb7ebc26e96", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key74257&label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key22357&label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0 azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "be2cb41c-8149-4289-b82b-b6406971e1c6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "eea14767-af9a-4d00-80f7-6aff532ebcf6", + "x-ms-correlation-request-id" : "d8f09a7b-afb8-48a6-8e54-155aa52cfb5d", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", - "x-ms-request-id" : "eea14767-af9a-4d00-80f7-6aff532ebcf6", - "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}]}", - "x-ms-client-request-id" : "8b6367f4-d5d5-44fc-88ba-2373a3ffc68c", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDE=;sn=364001", + "x-ms-request-id" : "d8f09a7b-afb8-48a6-8e54-155aa52cfb5d", + "Body" : "{\"items\":[{\"etag\":\"XgsIqdL7vFtl1JALK2wE9ggbDxX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"},{\"etag\":\"AfG5GZ05MNlyUkgWD5UQr840mT4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"},{\"etag\":\"nhPXeBD1T7atDfflHiv4QscgLgp\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"chGQy4kTV5B76SCGFoXxjCQYx4i\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"MQpWowbQ4hpXKpSoW7KmsMldd3t\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"cKs4EY4Mz3JBe0XVef2FaNLTkMf\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"9CHbLViV2PGkrcWgwetAS02mbh4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"AUILV1lUA5w8xtvvwzSkDVkibe7\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"KWyHFwL3M7ccq2DTd1vOL5AKCvq\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:48+00:00\"},{\"etag\":\"RZfSJkksejp0X0VHqH4tXAs1lnn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"V3rHEDVzQ95rkR7hDy8XprNrzLS\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"hkWetLTCNq9Ux6fRNuKh8WVCRZo\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"MI3WvwIgo5Kn5fyswTYiP8z7cMY\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"u7jTzhSwirxuShhShNfiY7jZViD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"5uW6tG2brO0adPKkdJ6aXt2UjzD\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"CBpyRawkdMZZ2crjpPj8DY1GENU\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"GttWGk53sOYSY4PJ43iCN0EpDcb\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"0BqAPR3B0jkgYpu1DppTkBlBZ7F\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"g9Fp8KFJoT0tWPPoc4RshHEjVxr\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"v90gPjlDl6QcQRThbYvKaxqYcA2\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"Jd5Cf4rhnBzyGMqjiGDvEX0XfXA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"blKUY8gaJeb2n7B72mo2ohcvjyZ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:46+00:00\"},{\"etag\":\"M7aBDTWGiHN27cBQ3PXzSYeIKrJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"7z1xydRFgw1r9Bh2tFxXMwXCh1A\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"EYyMjwvtxUqLiju3HSl96qFWuxQ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"YvGmoOpCyEPNnTxOIF5GG8zDTnA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"kLmrQxfMZc1YSkgHJhVHmSMqKl4\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"aINSq9VZ1PdG64ubfrXU6zeIDeL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"58cCWpwQSWBfB7ahKC7wDLXodlP\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"69wU9q5fNDqd1JRfqvV3SvPAEDn\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Q8p7dAYcgyOmQutc3OPlz1r6nny\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Yc91aTDZL7QGCYx1yTMMCSSg7K6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"gs8iQuVm1zmUahILpZPXq1iweWk\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"L1NGDQoJQiFX8Q44XBQxj7SveUj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"aloVx8HTkG3JdJ33lSB4EXW4FeB\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"Dmbo1hxuaWXRs5DPItMyQOl0fcj\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"iYFg2PMlmrL98sgrSzwEXQtblHR\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"gKHvJVlVCCTll1sH28032Q3UFQJ\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"6FeYxoi7q1bJem6wOKDpJdx2iC9\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"pbJXQ83ulyK5ygXWxX0WKD77WGu\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"voJCHc4vcU4v35O2Uuf5Kiea9S6\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"0yMSC7Dgx2vDDMcKr2OA3jr5nqA\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"BMCEIbdqotTgWjrWNMXFzLkAMcK\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"R3z6ktBJhWJ6o8flnmkK84I15O3\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"uxAy7Kir57cQkZ2VIJgw3VkC2Br\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"tq7vcx1dA0aveMiiB0erBP8p6zc\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"HZfCIyy8nuUKi3XBnLtTeTRgM2S\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"qlt5dv1mwvKMaaL4EJZmYXnK4eL\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"QvPN3p87MEvTdpA1a29thw1X1IX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"},{\"etag\":\"ZBMDstnwHSKslbKMi0XmcYDrdQH\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:45+00:00\"}]}", + "x-ms-client-request-id" : "be2cb41c-8149-4289-b82b-b6406971e1c6", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv?key=key74257%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key22357%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0f4237f0-f67a-4b64-98bc-f972789d87da", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "de75e1a4-ae87-4378-b918-9fd96371c419", + "x-ms-correlation-request-id" : "b78616fe-a80a-40c0-9854-db609d253ee6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", - "x-ms-request-id" : "de75e1a4-ae87-4378-b918-9fd96371c419", - "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}]}", - "x-ms-client-request-id" : "9a7fbd1e-0aad-46c7-8075-03123c09323a", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDE=;sn=364001", + "x-ms-request-id" : "b78616fe-a80a-40c0-9854-db609d253ee6", + "Body" : "{\"items\":[{\"etag\":\"XgsIqdL7vFtl1JALK2wE9ggbDxX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"}]}", + "x-ms-client-request-id" : "0f4237f0-f67a-4b64-98bc-f972789d87da", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key22357?label=5b723ea0", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6d85b523-e849-4e04-a294-fb699aaf108c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:50 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "485ac8fa-749a-4197-8572-bac152a72d87", + "x-ms-correlation-request-id" : "d3232117-ca80-4851-b919-b3cbd8dc3803", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"sOK6GPuWPLaVj9h4PWvdIADBa7E\"", + "ETag" : "\"XgsIqdL7vFtl1JALK2wE9ggbDxX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjQ=;sn=355924", - "x-ms-request-id" : "485ac8fa-749a-4197-8572-bac152a72d87", - "Body" : "{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", - "x-ms-client-request-id" : "374e79d5-8a47-4104-9479-014ee085da6b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDI=;sn=364002", + "x-ms-request-id" : "d3232117-ca80-4851-b919-b3cbd8dc3803", + "Body" : "{\"etag\":\"XgsIqdL7vFtl1JALK2wE9ggbDxX\",\"key\":\"key22357\",\"label\":\"5b723ea0\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:50+00:00\"}", + "x-ms-client-request-id" : "6d85b523-e849-4e04-a294-fb699aaf108c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null } ], - "variables" : [ "key74257", "badac284" ] + "variables" : [ "key22357", "5b723ea0" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json index 0bb6063c5eac..00a1fd7c0b37 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json @@ -1,1566 +1,1674 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ef79e98e-e4ad-4b3a-83ed-6346fe6c47e7", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a4f034dc-dfa5-4c15-8895-1e8d57755b42", + "x-ms-correlation-request-id" : "6d36ec84-e5bb-4b94-8b43-ca56bb2fb210", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jNiyP7Q77USDs4C4RBL5k0z2gc0\"", + "ETag" : "\"64l1kkXK2luIcofyV62S8gUvvxZ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjU=;sn=355925", - "x-ms-request-id" : "a4f034dc-dfa5-4c15-8895-1e8d57755b42", - "Body" : "{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}", - "x-ms-client-request-id" : "6ddf46d2-bfb5-4604-afba-7d1983f04c5a", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTM=;sn=363893", + "x-ms-request-id" : "6d36ec84-e5bb-4b94-8b43-ca56bb2fb210", + "Body" : "{\"etag\":\"64l1kkXK2luIcofyV62S8gUvvxZ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "ef79e98e-e4ad-4b3a-83ed-6346fe6c47e7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1e8907da-bc5d-4e22-9eda-60a099711739", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "cdd073c2-6ca5-400d-a176-e7eb3d914d91", + "x-ms-correlation-request-id" : "9fda2ced-b991-4d15-b3a0-95f3161c1f83", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\"", + "ETag" : "\"KHUg1qU8uoF0Kkvk16Dx75QSfHw\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjY=;sn=355926", - "x-ms-request-id" : "cdd073c2-6ca5-400d-a176-e7eb3d914d91", - "Body" : "{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "e1778f9c-0570-4916-ac88-90e56221741f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTQ=;sn=363894", + "x-ms-request-id" : "9fda2ced-b991-4d15-b3a0-95f3161c1f83", + "Body" : "{\"etag\":\"KHUg1qU8uoF0Kkvk16Dx75QSfHw\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "1e8907da-bc5d-4e22-9eda-60a099711739", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fbd2b9f9-ff74-4cb2-8959-a709acf7d975", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9e679bcd-68bf-4de0-82cc-81bdb2f71eef", + "x-ms-correlation-request-id" : "f5cde40e-9327-4366-9102-736a181391a2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XCDiu4RIimqAHyMjgaPElT7LAB7\"", + "ETag" : "\"WvDrP87mIrXw0N0V2DBtyzl2tV1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjc=;sn=355927", - "x-ms-request-id" : "9e679bcd-68bf-4de0-82cc-81bdb2f71eef", - "Body" : "{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "380f0144-af69-4bb3-bf65-4cecbc2d14ed", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTU=;sn=363895", + "x-ms-request-id" : "f5cde40e-9327-4366-9102-736a181391a2", + "Body" : "{\"etag\":\"WvDrP87mIrXw0N0V2DBtyzl2tV1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "fbd2b9f9-ff74-4cb2-8959-a709acf7d975", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b3e8eda0-a0bf-461c-9dcd-b1d3b3685195", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2c70ebc5-4198-4bb3-8bf2-ec8961b1f676", + "x-ms-correlation-request-id" : "a1d8026d-a161-4395-b0cf-976f12c1d20e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"I3waB2sqcjR0lolm4oPGGVQf2UN\"", + "ETag" : "\"X5YZ4dr2wfpmOmwF9ix8YFhrI3u\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjg=;sn=355928", - "x-ms-request-id" : "2c70ebc5-4198-4bb3-8bf2-ec8961b1f676", - "Body" : "{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "9bd90a9d-0a84-49f2-8157-dce79d181425", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTY=;sn=363896", + "x-ms-request-id" : "a1d8026d-a161-4395-b0cf-976f12c1d20e", + "Body" : "{\"etag\":\"X5YZ4dr2wfpmOmwF9ix8YFhrI3u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "b3e8eda0-a0bf-461c-9dcd-b1d3b3685195", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fc7adcb7-fa16-4eb2-b748-18c3ddfcbd03", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c537ba3c-7a18-493b-a03c-2c7c30be0701", + "x-ms-correlation-request-id" : "077c108d-b258-43db-8050-0d068f644c7d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"k3xWQWwFob9U0iekEexrOsvQNdS\"", + "ETag" : "\"xi7SMb33bd10ewkEogSHYZmXoYg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjk=;sn=355929", - "x-ms-request-id" : "c537ba3c-7a18-493b-a03c-2c7c30be0701", - "Body" : "{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "b65e35d2-e068-4694-b88b-db3387f3e067", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTc=;sn=363897", + "x-ms-request-id" : "077c108d-b258-43db-8050-0d068f644c7d", + "Body" : "{\"etag\":\"xi7SMb33bd10ewkEogSHYZmXoYg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "fc7adcb7-fa16-4eb2-b748-18c3ddfcbd03", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2bcb4899-4e38-463f-a22c-ed2caec199b7", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d65b98cf-3204-4ddd-9d75-32d58fffe292", + "x-ms-correlation-request-id" : "1bc3988e-ec93-40d5-9f26-ec55b2cb9f88", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"noNDOjplAcflJhlW0rxP8C59HxC\"", + "ETag" : "\"Cgb7X321F7xXBd1hiBni15EsVTq\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzA=;sn=355930", - "x-ms-request-id" : "d65b98cf-3204-4ddd-9d75-32d58fffe292", - "Body" : "{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "5b77389e-113f-441d-b642-c2a0a0d00599", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTg=;sn=363898", + "x-ms-request-id" : "1bc3988e-ec93-40d5-9f26-ec55b2cb9f88", + "Body" : "{\"etag\":\"Cgb7X321F7xXBd1hiBni15EsVTq\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "2bcb4899-4e38-463f-a22c-ed2caec199b7", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "059c18d1-a346-4af7-a58e-f2a215e2ff3f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e6b714fb-a41b-4923-92a9-d1480c4772bf", + "x-ms-correlation-request-id" : "823c5283-878d-4683-844e-e28a52b36f30", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"PvQgsbCoKItfkYjdSehNSGefBCw\"", + "ETag" : "\"UEJDqdfD24Vbo3LY2iQbL8ZCk97\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzE=;sn=355931", - "x-ms-request-id" : "e6b714fb-a41b-4923-92a9-d1480c4772bf", - "Body" : "{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "a2fadaf5-19d3-45fd-b0a3-4147ad342f0d", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTk=;sn=363899", + "x-ms-request-id" : "823c5283-878d-4683-844e-e28a52b36f30", + "Body" : "{\"etag\":\"UEJDqdfD24Vbo3LY2iQbL8ZCk97\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "059c18d1-a346-4af7-a58e-f2a215e2ff3f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "10398698-eea1-4603-a79f-6c0d3a15ada9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "112815b4-cced-4d38-b920-3e8b9daa54a2", + "x-ms-correlation-request-id" : "97b8c104-ab7c-44f4-b431-eaa0ff15e223", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"lCr5xrN9rShZSx7NEEwlKU5dEjN\"", + "ETag" : "\"bcUwbYfiamnEDEBjJRttNGkGiux\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzI=;sn=355932", - "x-ms-request-id" : "112815b4-cced-4d38-b920-3e8b9daa54a2", - "Body" : "{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "59e9d54e-51a6-424e-b948-0706d47382dc", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDA=;sn=363900", + "x-ms-request-id" : "97b8c104-ab7c-44f4-b431-eaa0ff15e223", + "Body" : "{\"etag\":\"bcUwbYfiamnEDEBjJRttNGkGiux\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "10398698-eea1-4603-a79f-6c0d3a15ada9", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b4cb4a17-4671-4bee-944b-8c1c4fbf5915", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "a5dafbf5-54bb-4634-86fe-3910cf52b957", + "x-ms-correlation-request-id" : "6197d9d8-da6a-43f9-acaa-d56aa6bf5950", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"fUT8brix0evbfPrVlOPegoO1msD\"", + "ETag" : "\"S6nQYeeArhTKVPgPJjxErpMIdk8\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzM=;sn=355933", - "x-ms-request-id" : "a5dafbf5-54bb-4634-86fe-3910cf52b957", - "Body" : "{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "96292ddc-22fe-4dd1-80a8-833631335ade", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDE=;sn=363901", + "x-ms-request-id" : "6197d9d8-da6a-43f9-acaa-d56aa6bf5950", + "Body" : "{\"etag\":\"S6nQYeeArhTKVPgPJjxErpMIdk8\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "b4cb4a17-4671-4bee-944b-8c1c4fbf5915", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "353c010d-3526-4f6d-b849-e946d10d34fb", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "334e2859-ae74-493a-8883-d95ab3ea2fcf", + "x-ms-correlation-request-id" : "8fbc675d-8370-42ca-a05a-5dd68a27884d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\"", + "ETag" : "\"xaBNY59d5a7tol4wBa1eIKjQhCX\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzQ=;sn=355934", - "x-ms-request-id" : "334e2859-ae74-493a-8883-d95ab3ea2fcf", - "Body" : "{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "db3d4b2d-4c59-4c63-a8a0-e0a41ecf2c6b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDI=;sn=363902", + "x-ms-request-id" : "8fbc675d-8370-42ca-a05a-5dd68a27884d", + "Body" : "{\"etag\":\"xaBNY59d5a7tol4wBa1eIKjQhCX\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "353c010d-3526-4f6d-b849-e946d10d34fb", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "19a9ded1-68d8-49eb-b179-018f53b190fe", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c6da7221-0893-453d-bafd-1ac2fc526dbb", + "x-ms-correlation-request-id" : "24654507-dc24-40a1-b2f1-32c9eee61157", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\"", + "ETag" : "\"ukSzfcRPgcTDXIpXTi8XdkeUl5H\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzU=;sn=355935", - "x-ms-request-id" : "c6da7221-0893-453d-bafd-1ac2fc526dbb", - "Body" : "{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "8d3e433c-ad2f-45d4-ba75-21b9987f7797", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDM=;sn=363903", + "x-ms-request-id" : "24654507-dc24-40a1-b2f1-32c9eee61157", + "Body" : "{\"etag\":\"ukSzfcRPgcTDXIpXTi8XdkeUl5H\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "19a9ded1-68d8-49eb-b179-018f53b190fe", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2a11c1eb-9700-4fc0-9bc6-78202300f36f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2e886634-4c57-4c2c-8e31-bbf82a77d47b", + "x-ms-correlation-request-id" : "35471db1-dd14-4719-9458-2413181694af", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"GhklfKlQ6puZhqTH3M2dhfeOf78\"", + "ETag" : "\"wO8idPTjwNQbwu07531IxtGREEC\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzY=;sn=355936", - "x-ms-request-id" : "2e886634-4c57-4c2c-8e31-bbf82a77d47b", - "Body" : "{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "9d68d0f7-98ca-4244-9898-2737ec455385", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDQ=;sn=363904", + "x-ms-request-id" : "35471db1-dd14-4719-9458-2413181694af", + "Body" : "{\"etag\":\"wO8idPTjwNQbwu07531IxtGREEC\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "2a11c1eb-9700-4fc0-9bc6-78202300f36f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "068b1b66-427c-4965-a3c2-c3843c9b4f54", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c109141a-d9c0-478b-9d08-1026e216275b", + "x-ms-correlation-request-id" : "6700e39d-6a46-423b-9332-b275bd15042b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"AQssSuVEmEAOPORA8SNAx56WEA4\"", + "ETag" : "\"ftABEuwBN0bk046nSxcBrU5mU1a\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzc=;sn=355937", - "x-ms-request-id" : "c109141a-d9c0-478b-9d08-1026e216275b", - "Body" : "{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "5d75bc25-b415-402f-a65b-78226278b879", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDU=;sn=363905", + "x-ms-request-id" : "6700e39d-6a46-423b-9332-b275bd15042b", + "Body" : "{\"etag\":\"ftABEuwBN0bk046nSxcBrU5mU1a\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "068b1b66-427c-4965-a3c2-c3843c9b4f54", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "eb33b576-8958-47e6-ae75-b37796620a9d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c6b711b8-6003-426c-8e29-cfcefc507143", + "x-ms-correlation-request-id" : "c461dfc9-12ed-451e-ab13-2b7432c7d1da", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"Dqo1l1JkizHLTvs7GkjJPChvun9\"", + "ETag" : "\"YCAOHr56dBlurjfrW753bcCQfMI\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzg=;sn=355938", - "x-ms-request-id" : "c6b711b8-6003-426c-8e29-cfcefc507143", - "Body" : "{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "272dcb27-b52e-490d-b4e3-eae0b1eacb56", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDY=;sn=363906", + "x-ms-request-id" : "c461dfc9-12ed-451e-ab13-2b7432c7d1da", + "Body" : "{\"etag\":\"YCAOHr56dBlurjfrW753bcCQfMI\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "eb33b576-8958-47e6-ae75-b37796620a9d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d9f68fa8-1f69-4d9b-8ef7-ac86c0cfa002", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "353c85d1-3cc2-47c2-ab42-325a27292792", + "x-ms-correlation-request-id" : "5ac2478b-5315-4e7d-b218-59695c7d9c8f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YRDxr675Cakmv1WBpdzzpTpQ8BP\"", + "ETag" : "\"13NQMyEUr7pP6eIikme1ovDR91B\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzk=;sn=355939", - "x-ms-request-id" : "353c85d1-3cc2-47c2-ab42-325a27292792", - "Body" : "{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "aba7630e-1111-4578-9e1c-93394eb04798", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDc=;sn=363907", + "x-ms-request-id" : "5ac2478b-5315-4e7d-b218-59695c7d9c8f", + "Body" : "{\"etag\":\"13NQMyEUr7pP6eIikme1ovDR91B\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "d9f68fa8-1f69-4d9b-8ef7-ac86c0cfa002", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "509383f4-9c79-4c12-a32f-c33d7057a958", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d3e0137b-f409-4789-a038-4496b83e1670", + "x-ms-correlation-request-id" : "b4b5dfba-93ae-4d5e-bd89-4636cd68080b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"uP49wa2rA8KSMoe4ne7z9ozL4bn\"", + "ETag" : "\"sqqfGhktYsjuKBHPnmK8MvRGfBm\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDA=;sn=355940", - "x-ms-request-id" : "d3e0137b-f409-4789-a038-4496b83e1670", - "Body" : "{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "904405e5-6e42-4066-b5da-7ec7ebf0c74b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDg=;sn=363908", + "x-ms-request-id" : "b4b5dfba-93ae-4d5e-bd89-4636cd68080b", + "Body" : "{\"etag\":\"sqqfGhktYsjuKBHPnmK8MvRGfBm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "509383f4-9c79-4c12-a32f-c33d7057a958", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "60dadce5-4c98-4ee9-8fff-8c58305b7b33", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "347ef176-4466-4666-9d72-c1efeea7a8cc", + "x-ms-correlation-request-id" : "1b80ead3-513b-4240-af01-93c0bce3283b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\"", + "ETag" : "\"MvHoAaB6rWcAIDnDRRK1tvxmSFt\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDE=;sn=355941", - "x-ms-request-id" : "347ef176-4466-4666-9d72-c1efeea7a8cc", - "Body" : "{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "65904f6c-bdda-404c-8195-b077116de50b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MDk=;sn=363909", + "x-ms-request-id" : "1b80ead3-513b-4240-af01-93c0bce3283b", + "Body" : "{\"etag\":\"MvHoAaB6rWcAIDnDRRK1tvxmSFt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "60dadce5-4c98-4ee9-8fff-8c58305b7b33", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8850b983-7ecd-4ad3-ae55-e1c53f8eb866", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "4c602770-0a21-44a3-b24d-2b90e9a96e39", + "x-ms-correlation-request-id" : "a84974c8-7efd-4279-aa0c-09b839aeefd1", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\"", + "ETag" : "\"VeszSbQVlEZKDDxDQecTWx9v4Jt\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDI=;sn=355942", - "x-ms-request-id" : "4c602770-0a21-44a3-b24d-2b90e9a96e39", - "Body" : "{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "5bfdd0df-4f44-4e53-bb4e-88524884659e", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTA=;sn=363910", + "x-ms-request-id" : "a84974c8-7efd-4279-aa0c-09b839aeefd1", + "Body" : "{\"etag\":\"VeszSbQVlEZKDDxDQecTWx9v4Jt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "8850b983-7ecd-4ad3-ae55-e1c53f8eb866", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e7efee61-84ea-4d67-b10c-b30eaa9d9886", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "141d5539-2848-44d7-bbd6-1985c0d6dd8c", + "x-ms-correlation-request-id" : "c5648666-5d05-4ea1-aeef-84e23ecc065f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"upZrsv8iYzydWqYje7jHm9rHcXL\"", + "ETag" : "\"ankKrW0VWqzrdUnG4GILiVnmOmg\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDM=;sn=355943", - "x-ms-request-id" : "141d5539-2848-44d7-bbd6-1985c0d6dd8c", - "Body" : "{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "fb8fa450-4f23-4516-b231-51ec511a3357", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTE=;sn=363911", + "x-ms-request-id" : "c5648666-5d05-4ea1-aeef-84e23ecc065f", + "Body" : "{\"etag\":\"ankKrW0VWqzrdUnG4GILiVnmOmg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "e7efee61-84ea-4d67-b10c-b30eaa9d9886", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6bd2b5ff-c601-45be-a662-3c30fc39344b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d0ccbba1-d154-483c-b02b-f092ed1d4fee", + "x-ms-correlation-request-id" : "43a91e1f-28f2-4687-8e11-c26bc3ac2f2a", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"mwynFY1i5xgbBDjQCoMyG2tJJyn\"", + "ETag" : "\"nrOZVjGaqMIhMBRXg8XaYVPG1Ay\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDQ=;sn=355944", - "x-ms-request-id" : "d0ccbba1-d154-483c-b02b-f092ed1d4fee", - "Body" : "{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "64e1f930-5beb-490f-a57d-250d7ec325b8", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTI=;sn=363912", + "x-ms-request-id" : "43a91e1f-28f2-4687-8e11-c26bc3ac2f2a", + "Body" : "{\"etag\":\"nrOZVjGaqMIhMBRXg8XaYVPG1Ay\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "6bd2b5ff-c601-45be-a662-3c30fc39344b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4b92fee-3369-4e8e-8b4b-7d14bcc9cff2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7fb3486e-2908-4339-b236-e322fc8fc07c", + "x-ms-correlation-request-id" : "6f7745e6-8b13-4a23-a35f-f0fffcd97a3c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\"", + "ETag" : "\"3HPD8OzpTL3lTs4XhWu2UePfyJy\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDU=;sn=355945", - "x-ms-request-id" : "7fb3486e-2908-4339-b236-e322fc8fc07c", - "Body" : "{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", - "x-ms-client-request-id" : "9cbe13b0-be74-43e9-af15-407a930daa02", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTM=;sn=363913", + "x-ms-request-id" : "6f7745e6-8b13-4a23-a35f-f0fffcd97a3c", + "Body" : "{\"etag\":\"3HPD8OzpTL3lTs4XhWu2UePfyJy\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "c4b92fee-3369-4e8e-8b4b-7d14bcc9cff2", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cb2c8a42-5247-463e-b405-7a224a8f7318", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7f4ccbcf-0a07-44fb-b676-8324cc554587", + "x-ms-correlation-request-id" : "618825de-e312-4805-ab43-391ab5eac436", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"VQ34jz49f5kzGyRuhogVrUpwN7O\"", + "ETag" : "\"dNuBEBEKrl787zetQ3HNhD3Qe0u\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDY=;sn=355946", - "x-ms-request-id" : "7f4ccbcf-0a07-44fb-b676-8324cc554587", - "Body" : "{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "a1774869-a4ff-4eb8-8e9a-37947d62c12f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTQ=;sn=363914", + "x-ms-request-id" : "618825de-e312-4805-ab43-391ab5eac436", + "Body" : "{\"etag\":\"dNuBEBEKrl787zetQ3HNhD3Qe0u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "cb2c8a42-5247-463e-b405-7a224a8f7318", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f1e40a73-59d9-4644-94b9-10d81b32173f", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "5a3a1a0f-1d2a-4fa9-907d-fcd5c8af8c29", + "x-ms-correlation-request-id" : "9933c23d-b4a3-4256-9544-68946e3da04c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"nUG3aATwp4xd69HMBcX11TvIb22\"", + "ETag" : "\"LJT13V2I9WI2LAJnthr3SA9PiMa\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDc=;sn=355947", - "x-ms-request-id" : "5a3a1a0f-1d2a-4fa9-907d-fcd5c8af8c29", - "Body" : "{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "9f0652c4-50ad-43b9-8dd2-8ed3fb772d8b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTU=;sn=363915", + "x-ms-request-id" : "9933c23d-b4a3-4256-9544-68946e3da04c", + "Body" : "{\"etag\":\"LJT13V2I9WI2LAJnthr3SA9PiMa\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "f1e40a73-59d9-4644-94b9-10d81b32173f", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3b32b286-0109-4392-8db8-336f4000358b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "aa1d6058-20d5-4e61-a11a-5a466a5ec37e", + "x-ms-correlation-request-id" : "e0ec6d3e-0278-4bd3-b042-598494032988", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"YxmRHNz0UUBT99nEvq9R3xWMi41\"", + "ETag" : "\"POuYl5DXiWDpzdE5UQoFHclcVd4\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDg=;sn=355948", - "x-ms-request-id" : "aa1d6058-20d5-4e61-a11a-5a466a5ec37e", - "Body" : "{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "5798ec0b-7d8b-4352-8205-9ccdbb2ca8a4", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTY=;sn=363916", + "x-ms-request-id" : "e0ec6d3e-0278-4bd3-b042-598494032988", + "Body" : "{\"etag\":\"POuYl5DXiWDpzdE5UQoFHclcVd4\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "3b32b286-0109-4392-8db8-336f4000358b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e4f332de-6f2c-4c86-935f-000e6eb09d8c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "22bae82c-3efe-4c16-9aba-b9b504c23efe", + "x-ms-correlation-request-id" : "d8b38dda-f4a0-4d21-bedb-1af02d341223", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\"", + "ETag" : "\"d2fTjE58QrFcasF7555NOFPNjzF\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDk=;sn=355949", - "x-ms-request-id" : "22bae82c-3efe-4c16-9aba-b9b504c23efe", - "Body" : "{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "e30e13da-5d80-4582-a9d6-54298bc58005", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTc=;sn=363917", + "x-ms-request-id" : "d8b38dda-f4a0-4d21-bedb-1af02d341223", + "Body" : "{\"etag\":\"d2fTjE58QrFcasF7555NOFPNjzF\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "e4f332de-6f2c-4c86-935f-000e6eb09d8c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d410550c-0098-4839-a055-95fae82af100", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2c544de8-f45f-4afd-bd6f-9e0bdf2eadc1", + "x-ms-correlation-request-id" : "8ebdc27d-d463-4682-b461-f916115b7d1d", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"gnLsef4Juk3ekuG1L9Y5kayR4KE\"", + "ETag" : "\"ShgFBkLdljfFqu2kR35k6E5ZBWR\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTA=;sn=355950", - "x-ms-request-id" : "2c544de8-f45f-4afd-bd6f-9e0bdf2eadc1", - "Body" : "{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "601cbb5e-db9f-4081-9f3f-75c84d425d71", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTg=;sn=363918", + "x-ms-request-id" : "8ebdc27d-d463-4682-b461-f916115b7d1d", + "Body" : "{\"etag\":\"ShgFBkLdljfFqu2kR35k6E5ZBWR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "d410550c-0098-4839-a055-95fae82af100", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c6574a99-0ec5-48b9-ac07-15e59ec2d62d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "904aa2b0-3769-4b20-af59-cebe47c2d719", + "x-ms-correlation-request-id" : "e235eaab-9e3f-4311-b4f2-62fc76a27df4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"jqHhLOJHxJO2vhjNCGzE11wGD3j\"", + "ETag" : "\"qIpo36Qsc1HuuAbItGZqFEBHAbM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTE=;sn=355951", - "x-ms-request-id" : "904aa2b0-3769-4b20-af59-cebe47c2d719", - "Body" : "{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "2c61bfb1-ca29-489a-857e-571b06809d67", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MTk=;sn=363919", + "x-ms-request-id" : "e235eaab-9e3f-4311-b4f2-62fc76a27df4", + "Body" : "{\"etag\":\"qIpo36Qsc1HuuAbItGZqFEBHAbM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "c6574a99-0ec5-48b9-ac07-15e59ec2d62d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ab76f9ec-5dff-4c83-95da-f7fb2b28395a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "6bf45028-72fc-4091-8e15-7d9a793cc04d", + "x-ms-correlation-request-id" : "14add11d-176e-4d1a-aea4-7f3ce638a7b2", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ggbKmyOxgmIg5fPkUJLYo617rkU\"", + "ETag" : "\"TAA0ooCD68viE4fc9VA7584QpWQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTI=;sn=355952", - "x-ms-request-id" : "6bf45028-72fc-4091-8e15-7d9a793cc04d", - "Body" : "{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "fb959c4e-a161-4518-a49e-be1aaa2c4bdd", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjA=;sn=363920", + "x-ms-request-id" : "14add11d-176e-4d1a-aea4-7f3ce638a7b2", + "Body" : "{\"etag\":\"TAA0ooCD68viE4fc9VA7584QpWQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "ab76f9ec-5dff-4c83-95da-f7fb2b28395a", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7c6938ae-e7fa-4c44-af04-265828c6e571", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e1cf23aa-2017-4f7f-a334-00554d91beb7", + "x-ms-correlation-request-id" : "7728d47c-8834-471c-a7c1-91c42acc7c92", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\"", + "ETag" : "\"PTQj9igluEEiREhcosWEEhpCvXx\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTM=;sn=355953", - "x-ms-request-id" : "e1cf23aa-2017-4f7f-a334-00554d91beb7", - "Body" : "{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "6d6a15aa-2a8e-413e-90ba-d4ee74dac32d", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjE=;sn=363921", + "x-ms-request-id" : "7728d47c-8834-471c-a7c1-91c42acc7c92", + "Body" : "{\"etag\":\"PTQj9igluEEiREhcosWEEhpCvXx\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "7c6938ae-e7fa-4c44-af04-265828c6e571", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4d7a000a-170f-46e3-a29a-5470ec1f5bef", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "52d580a4-3bc2-4021-8763-1d1bdf7a3c21", + "x-ms-correlation-request-id" : "638692c7-897d-49ae-b3f8-a7a7ecf3adc4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"ectYS6odE2dFHrJVKvZd2XsCsNk\"", + "ETag" : "\"pdwIBFs4qPDwpaFX6arFCUlJZbD\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTQ=;sn=355954", - "x-ms-request-id" : "52d580a4-3bc2-4021-8763-1d1bdf7a3c21", - "Body" : "{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "5425dd3a-3905-4c3d-98d5-05b5b8d54b1b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjI=;sn=363922", + "x-ms-request-id" : "638692c7-897d-49ae-b3f8-a7a7ecf3adc4", + "Body" : "{\"etag\":\"pdwIBFs4qPDwpaFX6arFCUlJZbD\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "4d7a000a-170f-46e3-a29a-5470ec1f5bef", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "585f7643-9a86-4f9f-883d-53d1cd2ca7f6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "62f3ebdb-a438-43d6-bd0c-5dcf4385b164", + "x-ms-correlation-request-id" : "f87678cd-8b58-485e-8a3d-f406fab76e9e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"a3qDyWPJlP8UuySqljnkRZcWbSx\"", + "ETag" : "\"ETY9gLirujB427Jr05ZcXsU4FMu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTU=;sn=355955", - "x-ms-request-id" : "62f3ebdb-a438-43d6-bd0c-5dcf4385b164", - "Body" : "{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "ce0e3ce0-a328-4b44-bee2-8aed4960cfce", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjM=;sn=363923", + "x-ms-request-id" : "f87678cd-8b58-485e-8a3d-f406fab76e9e", + "Body" : "{\"etag\":\"ETY9gLirujB427Jr05ZcXsU4FMu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "585f7643-9a86-4f9f-883d-53d1cd2ca7f6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4640dc4-d8af-433e-b5b5-9ee8a40aa47d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c4b76ac5-0fb0-47d5-9db1-96532e50eee9", + "x-ms-correlation-request-id" : "21105c2d-2480-4144-8e4c-2dbc72b63b7e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"uvj2Gh9v4124k57JYXwYEZOntqp\"", + "ETag" : "\"BBmwovXaKdbnds4NepgiPBUUHjT\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTY=;sn=355956", - "x-ms-request-id" : "c4b76ac5-0fb0-47d5-9db1-96532e50eee9", - "Body" : "{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "955b1254-fb2f-4cf0-9f04-2cc27542beba", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjQ=;sn=363924", + "x-ms-request-id" : "21105c2d-2480-4144-8e4c-2dbc72b63b7e", + "Body" : "{\"etag\":\"BBmwovXaKdbnds4NepgiPBUUHjT\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "c4640dc4-d8af-433e-b5b5-9ee8a40aa47d", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e5b34573-6bf3-4344-828a-7f60688b5e93", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c3ff3750-cb51-46c8-8b3a-d1eccc4549d8", + "x-ms-correlation-request-id" : "bb06b461-48e2-423f-9d68-230c7919d647", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"MrM1BDpqECFyW8CdCiEfPPzz0gy\"", + "ETag" : "\"A6Ncrwv77SJGxsHmnG6MoEXzr4D\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTc=;sn=355957", - "x-ms-request-id" : "c3ff3750-cb51-46c8-8b3a-d1eccc4549d8", - "Body" : "{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "b603c55c-17f8-4ebf-b97b-12630fd29ff3", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjU=;sn=363925", + "x-ms-request-id" : "bb06b461-48e2-423f-9d68-230c7919d647", + "Body" : "{\"etag\":\"A6Ncrwv77SJGxsHmnG6MoEXzr4D\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "e5b34573-6bf3-4344-828a-7f60688b5e93", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "45cdca38-696d-4e39-a864-e0c9f5e6de55", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "04d06d36-ea0f-4622-af53-119cc09a5018", + "x-ms-correlation-request-id" : "a510a6fb-18f1-4259-9877-fbbb6c623c73", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\"", + "ETag" : "\"q2YNMF6kgCWlV4AcwvtK7RZxaqu\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTg=;sn=355958", - "x-ms-request-id" : "04d06d36-ea0f-4622-af53-119cc09a5018", - "Body" : "{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "b0334f7e-0dc7-46f1-b799-8679603b91fe", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MjY=;sn=363926", + "x-ms-request-id" : "a510a6fb-18f1-4259-9877-fbbb6c623c73", + "Body" : "{\"etag\":\"q2YNMF6kgCWlV4AcwvtK7RZxaqu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "45cdca38-696d-4e39-a864-e0c9f5e6de55", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0618d443-4cb8-4604-8f8a-2a98740266a6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "7a9b2cc9-1467-4304-a402-0e3a3c0cc7a8", + "x-ms-correlation-request-id" : "d0f655e5-4423-4f6b-98c2-5edba0be8f2c", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"P3dG0y5T3k4M1TMULVKsAuxnPNF\"", + "ETag" : "\"0C8nYdBA7LHXtvBwBE5fIjN7N9k\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTk=;sn=355959", - "x-ms-request-id" : "7a9b2cc9-1467-4304-a402-0e3a3c0cc7a8", - "Body" : "{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "f37f4b13-38fa-4e03-9274-cd67d71d0a5c", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mjc=;sn=363927", + "x-ms-request-id" : "d0f655e5-4423-4f6b-98c2-5edba0be8f2c", + "Body" : "{\"etag\":\"0C8nYdBA7LHXtvBwBE5fIjN7N9k\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "0618d443-4cb8-4604-8f8a-2a98740266a6", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "630e982d-358d-4271-97b1-ecabb3cacb92", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "12222853-c32d-4a0c-9f47-3fc1dc017482", + "x-ms-correlation-request-id" : "af3b7425-bd97-45fe-9be1-d7d0901b8a1e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"83zr6N5go4zKpPvlwKTf2uoaoxK\"", + "ETag" : "\"U6Bwr9hJPb5AsWvFuIrFwsOCbbv\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjA=;sn=355960", - "x-ms-request-id" : "12222853-c32d-4a0c-9f47-3fc1dc017482", - "Body" : "{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "2aed2ac7-d50e-4f24-8d2c-8a24098c375f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mjg=;sn=363928", + "x-ms-request-id" : "af3b7425-bd97-45fe-9be1-d7d0901b8a1e", + "Body" : "{\"etag\":\"U6Bwr9hJPb5AsWvFuIrFwsOCbbv\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "630e982d-358d-4271-97b1-ecabb3cacb92", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "aebe9f31-9f24-42c2-9f46-1e3020204b16", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "89ec33ac-966e-4517-8bac-ece0fe12164a", + "x-ms-correlation-request-id" : "01b4c385-b8a8-4461-a489-8b5cd1e640de", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"XTsdMpFVDVeJkevXl8UlwspMKqW\"", + "ETag" : "\"tFXQamTglofz7VjSgN5JE4DMQ0e\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjE=;sn=355961", - "x-ms-request-id" : "89ec33ac-966e-4517-8bac-ece0fe12164a", - "Body" : "{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "6bee6ee8-ce77-4b59-afd8-882161125b65", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mjk=;sn=363929", + "x-ms-request-id" : "01b4c385-b8a8-4461-a489-8b5cd1e640de", + "Body" : "{\"etag\":\"tFXQamTglofz7VjSgN5JE4DMQ0e\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "aebe9f31-9f24-42c2-9f46-1e3020204b16", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3258bf8c-9062-4d0b-b0d3-8de1fd1e7f28", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f17a1dde-e7ea-44a3-af2c-fc7cfd37cd76", + "x-ms-correlation-request-id" : "9672a80a-2a0b-44c8-bcf4-f885cb910012", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"SKL0U2WRmokCHZjXoAqdegKpVZH\"", + "ETag" : "\"ioV2WrOWLhgEFrsIjAj3amviutR\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjI=;sn=355962", - "x-ms-request-id" : "f17a1dde-e7ea-44a3-af2c-fc7cfd37cd76", - "Body" : "{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "a5cc28d1-9d79-4807-93e9-a969b26b5d11", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzA=;sn=363930", + "x-ms-request-id" : "9672a80a-2a0b-44c8-bcf4-f885cb910012", + "Body" : "{\"etag\":\"ioV2WrOWLhgEFrsIjAj3amviutR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "3258bf8c-9062-4d0b-b0d3-8de1fd1e7f28", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d28f1c19-1d98-4944-a7b5-1088a90856df", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ff36bac5-7acc-42c5-90ad-04b6579317cd", + "x-ms-correlation-request-id" : "3338da21-ca93-4495-a320-a791eadca30e", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"bmWEhDNsBrV1uzqbP5UgleufkJu\"", + "ETag" : "\"lfp6p2e8NzVgQENdjyJ5rsPf2wP\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjM=;sn=355963", - "x-ms-request-id" : "ff36bac5-7acc-42c5-90ad-04b6579317cd", - "Body" : "{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "03127d09-72b4-4914-bd20-261f965de54b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzE=;sn=363931", + "x-ms-request-id" : "3338da21-ca93-4495-a320-a791eadca30e", + "Body" : "{\"etag\":\"lfp6p2e8NzVgQENdjyJ5rsPf2wP\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"}", + "x-ms-client-request-id" : "d28f1c19-1d98-4944-a7b5-1088a90856df", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7f9ccd2-4ea0-4253-b6f1-e815088311ca", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:42 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:41 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d4ab9aa0-a037-4525-b5cb-41b9b0bea1f3", + "x-ms-correlation-request-id" : "7785a0a2-4924-4a9a-8d73-a36e7fd3ed98", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"QKgNZ00wWrfvkedoInI4IS7sTGB\"", + "ETag" : "\"CztcBJosCl0u01yZTTmNwHHlYwB\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjQ=;sn=355964", - "x-ms-request-id" : "d4ab9aa0-a037-4525-b5cb-41b9b0bea1f3", - "Body" : "{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "8b7aae12-7678-4299-9b84-f7d154bc9f6b", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzI=;sn=363932", + "x-ms-request-id" : "7785a0a2-4924-4a9a-8d73-a36e7fd3ed98", + "Body" : "{\"etag\":\"CztcBJosCl0u01yZTTmNwHHlYwB\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:42+00:00\"}", + "x-ms-client-request-id" : "d7f9ccd2-4ea0-4253-b6f1-e815088311ca", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e953461c-a2a2-4f54-aea0-293a074e529b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "f1edb443-44c7-4182-a2ca-888139d8b56c", + "x-ms-correlation-request-id" : "53235f5b-a89f-4fc8-890b-2bdc6fe7593f", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"TP4kXbH9tqphIfWOg7t4aaUP9V9\"", + "ETag" : "\"W03AYZ8KEQGDOsBFNzFC3UrR5YQ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjU=;sn=355965", - "x-ms-request-id" : "f1edb443-44c7-4182-a2ca-888139d8b56c", - "Body" : "{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", - "x-ms-client-request-id" : "7a867d3d-5940-40b6-94e8-32e6a30c2c69", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzM=;sn=363933", + "x-ms-request-id" : "53235f5b-a89f-4fc8-890b-2bdc6fe7593f", + "Body" : "{\"etag\":\"W03AYZ8KEQGDOsBFNzFC3UrR5YQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "e953461c-a2a2-4f54-aea0-293a074e529b", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f49a3a47-123d-4795-9b7c-a3e9e6c01247", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d6813be1-a182-4fd1-8818-5c09850cdc2b", + "x-ms-correlation-request-id" : "d4bfadf2-e1ac-4658-b870-3cce9e5e0eba", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"WtmJ27m8hLTawG2q6nsSwIM6i1n\"", + "ETag" : "\"HeR24qTGpKJH9njcGncRwUVJtu6\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjY=;sn=355966", - "x-ms-request-id" : "d6813be1-a182-4fd1-8818-5c09850cdc2b", - "Body" : "{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "22e293fb-2798-4d74-b808-1aa877b72f54", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzQ=;sn=363934", + "x-ms-request-id" : "d4bfadf2-e1ac-4658-b870-3cce9e5e0eba", + "Body" : "{\"etag\":\"HeR24qTGpKJH9njcGncRwUVJtu6\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "f49a3a47-123d-4795-9b7c-a3e9e6c01247", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a2227681-2a43-4215-a61d-dcb811a09b70", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ab6edd7f-8418-4579-ab6a-5665c58b8c75", + "x-ms-correlation-request-id" : "0729fc7b-6fb9-487f-8d2f-10c8e971b330", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"qXRaj0Fh6afaaQW92k4h6JvVhD2\"", + "ETag" : "\"R0H7nzJiNegcD3ku1aGjIi6XmvJ\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njc=;sn=355967", - "x-ms-request-id" : "ab6edd7f-8418-4579-ab6a-5665c58b8c75", - "Body" : "{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "894afe6c-a03e-4703-8ab0-135b7368fe73", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzU=;sn=363935", + "x-ms-request-id" : "0729fc7b-6fb9-487f-8d2f-10c8e971b330", + "Body" : "{\"etag\":\"R0H7nzJiNegcD3ku1aGjIi6XmvJ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "a2227681-2a43-4215-a61d-dcb811a09b70", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "07864b3c-367a-48a8-ae03-1dda670ded5c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "9372cb31-72d6-4674-9698-fde1e31d0960", + "x-ms-correlation-request-id" : "629dca91-5c4c-46e9-b7f8-d5840ba99db7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"FDGQuEodmlMSNuCjIp37tZOpVnB\"", + "ETag" : "\"IGQbSkuS7tSzzklpnvgpV8jE2i2\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njg=;sn=355968", - "x-ms-request-id" : "9372cb31-72d6-4674-9698-fde1e31d0960", - "Body" : "{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "7fb38d4e-c223-47c3-95de-a1c5f413621f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5MzY=;sn=363936", + "x-ms-request-id" : "629dca91-5c4c-46e9-b7f8-d5840ba99db7", + "Body" : "{\"etag\":\"IGQbSkuS7tSzzklpnvgpV8jE2i2\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "07864b3c-367a-48a8-ae03-1dda670ded5c", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "656c87b6-cbe7-4a96-bbfa-5b1cf6d3ae02", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c5d93d76-79ae-45ba-a146-d3a2dffef727", + "x-ms-correlation-request-id" : "48cacb39-209d-48e9-a1aa-9f260faca550", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\"", + "ETag" : "\"QinR7zb8xPHJjvzbeDLlwKwvuo1\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njk=;sn=355969", - "x-ms-request-id" : "c5d93d76-79ae-45ba-a146-d3a2dffef727", - "Body" : "{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "3e23af68-030b-476d-854e-833d2762f9d0", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mzc=;sn=363937", + "x-ms-request-id" : "48cacb39-209d-48e9-a1aa-9f260faca550", + "Body" : "{\"etag\":\"QinR7zb8xPHJjvzbeDLlwKwvuo1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "656c87b6-cbe7-4a96-bbfa-5b1cf6d3ae02", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1cd24517-fe1e-4b11-8eef-f220809f33db", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "31640901-581a-4349-bfe0-c7dd034e08eb", + "x-ms-correlation-request-id" : "8e5715c0-7ee0-4745-a5cc-aab4de24b3d4", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"BtQypwuQfOImh4BpxoH9jpnNXj2\"", + "ETag" : "\"9iywS2oSedKFJzIYyoaOp7S2FLm\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzA=;sn=355970", - "x-ms-request-id" : "31640901-581a-4349-bfe0-c7dd034e08eb", - "Body" : "{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "ce349f1e-8db3-4801-a0e6-cb58d17bf091", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mzg=;sn=363938", + "x-ms-request-id" : "8e5715c0-7ee0-4745-a5cc-aab4de24b3d4", + "Body" : "{\"etag\":\"9iywS2oSedKFJzIYyoaOp7S2FLm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "1cd24517-fe1e-4b11-8eef-f220809f33db", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e15d1c9c-ef16-405c-b40c-a4ddba696e92", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "ab01f83e-8bc7-4dcc-9e5f-78529205ee91", + "x-ms-correlation-request-id" : "ab45c2cd-4f7f-4cc1-9559-e0faf26b93cb", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\"", + "ETag" : "\"QnLWbZ38LA6tBeMJPVzbPPnv8HM\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzE=;sn=355971", - "x-ms-request-id" : "ab01f83e-8bc7-4dcc-9e5f-78529205ee91", - "Body" : "{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "56054950-fb97-4326-940a-108c1ce65e1f", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5Mzk=;sn=363939", + "x-ms-request-id" : "ab45c2cd-4f7f-4cc1-9559-e0faf26b93cb", + "Body" : "{\"etag\":\"QnLWbZ38LA6tBeMJPVzbPPnv8HM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "e15d1c9c-ef16-405c-b40c-a4ddba696e92", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "25980a1d-b129-439f-9cfb-c8c693d9dbb0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "2ce38b31-7808-44e4-8df0-da57c0630b27", + "x-ms-correlation-request-id" : "7f7a9895-8ef1-4c2c-b8d2-f0e44892ebe7", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\"", + "ETag" : "\"06CgYfuQfwaQPRAFWE11zw9N2cm\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzI=;sn=355972", - "x-ms-request-id" : "2ce38b31-7808-44e4-8df0-da57c0630b27", - "Body" : "{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "e342bd50-c602-4200-ac33-54095fcec6bc", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDA=;sn=363940", + "x-ms-request-id" : "7f7a9895-8ef1-4c2c-b8d2-f0e44892ebe7", + "Body" : "{\"etag\":\"06CgYfuQfwaQPRAFWE11zw9N2cm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "25980a1d-b129-439f-9cfb-c8c693d9dbb0", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5d83060e-3fa2-485e-a35d-0d6f4f0f6240", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "c8e815a3-d41b-485c-8aed-840105a9dd2e", + "x-ms-correlation-request-id" : "faa32336-35df-44f2-a6e6-60c6be4762cd", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"79gGNL9vs3vTEgaSWqAn1kUV9xz\"", + "ETag" : "\"5skltlgMRTCQ0ulS5VzTFrd0L6X\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzM=;sn=355973", - "x-ms-request-id" : "c8e815a3-d41b-485c-8aed-840105a9dd2e", - "Body" : "{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "25026f6c-1593-4466-b2a2-31795dc32ac4", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDE=;sn=363941", + "x-ms-request-id" : "faa32336-35df-44f2-a6e6-60c6be4762cd", + "Body" : "{\"etag\":\"5skltlgMRTCQ0ulS5VzTFrd0L6X\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "5d83060e-3fa2-485e-a35d-0d6f4f0f6240", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "075d5799-7675-4986-94b4-f42a72cca01e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "e397bc6d-bf8e-4eed-9f63-acb576ac39c7", + "x-ms-correlation-request-id" : "ffe54004-370a-435b-b793-5ccd10693bd6", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IPjAXqJXU1C8rF1kydehHCU1Uq2\"", + "ETag" : "\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", - "x-ms-request-id" : "e397bc6d-bf8e-4eed-9f63-acb576ac39c7", - "Body" : "{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "3c545fb1-2ed7-4d87-8662-6544ee3f04a1", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDI=;sn=363942", + "x-ms-request-id" : "ffe54004-370a-435b-b793-5ccd10693bd6", + "Body" : "{\"etag\":\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "075d5799-7675-4986-94b4-f42a72cca01e", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key94007&label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key35098&label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "616ff7b6-fdcd-4c07-b6b1-8cbe4a63f0ac", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "649ac81e-77da-4288-9fc7-7723b467c82a", + "x-ms-correlation-request-id" : "886a5064-7e5f-414e-aa47-6433913ad6dc", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", - "x-ms-request-id" : "649ac81e-77da-4288-9fc7-7723b467c82a", - "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}]}", - "x-ms-client-request-id" : "76d39dd5-b3b0-4ca6-b203-43c42a4942f1", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDI=;sn=363942", + "x-ms-request-id" : "886a5064-7e5f-414e-aa47-6433913ad6dc", + "Body" : "{\"items\":[{\"etag\":\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"5skltlgMRTCQ0ulS5VzTFrd0L6X\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"06CgYfuQfwaQPRAFWE11zw9N2cm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"QnLWbZ38LA6tBeMJPVzbPPnv8HM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"9iywS2oSedKFJzIYyoaOp7S2FLm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"QinR7zb8xPHJjvzbeDLlwKwvuo1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"IGQbSkuS7tSzzklpnvgpV8jE2i2\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"R0H7nzJiNegcD3ku1aGjIi6XmvJ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"HeR24qTGpKJH9njcGncRwUVJtu6\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"W03AYZ8KEQGDOsBFNzFC3UrR5YQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"CztcBJosCl0u01yZTTmNwHHlYwB\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:42+00:00\"},{\"etag\":\"lfp6p2e8NzVgQENdjyJ5rsPf2wP\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ioV2WrOWLhgEFrsIjAj3amviutR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"tFXQamTglofz7VjSgN5JE4DMQ0e\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"U6Bwr9hJPb5AsWvFuIrFwsOCbbv\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"0C8nYdBA7LHXtvBwBE5fIjN7N9k\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"q2YNMF6kgCWlV4AcwvtK7RZxaqu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"A6Ncrwv77SJGxsHmnG6MoEXzr4D\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"BBmwovXaKdbnds4NepgiPBUUHjT\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ETY9gLirujB427Jr05ZcXsU4FMu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"pdwIBFs4qPDwpaFX6arFCUlJZbD\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"PTQj9igluEEiREhcosWEEhpCvXx\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"TAA0ooCD68viE4fc9VA7584QpWQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"qIpo36Qsc1HuuAbItGZqFEBHAbM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ShgFBkLdljfFqu2kR35k6E5ZBWR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"d2fTjE58QrFcasF7555NOFPNjzF\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"POuYl5DXiWDpzdE5UQoFHclcVd4\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"LJT13V2I9WI2LAJnthr3SA9PiMa\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"dNuBEBEKrl787zetQ3HNhD3Qe0u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"3HPD8OzpTL3lTs4XhWu2UePfyJy\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"nrOZVjGaqMIhMBRXg8XaYVPG1Ay\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ankKrW0VWqzrdUnG4GILiVnmOmg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"VeszSbQVlEZKDDxDQecTWx9v4Jt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"MvHoAaB6rWcAIDnDRRK1tvxmSFt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"sqqfGhktYsjuKBHPnmK8MvRGfBm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"13NQMyEUr7pP6eIikme1ovDR91B\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"YCAOHr56dBlurjfrW753bcCQfMI\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ftABEuwBN0bk046nSxcBrU5mU1a\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"wO8idPTjwNQbwu07531IxtGREEC\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ukSzfcRPgcTDXIpXTi8XdkeUl5H\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"xaBNY59d5a7tol4wBa1eIKjQhCX\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"S6nQYeeArhTKVPgPJjxErpMIdk8\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"bcUwbYfiamnEDEBjJRttNGkGiux\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"UEJDqdfD24Vbo3LY2iQbL8ZCk97\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"Cgb7X321F7xXBd1hiBni15EsVTq\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"xi7SMb33bd10ewkEogSHYZmXoYg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"X5YZ4dr2wfpmOmwF9ix8YFhrI3u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"WvDrP87mIrXw0N0V2DBtyzl2tV1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"KHUg1qU8uoF0Kkvk16Dx75QSfHw\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"64l1kkXK2luIcofyV62S8gUvvxZ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}]}", + "x-ms-client-request-id" : "616ff7b6-fdcd-4c07-b6b1-8cbe4a63f0ac", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key94007&label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key35098&label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0 azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e705ee74-7847-4f21-8007-57ce898c06ec", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "1c1d9bea-76fa-4db6-92e5-f3f6417d7939", + "x-ms-correlation-request-id" : "a6808e4a-3511-45f6-995f-c1584c526b58", "Accept-Ranges" : "items", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", - "x-ms-request-id" : "1c1d9bea-76fa-4db6-92e5-f3f6417d7939", - "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}]}", - "x-ms-client-request-id" : "76d39dd5-b3b0-4ca6-b203-43c42a4942f1", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDI=;sn=363942", + "x-ms-request-id" : "a6808e4a-3511-45f6-995f-c1584c526b58", + "Body" : "{\"items\":[{\"etag\":\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"5skltlgMRTCQ0ulS5VzTFrd0L6X\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"06CgYfuQfwaQPRAFWE11zw9N2cm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"QnLWbZ38LA6tBeMJPVzbPPnv8HM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"9iywS2oSedKFJzIYyoaOp7S2FLm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"QinR7zb8xPHJjvzbeDLlwKwvuo1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"IGQbSkuS7tSzzklpnvgpV8jE2i2\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"R0H7nzJiNegcD3ku1aGjIi6XmvJ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"HeR24qTGpKJH9njcGncRwUVJtu6\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"W03AYZ8KEQGDOsBFNzFC3UrR5YQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"},{\"etag\":\"CztcBJosCl0u01yZTTmNwHHlYwB\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:42+00:00\"},{\"etag\":\"lfp6p2e8NzVgQENdjyJ5rsPf2wP\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ioV2WrOWLhgEFrsIjAj3amviutR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"tFXQamTglofz7VjSgN5JE4DMQ0e\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"U6Bwr9hJPb5AsWvFuIrFwsOCbbv\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"0C8nYdBA7LHXtvBwBE5fIjN7N9k\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"q2YNMF6kgCWlV4AcwvtK7RZxaqu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"A6Ncrwv77SJGxsHmnG6MoEXzr4D\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"BBmwovXaKdbnds4NepgiPBUUHjT\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ETY9gLirujB427Jr05ZcXsU4FMu\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"pdwIBFs4qPDwpaFX6arFCUlJZbD\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"PTQj9igluEEiREhcosWEEhpCvXx\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"TAA0ooCD68viE4fc9VA7584QpWQ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"qIpo36Qsc1HuuAbItGZqFEBHAbM\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"ShgFBkLdljfFqu2kR35k6E5ZBWR\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"d2fTjE58QrFcasF7555NOFPNjzF\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"POuYl5DXiWDpzdE5UQoFHclcVd4\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"LJT13V2I9WI2LAJnthr3SA9PiMa\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:41+00:00\"},{\"etag\":\"dNuBEBEKrl787zetQ3HNhD3Qe0u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"3HPD8OzpTL3lTs4XhWu2UePfyJy\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"nrOZVjGaqMIhMBRXg8XaYVPG1Ay\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ankKrW0VWqzrdUnG4GILiVnmOmg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"VeszSbQVlEZKDDxDQecTWx9v4Jt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"MvHoAaB6rWcAIDnDRRK1tvxmSFt\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"sqqfGhktYsjuKBHPnmK8MvRGfBm\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"13NQMyEUr7pP6eIikme1ovDR91B\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"YCAOHr56dBlurjfrW753bcCQfMI\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ftABEuwBN0bk046nSxcBrU5mU1a\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"wO8idPTjwNQbwu07531IxtGREEC\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"ukSzfcRPgcTDXIpXTi8XdkeUl5H\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"xaBNY59d5a7tol4wBa1eIKjQhCX\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"S6nQYeeArhTKVPgPJjxErpMIdk8\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"bcUwbYfiamnEDEBjJRttNGkGiux\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"UEJDqdfD24Vbo3LY2iQbL8ZCk97\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"Cgb7X321F7xXBd1hiBni15EsVTq\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"xi7SMb33bd10ewkEogSHYZmXoYg\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"X5YZ4dr2wfpmOmwF9ix8YFhrI3u\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"WvDrP87mIrXw0N0V2DBtyzl2tV1\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"KHUg1qU8uoF0Kkvk16Dx75QSfHw\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"64l1kkXK2luIcofyV62S8gUvvxZ\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}]}", + "x-ms-client-request-id" : "e705ee74-7847-4f21-8007-57ce898c06ec", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv?key=key94007%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key35098%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a67756e-ec9c-4384-8971-288a72a19ea2", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "d2ac8670-2990-467c-aa04-7c0903f51950", + "x-ms-correlation-request-id" : "1d3c2be5-bba6-46b5-90ae-7645933b4c8b", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", - "x-ms-request-id" : "d2ac8670-2990-467c-aa04-7c0903f51950", - "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}]}", - "x-ms-client-request-id" : "b1f5f800-2e70-4e2e-b108-ff61a50398aa", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDI=;sn=363942", + "x-ms-request-id" : "1d3c2be5-bba6-46b5-90ae-7645933b4c8b", + "Body" : "{\"items\":[{\"etag\":\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}]}", + "x-ms-client-request-id" : "6a67756e-ec9c-4384-8971-288a72a19ea2", "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" - } + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key35098?label=042fac14", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d4db246f-6659-45c9-a80f-34a57785c2ae", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "Server" : "nginx/1.13.12", + "Server" : "openresty/1.15.8.1", "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", "Connection" : "keep-alive", - "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Date" : "Wed, 02 Oct 2019 20:46:43 GMT", "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "x-ms-correlation-request-id" : "45ed019e-9367-4a83-8a68-06076dd73562", + "x-ms-correlation-request-id" : "aea35a44-1949-4d03-bc6b-04779068c0bf", "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", - "ETag" : "\"IPjAXqJXU1C8rF1kydehHCU1Uq2\"", + "ETag" : "\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\"", "Access-Control-Allow-Credentials" : "true", - "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzU=;sn=355975", - "x-ms-request-id" : "45ed019e-9367-4a83-8a68-06076dd73562", - "Body" : "{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", - "x-ms-client-request-id" : "4a59737c-309a-4050-8aa5-20d687a44380", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM5NDM=;sn=363943", + "x-ms-request-id" : "aea35a44-1949-4d03-bc6b-04779068c0bf", + "Body" : "{\"etag\":\"5Ra8hDUMlnkLtTyBOZTNC4wCdWH\",\"key\":\"key35098\",\"label\":\"042fac14\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:43+00:00\"}", + "x-ms-client-request-id" : "d4db246f-6659-45c9-a80f-34a57785c2ae", "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" - } + }, + "Exception" : null } ], - "variables" : [ "key94007", "4f568078" ] + "variables" : [ "key35098", "042fac14" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json index 3c6a48b183bb..facc17e603be 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithRange.json @@ -1,146 +1,188 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key01462805747", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key78179138477", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d423d3d0-9a4f-4af4-8b17-94286b30bc0a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDE=;sn=244201", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d4470fd1-75ad-47ec-ad32-efd8d5ae55ee", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 02:39:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"eVMzJEjbRJgclaWIzOm5pVmOofD\"", - "x-ms-request-id" : "d4470fd1-75ad-47ec-ad32-efd8d5ae55ee", - "Body" : "{\"etag\":\"eVMzJEjbRJgclaWIzOm5pVmOofD\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}", - "x-ms-client-request-id" : "10aaa518-6282-4c3f-9aad-837b3846bd50" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "78e43180-32dc-4511-af15-44b2c55cbe98", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"OpUEZB4AzkeaNhYPgkphJNBqhjM\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODM=;sn=363883", + "x-ms-request-id" : "78e43180-32dc-4511-af15-44b2c55cbe98", + "Body" : "{\"etag\":\"OpUEZB4AzkeaNhYPgkphJNBqhjM\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "d423d3d0-9a4f-4af4-8b17-94286b30bc0a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key01462805747", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key78179138477", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "607f5186-8093-4e9c-9536-db03abc29f1f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDI=;sn=244202", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ea160302-0e69-4089-8b91-2e7debe6e436", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 02:39:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"qmAB8IhBRNfmXH9HgZ96KQCaQT3\"", - "x-ms-request-id" : "ea160302-0e69-4089-8b91-2e7debe6e436", - "Body" : "{\"etag\":\"qmAB8IhBRNfmXH9HgZ96KQCaQT3\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}", - "x-ms-client-request-id" : "94b7ec5f-7feb-4678-a226-e852989d3618" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8c6fd168-83c6-4d2e-95fd-5bee412bccef", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Od8i0xFiCmjQKa5dcwu8ZS3z8FX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODQ=;sn=363884", + "x-ms-request-id" : "8c6fd168-83c6-4d2e-95fd-5bee412bccef", + "Body" : "{\"etag\":\"Od8i0xFiCmjQKa5dcwu8ZS3z8FX\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "607f5186-8093-4e9c-9536-db03abc29f1f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key01462805747", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key78179138477", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "99ee94e9-0fb3-475d-82d8-fec9fd687317", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDM=;sn=244203", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "47226061-58bc-48db-a7cb-278f7b55b5ca", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 02:39:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"a3ApwXnOZL908Ds9oxTyoazehf3\"", - "x-ms-request-id" : "47226061-58bc-48db-a7cb-278f7b55b5ca", - "Body" : "{\"etag\":\"a3ApwXnOZL908Ds9oxTyoazehf3\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}", - "x-ms-client-request-id" : "38e0fbb6-2c6a-440a-8070-daa790bebf42" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a1755d36-b5f9-4780-a926-e1f41fa1da39", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"HbprpQJQpObntO0aeMEPln8b5JD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODU=;sn=363885", + "x-ms-request-id" : "a1755d36-b5f9-4780-a926-e1f41fa1da39", + "Body" : "{\"etag\":\"HbprpQJQpObntO0aeMEPln8b5JD\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "99ee94e9-0fb3-475d-82d8-fec9fd687317", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key01462805747", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key78179138477", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c7718df3-1515-4126-93aa-10ff9b4db8a1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDM=;sn=244203", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Content-Range" : "items 1-2/3", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "206", - "x-ms-correlation-request-id" : "e5fae4e8-8fe7-4db0-960b-44fda87e6acb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-range" : "items 1-2/3", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "e5fae4e8-8fe7-4db0-960b-44fda87e6acb", - "Body" : "{\"items\":[{\"etag\":\"qmAB8IhBRNfmXH9HgZ96KQCaQT3\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"},{\"etag\":\"eVMzJEjbRJgclaWIzOm5pVmOofD\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}]}", - "x-ms-client-request-id" : "323ace5e-7134-46fd-af36-1ce38038e51f" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b423019e-1aae-454f-8dae-fdcb7d8c8ed8", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODU=;sn=363885", + "x-ms-request-id" : "b423019e-1aae-454f-8dae-fdcb7d8c8ed8", + "Body" : "{\"items\":[{\"etag\":\"Od8i0xFiCmjQKa5dcwu8ZS3z8FX\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"},{\"etag\":\"OpUEZB4AzkeaNhYPgkphJNBqhjM\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}]}", + "x-ms-client-request-id" : "c7718df3-1515-4126-93aa-10ff9b4db8a1", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key01462%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key78179%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c82a39aa-c57d-409c-8555-b57cff6d04e1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:02 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDM=;sn=244203", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3cb277c9-e40f-4d0a-b1e3-9499c67dc0fc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "3cb277c9-e40f-4d0a-b1e3-9499c67dc0fc", - "Body" : "{\"items\":[{\"etag\":\"a3ApwXnOZL908Ds9oxTyoazehf3\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}]}", - "x-ms-client-request-id" : "dad10bf3-0a4b-4214-8bb3-7c68e802f580" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0bae8c62-55a1-4ef0-ae6d-07a681c00e15", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODU=;sn=363885", + "x-ms-request-id" : "0bae8c62-55a1-4ef0-ae6d-07a681c00e15", + "Body" : "{\"items\":[{\"etag\":\"HbprpQJQpObntO0aeMEPln8b5JD\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}]}", + "x-ms-client-request-id" : "c82a39aa-c57d-409c-8555-b57cff6d04e1", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key01462805747", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key78179138477", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bda548e7-0c57-49f9-91f2-7357c4f43afd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Tue, 30 Apr 2019 02:39:03 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDQyMDQ=;sn=244204", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8dbfcda1-b55b-4e66-a1a9-32d48b013b09", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Tue, 30 Apr 2019 02:39:03 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"a3ApwXnOZL908Ds9oxTyoazehf3\"", - "x-ms-request-id" : "8dbfcda1-b55b-4e66-a1a9-32d48b013b09", - "Body" : "{\"etag\":\"a3ApwXnOZL908Ds9oxTyoazehf3\",\"key\":\"key01462805747\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-30T02:39:03+00:00\"}", - "x-ms-client-request-id" : "cd5926e5-d2fc-4bdc-8483-a04a0339fb9b" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bd7ed181-43d8-4cbc-8250-6c82cfeece29", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"HbprpQJQpObntO0aeMEPln8b5JD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODY=;sn=363886", + "x-ms-request-id" : "bd7ed181-43d8-4cbc-8250-6c82cfeece29", + "Body" : "{\"etag\":\"HbprpQJQpObntO0aeMEPln8b5JD\",\"key\":\"key78179138477\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "bda548e7-0c57-49f9-91f2-7357c4f43afd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key01462", "f5fa17f8", "key01462805747" ] + "variables" : [ "key78179", "41c879e2", "key78179138477" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json index fddc78a5d939..6f4de948f5f0 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsAcceptDateTime.json @@ -1,169 +1,218 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "83ff6b43-473e-4f4d-8b70-d78a65feed68", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTc=;sn=228097", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:33 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "48f2328d-f890-4226-b698-dd8acf4a5842", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:41 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"V0KjMaHLPN3SUHFQilYN0ohSx9h\"", - "x-ms-request-id" : "48f2328d-f890-4226-b698-dd8acf4a5842", - "Body" : "{\"etag\":\"V0KjMaHLPN3SUHFQilYN0ohSx9h\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}", - "x-ms-client-request-id" : "db2f9163-4aef-435c-8000-5f626f48166b" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d77f10cb-515f-461a-8582-eaee9290c3fd", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"EarbrwDOM5gm9GbNeerJHCOPjnl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjQ=;sn=363824", + "x-ms-request-id" : "d77f10cb-515f-461a-8582-eaee9290c3fd", + "Body" : "{\"etag\":\"EarbrwDOM5gm9GbNeerJHCOPjnl\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:33+00:00\"}", + "x-ms-client-request-id" : "83ff6b43-473e-4f4d-8b70-d78a65feed68", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3cd658f2-1e99-4476-b1a1-9fe9dbc2603f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:42 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTg=;sn=228098", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:33 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1ba2f9c2-cfd8-4edd-be29-9fbc771bbc93", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:43 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IdxX19HgN3GVUEsrVu2SANsnvjT\"", - "x-ms-request-id" : "1ba2f9c2-cfd8-4edd-be29-9fbc771bbc93", - "Body" : "{\"etag\":\"IdxX19HgN3GVUEsrVu2SANsnvjT\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:43+00:00\"}", - "x-ms-client-request-id" : "0900e1cc-8a74-4631-a695-1ac1da452c93" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dc80ae19-a6b3-42b0-802d-b9306f27f5a6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"69eSqlkgZSTadb5MWxvwa6R2bTd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjU=;sn=363825", + "x-ms-request-id" : "dc80ae19-a6b3-42b0-802d-b9306f27f5a6", + "Body" : "{\"etag\":\"69eSqlkgZSTadb5MWxvwa6R2bTd\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:33+00:00\"}", + "x-ms-client-request-id" : "3cd658f2-1e99-4476-b1a1-9fe9dbc2603f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de503670-eff2-44ee-97e8-9ec5b3739742", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:44 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTk=;sn=228099", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "57b7bdaa-57f1-4466-ad5a-190675e9b1da", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"51X3GMpHwFm7jtoxB3667c7iwFZ\"", - "x-ms-request-id" : "57b7bdaa-57f1-4466-ad5a-190675e9b1da", - "Body" : "{\"etag\":\"51X3GMpHwFm7jtoxB3667c7iwFZ\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "c3a64362-2335-40d9-b3f2-3e4edee6c441" - } + "Date" : "Wed, 02 Oct 2019 20:46:34 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "afb09e0c-13dd-4caa-b93c-e81f53120e6d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"nj2V786eJH1z29nu9emPs0cXoIY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjY=;sn=363826", + "x-ms-request-id" : "afb09e0c-13dd-4caa-b93c-e81f53120e6d", + "Body" : "{\"etag\":\"nj2V786eJH1z29nu9emPs0cXoIY\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "de503670-eff2-44ee-97e8-9ec5b3739742", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/revisions?key=key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/revisions?key=key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f25108d-5c7f-44d3-bc7d-d80620523c48", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTk=;sn=228099", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0bc77a7f-18c7-42ac-aefe-c88dfdd1c639", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "accept-ranges" : "items", - "x-ms-request-id" : "0bc77a7f-18c7-42ac-aefe-c88dfdd1c639", - "Body" : "{\"items\":[{\"etag\":\"51X3GMpHwFm7jtoxB3667c7iwFZ\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"},{\"etag\":\"IdxX19HgN3GVUEsrVu2SANsnvjT\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:43+00:00\"},{\"etag\":\"V0KjMaHLPN3SUHFQilYN0ohSx9h\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}]}", - "x-ms-client-request-id" : "01269a5a-8763-4910-8451-6183c89fff9e" - } + "Date" : "Wed, 02 Oct 2019 20:46:34 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e38d4821-e894-400a-8ce1-19e714694dba", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjY=;sn=363826", + "x-ms-request-id" : "e38d4821-e894-400a-8ce1-19e714694dba", + "Body" : "{\"items\":[{\"etag\":\"nj2V786eJH1z29nu9emPs0cXoIY\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"},{\"etag\":\"69eSqlkgZSTadb5MWxvwa6R2bTd\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:33+00:00\"},{\"etag\":\"EarbrwDOM5gm9GbNeerJHCOPjnl\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:33+00:00\"}]}", + "x-ms-client-request-id" : "4f25108d-5c7f-44d3-bc7d-d80620523c48", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "63599510-1470-4aeb-a25c-c9e78496417f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "memento-datetime" : "Wed, 24 Apr 2019 18:48:43 GMT", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTk=;sn=228099", - "link" : "; rel=\"original\"", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Memento-Datetime" : "Wed, 02 Oct 2019 20:46:33 GMT", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b7b3902c-a0d0-49e3-9b08-320af91c16c4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "b7b3902c-a0d0-49e3-9b08-320af91c16c4", - "Body" : "{\"items\":[{\"etag\":\"IdxX19HgN3GVUEsrVu2SANsnvjT\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:43+00:00\"}]}", - "x-ms-client-request-id" : "1d442cea-1eb6-47fe-8585-da91c9abf8e5" - } + "Date" : "Wed, 02 Oct 2019 20:46:34 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e4e3a610-9dcb-4a2d-b5c8-5f22530ae41c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjY=;sn=363826", + "x-ms-request-id" : "e4e3a610-9dcb-4a2d-b5c8-5f22530ae41c", + "Body" : "{\"items\":[{\"etag\":\"69eSqlkgZSTadb5MWxvwa6R2bTd\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:33+00:00\"}]}", + "Link" : "; rel=\"original\"", + "x-ms-client-request-id" : "63599510-1470-4aeb-a25c-c9e78496417f", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key05645%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key80616%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2f62fa0c-4c4e-440f-8a38-597d506c3d39", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTk=;sn=228099", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "45a635c3-5db6-4170-8e5a-858f2f4add72", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "45a635c3-5db6-4170-8e5a-858f2f4add72", - "Body" : "{\"items\":[{\"etag\":\"51X3GMpHwFm7jtoxB3667c7iwFZ\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}]}", - "x-ms-client-request-id" : "e12f3175-b058-4d21-94d4-3dc4a862121e" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "821cafdb-2a28-4bf8-b6bb-122f7376c5fa", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjY=;sn=363826", + "x-ms-request-id" : "821cafdb-2a28-4bf8-b6bb-122f7376c5fa", + "Body" : "{\"items\":[{\"etag\":\"nj2V786eJH1z29nu9emPs0cXoIY\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}]}", + "x-ms-client-request-id" : "2f62fa0c-4c4e-440f-8a38-597d506c3d39", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key05645979177", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key8061682967c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bd44006e-f30a-4c80-b2fa-ad4de9d5aaee", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:45 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxMDA=;sn=228100", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:35 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8c9ada58-d183-47a1-bd1f-d9b15345f47c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:45 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"51X3GMpHwFm7jtoxB3667c7iwFZ\"", - "x-ms-request-id" : "8c9ada58-d183-47a1-bd1f-d9b15345f47c", - "Body" : "{\"etag\":\"51X3GMpHwFm7jtoxB3667c7iwFZ\",\"key\":\"key05645979177\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:45+00:00\"}", - "x-ms-client-request-id" : "167a37ce-17e0-40c5-b08b-d813263bf630" - } + "Date" : "Wed, 02 Oct 2019 20:46:35 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b2152645-599a-481e-bcac-77c5ef5cf302", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"nj2V786eJH1z29nu9emPs0cXoIY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Mjc=;sn=363827", + "x-ms-request-id" : "b2152645-599a-481e-bcac-77c5ef5cf302", + "Body" : "{\"etag\":\"nj2V786eJH1z29nu9emPs0cXoIY\",\"key\":\"key8061682967c\",\"label\":null,\"content_type\":null,\"value\":\"anotherValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:35+00:00\"}", + "x-ms-client-request-id" : "bd44006e-f30a-4c80-b2fa-ad4de9d5aaee", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key05645", "d2f64567", "key05645979177" ] + "variables" : [ "key80616", "53503b97", "key8061682967c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json index c458ed5f1a04..e248b210434a 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsSelectFields.json @@ -1,432 +1,558 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-0?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-0?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "95070cdb-5ca4-40a0-abe0-943e31f8c016", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTc=;sn=228297", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6d161528-e1c1-4a07-aaec-761f06ccd565", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"M5ZFGucs80ezfGmI3cJK3uNL1pN\"", - "x-ms-request-id" : "6d161528-e1c1-4a07-aaec-761f06ccd565", - "Body" : "{\"etag\":\"M5ZFGucs80ezfGmI3cJK3uNL1pN\",\"key\":\"key68919-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "8b1a08ac-577e-42ba-8fa0-319f93650b7c" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9547fdfb-f18b-4ba5-9fcd-f667333b7b83", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"EbxGG76mNjuexOiFCqinso04KJQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjU=;sn=364125", + "x-ms-request-id" : "9547fdfb-f18b-4ba5-9fcd-f667333b7b83", + "Body" : "{\"etag\":\"EbxGG76mNjuexOiFCqinso04KJQ\",\"key\":\"key06111-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "95070cdb-5ca4-40a0-abe0-943e31f8c016", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-1?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-1?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "605beb73-628e-4c95-9704-b71887a80a29", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTg=;sn=228298", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e8636f22-0e7a-4cdf-8383-4ba9c79c1171", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"jRP0ugc0gMbuI2fEcCdyCToB619\"", - "x-ms-request-id" : "e8636f22-0e7a-4cdf-8383-4ba9c79c1171", - "Body" : "{\"etag\":\"jRP0ugc0gMbuI2fEcCdyCToB619\",\"key\":\"key68919-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "e6a2773a-5727-4e93-b782-cc7ac74ce7b7" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8bdabcc0-ba61-4d6e-abbd-b24ed054c8e6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"S7UrNkfFUltvakq5tN6QRG8JhqW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjY=;sn=364126", + "x-ms-request-id" : "8bdabcc0-ba61-4d6e-abbd-b24ed054c8e6", + "Body" : "{\"etag\":\"S7UrNkfFUltvakq5tN6QRG8JhqW\",\"key\":\"key06111-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "605beb73-628e-4c95-9704-b71887a80a29", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-2?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-5?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fad9dbc5-1bb0-4c57-8bc0-f2f66c87244a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgyOTk=;sn=228299", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4fd7536b-9219-4657-aade-e7d2a05be16f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"pG0xl2cS4hEF77eXSrPkPVa3Olw\"", - "x-ms-request-id" : "4fd7536b-9219-4657-aade-e7d2a05be16f", - "Body" : "{\"etag\":\"pG0xl2cS4hEF77eXSrPkPVa3Olw\",\"key\":\"key68919-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "66fb1240-a184-43f8-8cde-5f131e659d4f" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f25af0ec-83c6-4005-a614-ac76a5c51e7b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjc=;sn=364127", + "x-ms-request-id" : "f25af0ec-83c6-4005-a614-ac76a5c51e7b", + "Body" : "{\"etag\":\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\",\"key\":\"key06111-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "fad9dbc5-1bb0-4c57-8bc0-f2f66c87244a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-3?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-6?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "256d2247-811e-4ab9-b5e7-3aa079724bd7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDA=;sn=228300", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b5992888-17c8-443d-b5fa-1f883abd66c0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"y8HxabEAGt7RlNh3VsZhDa4TPeW\"", - "x-ms-request-id" : "b5992888-17c8-443d-b5fa-1f883abd66c0", - "Body" : "{\"etag\":\"y8HxabEAGt7RlNh3VsZhDa4TPeW\",\"key\":\"key68919-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "980fbf84-209b-4069-8e62-bfe3d77950cd" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e9b15eee-ed7a-4150-837c-9e6857f7b273", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Nx80qUxvIc7s45zcdrWmNpiJP9A\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjk=;sn=364129", + "x-ms-request-id" : "e9b15eee-ed7a-4150-837c-9e6857f7b273", + "Body" : "{\"etag\":\"Nx80qUxvIc7s45zcdrWmNpiJP9A\",\"key\":\"key06111-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "256d2247-811e-4ab9-b5e7-3aa079724bd7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-4?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-2?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5befd417-a8b1-49a9-af6e-664483c18b2e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDE=;sn=228301", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3e973383-ae06-4aea-8719-15eb04caa5ec", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"xKgLxAlpWY186vAsvpyE1Glv96y\"", - "x-ms-request-id" : "3e973383-ae06-4aea-8719-15eb04caa5ec", - "Body" : "{\"etag\":\"xKgLxAlpWY186vAsvpyE1Glv96y\",\"key\":\"key68919-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "5b26bb44-264a-4949-b099-dd125b745a9c" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7a5dd2dd-396e-4555-a0e1-d29aece96477", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"DwcXYaMnxQWU4UwqolP1sHCYQ1y\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMjg=;sn=364128", + "x-ms-request-id" : "7a5dd2dd-396e-4555-a0e1-d29aece96477", + "Body" : "{\"etag\":\"DwcXYaMnxQWU4UwqolP1sHCYQ1y\",\"key\":\"key06111-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "5befd417-a8b1-49a9-af6e-664483c18b2e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-5?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-3?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8fe863c2-2d6f-4f2d-8e60-a5fa11f83ac2", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDI=;sn=228302", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6d8bd71b-8b56-4f85-843c-82d69bfcefe6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"0S6o2k89e7MmbAiznaMmZBJa4Dy\"", - "x-ms-request-id" : "6d8bd71b-8b56-4f85-843c-82d69bfcefe6", - "Body" : "{\"etag\":\"0S6o2k89e7MmbAiznaMmZBJa4Dy\",\"key\":\"key68919-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "8d49a655-2556-4d98-a5ea-0c7c7441962a" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dfbc7b23-b23a-4f73-ad8e-ea2fe0fa095d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TzCTTE2ixJ1yLnpUft9Sc1tcTn9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzA=;sn=364130", + "x-ms-request-id" : "dfbc7b23-b23a-4f73-ad8e-ea2fe0fa095d", + "Body" : "{\"etag\":\"TzCTTE2ixJ1yLnpUft9Sc1tcTn9\",\"key\":\"key06111-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "8fe863c2-2d6f-4f2d-8e60-a5fa11f83ac2", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-6?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-7?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd2583bf-426e-478b-b03a-e2669c93cb66", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDM=;sn=228303", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d8e8e7eb-4d92-4c10-85e5-2c8f92d6a1fb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TF7sb1YzjhQ8eMQRe9MgumoXoV3\"", - "x-ms-request-id" : "d8e8e7eb-4d92-4c10-85e5-2c8f92d6a1fb", - "Body" : "{\"etag\":\"TF7sb1YzjhQ8eMQRe9MgumoXoV3\",\"key\":\"key68919-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "be0456fc-6c08-4575-9e33-516da8f0e9f8" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "04338a15-8c0b-4f63-8dd7-fdaaebe79c99", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzI=;sn=364132", + "x-ms-request-id" : "04338a15-8c0b-4f63-8dd7-fdaaebe79c99", + "Body" : "{\"etag\":\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\",\"key\":\"key06111-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "fd2583bf-426e-478b-b03a-e2669c93cb66", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-7?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-4?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "144ab8ce-64dd-4b4d-ba67-7e80ba6e26a3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:00 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDQ=;sn=228304", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6385beb2-f461-4f3d-9b20-e0042a42e1d4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"t7Z9DYCN09d6nJRWYJRgAfESY6J\"", - "x-ms-request-id" : "6385beb2-f461-4f3d-9b20-e0042a42e1d4", - "Body" : "{\"etag\":\"t7Z9DYCN09d6nJRWYJRgAfESY6J\",\"key\":\"key68919-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "46433857-3974-4de1-9f96-d7664542b5db" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dfb5c89b-8271-43b9-a0e8-ca5349f2e3b1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"tkSfvFz9iHOToXK26Uj1Z3pHdla\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzE=;sn=364131", + "x-ms-request-id" : "dfb5c89b-8271-43b9-a0e8-ca5349f2e3b1", + "Body" : "{\"etag\":\"tkSfvFz9iHOToXK26Uj1Z3pHdla\",\"key\":\"key06111-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "144ab8ce-64dd-4b4d-ba67-7e80ba6e26a3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key68919-fetch-%2a&label=%2a-second%2a&$select=key%2cetag%2ccontent_type%2ctags", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key06111-fetch-%2a&label=%2a-second%2a&$select=key%2cetag%2ccontent_type%2ctags", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "425468db-faa8-4790-b030-0e6299152caa", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDQ=;sn=228304", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5af6fdfe-9d8f-4b9b-95ad-8a30cb4a4545", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "5af6fdfe-9d8f-4b9b-95ad-8a30cb4a4545", - "Body" : "{\"items\":[{\"etag\":\"0S6o2k89e7MmbAiznaMmZBJa4Dy\",\"key\":\"key68919-fetch-5\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}},{\"etag\":\"t7Z9DYCN09d6nJRWYJRgAfESY6J\",\"key\":\"key68919-fetch-7\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}}]}", - "x-ms-client-request-id" : "cd5c5e51-f8ad-459c-a471-e45d7247a942" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "42056db4-5124-46a7-aee7-bf42341615b5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzI=;sn=364132", + "x-ms-request-id" : "42056db4-5124-46a7-aee7-bf42341615b5", + "Body" : "{\"items\":[{\"etag\":\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\",\"key\":\"key06111-fetch-5\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}},{\"etag\":\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\",\"key\":\"key06111-fetch-7\",\"content_type\":null,\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"}}]}", + "x-ms-client-request-id" : "425468db-faa8-4790-b030-0e6299152caa", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key68919%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key06111%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7a543120-f76f-415a-bee7-015d8dd55cb9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDQ=;sn=228304", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0fbde16b-cd0f-49af-bc9f-4ceb1c725abb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "0fbde16b-cd0f-49af-bc9f-4ceb1c725abb", - "Body" : "{\"items\":[{\"etag\":\"M5ZFGucs80ezfGmI3cJK3uNL1pN\",\"key\":\"key68919-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"pG0xl2cS4hEF77eXSrPkPVa3Olw\",\"key\":\"key68919-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"xKgLxAlpWY186vAsvpyE1Glv96y\",\"key\":\"key68919-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"TF7sb1YzjhQ8eMQRe9MgumoXoV3\",\"key\":\"key68919-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"jRP0ugc0gMbuI2fEcCdyCToB619\",\"key\":\"key68919-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"y8HxabEAGt7RlNh3VsZhDa4TPeW\",\"key\":\"key68919-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"0S6o2k89e7MmbAiznaMmZBJa4Dy\",\"key\":\"key68919-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"},{\"etag\":\"t7Z9DYCN09d6nJRWYJRgAfESY6J\",\"key\":\"key68919-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}]}", - "x-ms-client-request-id" : "666fdf64-15f7-43ca-b45f-9774d70f89f9" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dfa89261-880e-4131-8b2a-e3d3da1f3fe7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzI=;sn=364132", + "x-ms-request-id" : "dfa89261-880e-4131-8b2a-e3d3da1f3fe7", + "Body" : "{\"items\":[{\"etag\":\"EbxGG76mNjuexOiFCqinso04KJQ\",\"key\":\"key06111-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"DwcXYaMnxQWU4UwqolP1sHCYQ1y\",\"key\":\"key06111-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"tkSfvFz9iHOToXK26Uj1Z3pHdla\",\"key\":\"key06111-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"Nx80qUxvIc7s45zcdrWmNpiJP9A\",\"key\":\"key06111-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"S7UrNkfFUltvakq5tN6QRG8JhqW\",\"key\":\"key06111-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"TzCTTE2ixJ1yLnpUft9Sc1tcTn9\",\"key\":\"key06111-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\",\"key\":\"key06111-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"},{\"etag\":\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\",\"key\":\"key06111-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}]}", + "x-ms-client-request-id" : "7a543120-f76f-415a-bee7-015d8dd55cb9", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-0?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-2?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c9d4797c-c59a-4050-8fa8-a1210ad2c63b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDU=;sn=228305", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6619516f-95d7-4d42-a089-f93887b33dba", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"M5ZFGucs80ezfGmI3cJK3uNL1pN\"", - "x-ms-request-id" : "6619516f-95d7-4d42-a089-f93887b33dba", - "Body" : "{\"etag\":\"M5ZFGucs80ezfGmI3cJK3uNL1pN\",\"key\":\"key68919-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "c64b95f9-05fe-42e1-bc32-57a441f179b1" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "97f99605-6ba2-4381-8a92-1d6c2034fbd2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"DwcXYaMnxQWU4UwqolP1sHCYQ1y\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzM=;sn=364133", + "x-ms-request-id" : "97f99605-6ba2-4381-8a92-1d6c2034fbd2", + "Body" : "{\"etag\":\"DwcXYaMnxQWU4UwqolP1sHCYQ1y\",\"key\":\"key06111-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "c9d4797c-c59a-4050-8fa8-a1210ad2c63b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-2?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-4?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a669069-8859-4501-95f0-824ef541b756", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDY=;sn=228306", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c7233d22-056b-413b-a4c5-96bf287f8405", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"pG0xl2cS4hEF77eXSrPkPVa3Olw\"", - "x-ms-request-id" : "c7233d22-056b-413b-a4c5-96bf287f8405", - "Body" : "{\"etag\":\"pG0xl2cS4hEF77eXSrPkPVa3Olw\",\"key\":\"key68919-2\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "bb6fb355-9f6a-4375-a7ec-30ed9dfa3ab2" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f84d2129-fab4-4cad-b805-a5da897f0427", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"tkSfvFz9iHOToXK26Uj1Z3pHdla\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzU=;sn=364135", + "x-ms-request-id" : "f84d2129-fab4-4cad-b805-a5da897f0427", + "Body" : "{\"etag\":\"tkSfvFz9iHOToXK26Uj1Z3pHdla\",\"key\":\"key06111-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "6a669069-8859-4501-95f0-824ef541b756", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-4?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-0?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e1246eaf-98d4-47de-ace3-b5fff29b82ba", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDc=;sn=228307", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8004c6d4-fd88-4d1c-b370-4d69db989495", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"xKgLxAlpWY186vAsvpyE1Glv96y\"", - "x-ms-request-id" : "8004c6d4-fd88-4d1c-b370-4d69db989495", - "Body" : "{\"etag\":\"xKgLxAlpWY186vAsvpyE1Glv96y\",\"key\":\"key68919-4\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "6f1ec9df-2fc6-47d4-8e09-93ba7b6cab5d" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5c0bf4a8-2b7f-404e-947a-cedb6da94f02", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"EbxGG76mNjuexOiFCqinso04KJQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzQ=;sn=364134", + "x-ms-request-id" : "5c0bf4a8-2b7f-404e-947a-cedb6da94f02", + "Body" : "{\"etag\":\"EbxGG76mNjuexOiFCqinso04KJQ\",\"key\":\"key06111-0\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "e1246eaf-98d4-47de-ace3-b5fff29b82ba", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-6?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-1?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c8137996-81a0-4bb8-9ccd-1856826d501e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDg=;sn=228308", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5850056d-b8c0-4aa1-b16a-c18bbfe9dfb3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"TF7sb1YzjhQ8eMQRe9MgumoXoV3\"", - "x-ms-request-id" : "5850056d-b8c0-4aa1-b16a-c18bbfe9dfb3", - "Body" : "{\"etag\":\"TF7sb1YzjhQ8eMQRe9MgumoXoV3\",\"key\":\"key68919-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "688fd9af-4d3c-4400-a1a1-afb4cd87fe23" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4f0141db-05ba-4b9a-aa0c-bf6e64f3358b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"S7UrNkfFUltvakq5tN6QRG8JhqW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzY=;sn=364136", + "x-ms-request-id" : "4f0141db-05ba-4b9a-aa0c-bf6e64f3358b", + "Body" : "{\"etag\":\"S7UrNkfFUltvakq5tN6QRG8JhqW\",\"key\":\"key06111-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "c8137996-81a0-4bb8-9ccd-1856826d501e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-1?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-6?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f1ae1d6d-5660-4835-a1f2-263f0cee1794", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMDk=;sn=228309", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "afef0a63-11e2-41a6-814d-41f3cc8fbcc8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"jRP0ugc0gMbuI2fEcCdyCToB619\"", - "x-ms-request-id" : "afef0a63-11e2-41a6-814d-41f3cc8fbcc8", - "Body" : "{\"etag\":\"jRP0ugc0gMbuI2fEcCdyCToB619\",\"key\":\"key68919-fetch-1\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "a0012f54-c2cc-4edf-819b-6b2919ae20dc" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d934275f-900b-4923-ba24-259a07b4a274", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Nx80qUxvIc7s45zcdrWmNpiJP9A\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzc=;sn=364137", + "x-ms-request-id" : "d934275f-900b-4923-ba24-259a07b4a274", + "Body" : "{\"etag\":\"Nx80qUxvIc7s45zcdrWmNpiJP9A\",\"key\":\"key06111-6\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "f1ae1d6d-5660-4835-a1f2-263f0cee1794", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-3?label=my-first-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-3?label=my-first-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "be8c2467-9df2-4a51-bf53-71364b3326f9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTA=;sn=228310", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9b874efa-4b15-4114-b2b9-79aa839e3ed8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"y8HxabEAGt7RlNh3VsZhDa4TPeW\"", - "x-ms-request-id" : "9b874efa-4b15-4114-b2b9-79aa839e3ed8", - "Body" : "{\"etag\":\"y8HxabEAGt7RlNh3VsZhDa4TPeW\",\"key\":\"key68919-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "d0878a4e-1fab-4810-a5c8-b4eff3b57e75" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8acae80e-fb8a-445b-8812-ebc2a3772cf0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TzCTTE2ixJ1yLnpUft9Sc1tcTn9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzg=;sn=364138", + "x-ms-request-id" : "8acae80e-fb8a-445b-8812-ebc2a3772cf0", + "Body" : "{\"etag\":\"TzCTTE2ixJ1yLnpUft9Sc1tcTn9\",\"key\":\"key06111-fetch-3\",\"label\":\"my-first-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "be8c2467-9df2-4a51-bf53-71364b3326f9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-5?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-5?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e1e2fccf-84c6-492a-8b91-aee7f1a7247a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTE=;sn=228311", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5476e1a6-c223-4952-83fe-757b7a125a9a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"0S6o2k89e7MmbAiznaMmZBJa4Dy\"", - "x-ms-request-id" : "5476e1a6-c223-4952-83fe-757b7a125a9a", - "Body" : "{\"etag\":\"0S6o2k89e7MmbAiznaMmZBJa4Dy\",\"key\":\"key68919-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "97c0cc16-947f-4134-894c-703cabb8d687" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "75998528-03f9-4508-9be6-f66d2b874ab6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMzk=;sn=364139", + "x-ms-request-id" : "75998528-03f9-4508-9be6-f66d2b874ab6", + "Body" : "{\"etag\":\"Hk8X1SUqLbcWNYvUH7KwpkQFuvb\",\"key\":\"key06111-fetch-5\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "e1e2fccf-84c6-492a-8b91-aee7f1a7247a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key68919-fetch-7?label=my-second-mylabel", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key06111-fetch-7?label=my-second-mylabel", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b8d0f0bd-935f-46c7-bccd-8d260b7459ce", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:49:01 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgzMTI=;sn=228312", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7605e1a9-7c26-4658-b733-b0e3f88fc4fe", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:49:01 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"t7Z9DYCN09d6nJRWYJRgAfESY6J\"", - "x-ms-request-id" : "7605e1a9-7c26-4658-b733-b0e3f88fc4fe", - "Body" : "{\"etag\":\"t7Z9DYCN09d6nJRWYJRgAfESY6J\",\"key\":\"key68919-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:49:01+00:00\"}", - "x-ms-client-request-id" : "c4ffb9ae-d904-417d-b5a4-f3dbdfbab53e" - } + "Date" : "Wed, 02 Oct 2019 20:46:55 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "81b04418-2041-4c9e-8f59-df529553b0c8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxNDA=;sn=364140", + "x-ms-request-id" : "81b04418-2041-4c9e-8f59-df529553b0c8", + "Body" : "{\"etag\":\"O8QEMNDmAwBEjK0MS2NPbDB3dvL\",\"key\":\"key06111-fetch-7\",\"label\":\"my-second-mylabel\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:55+00:00\"}", + "x-ms-client-request-id" : "b8d0f0bd-935f-46c7-bccd-8d260b7459ce", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key68919", "7a46b696" ] + "variables" : [ "key06111", "d4616b5f" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json index 3b6f8e3e3e0b..5c109b0f54cf 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listSettingsWithPagination.json @@ -1,2448 +1,3162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-0?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-0?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1ec8ea1c-5c49-4aeb-a6f1-32287f3627ea", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTI=;sn=242212", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6bcadf9e-95a0-4033-8e4c-4735b06724d7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ne0uSOuqbzgXs0hkb3piwaLPGe9\"", - "x-ms-request-id" : "6bcadf9e-95a0-4033-8e4c-4735b06724d7", - "Body" : "{\"etag\":\"ne0uSOuqbzgXs0hkb3piwaLPGe9\",\"key\":\"key30682-0\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "1ff2d06e-7f9f-4cab-b24a-f8590caa82ec" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f4102a4b-92e7-4aa4-a92f-32a667079756", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"C8Mie18fbd3g3qocMDz7085nlFK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTk=;sn=364019", + "x-ms-request-id" : "f4102a4b-92e7-4aa4-a92f-32a667079756", + "Body" : "{\"etag\":\"C8Mie18fbd3g3qocMDz7085nlFK\",\"key\":\"key99304-0\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1ec8ea1c-5c49-4aeb-a6f1-32287f3627ea", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-1?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-1?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c32aa798-3613-4e09-826c-50be47e89a78", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTM=;sn=242213", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e4062479-2c12-422d-81c4-39643ca25a8a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\"", - "x-ms-request-id" : "e4062479-2c12-422d-81c4-39643ca25a8a", - "Body" : "{\"etag\":\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\",\"key\":\"key30682-1\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "e70c0357-c981-4eca-a748-588ea807d552" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "677de709-4583-45cb-a324-becf7bc8409f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"zcSDaCY0xo37i8oN4HkbYWWfn5q\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjA=;sn=364020", + "x-ms-request-id" : "677de709-4583-45cb-a324-becf7bc8409f", + "Body" : "{\"etag\":\"zcSDaCY0xo37i8oN4HkbYWWfn5q\",\"key\":\"key99304-1\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "c32aa798-3613-4e09-826c-50be47e89a78", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-2?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-2?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bf341897-cd9e-4372-b187-5d9b1dbd144c", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTQ=;sn=242214", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "cde9f6fc-77a4-4229-96da-d704c52c18ca", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zDDobNOSiskvgJaNAH4ewhA8WxU\"", - "x-ms-request-id" : "cde9f6fc-77a4-4229-96da-d704c52c18ca", - "Body" : "{\"etag\":\"zDDobNOSiskvgJaNAH4ewhA8WxU\",\"key\":\"key30682-2\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "7392410e-5757-4afb-bb51-7b33867bb82a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "102af4e6-2b91-48ab-a8c7-4a05ec8864d4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"tU5gwhB5xGE2BvOdOxp94xUVVoh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjE=;sn=364021", + "x-ms-request-id" : "102af4e6-2b91-48ab-a8c7-4a05ec8864d4", + "Body" : "{\"etag\":\"tU5gwhB5xGE2BvOdOxp94xUVVoh\",\"key\":\"key99304-2\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "bf341897-cd9e-4372-b187-5d9b1dbd144c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-3?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-6?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0ed10ef7-eb57-43bf-91e5-c86b3014d26f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTU=;sn=242215", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a070212e-8aab-48d3-875b-2b5a1815cdb9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"H3SdzhY8Kyd906YGc9ZC7DhVktv\"", - "x-ms-request-id" : "a070212e-8aab-48d3-875b-2b5a1815cdb9", - "Body" : "{\"etag\":\"H3SdzhY8Kyd906YGc9ZC7DhVktv\",\"key\":\"key30682-3\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "50355e58-7dd1-451b-9bc4-85e62106ede7" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8a17de90-246c-4c60-9023-5efda63d0cf9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fOGNTUexfoNbo7dm0OeRCpfZH3w\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjI=;sn=364022", + "x-ms-request-id" : "8a17de90-246c-4c60-9023-5efda63d0cf9", + "Body" : "{\"etag\":\"fOGNTUexfoNbo7dm0OeRCpfZH3w\",\"key\":\"key99304-6\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0ed10ef7-eb57-43bf-91e5-c86b3014d26f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-4?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-3?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b5a55047-64ba-44aa-817a-4628a7dc2320", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTY=;sn=242216", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c10ec5af-eabf-4366-847d-ff88abd5fe01", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Ck1hamhYgyPCdPEhrz5deOzqR3r\"", - "x-ms-request-id" : "c10ec5af-eabf-4366-847d-ff88abd5fe01", - "Body" : "{\"etag\":\"Ck1hamhYgyPCdPEhrz5deOzqR3r\",\"key\":\"key30682-4\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "368119bf-8668-4069-925b-ef87beba0702" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "43b5c02e-f623-493f-bf02-42e7b1d43890", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjM=;sn=364023", + "x-ms-request-id" : "43b5c02e-f623-493f-bf02-42e7b1d43890", + "Body" : "{\"etag\":\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\",\"key\":\"key99304-3\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "b5a55047-64ba-44aa-817a-4628a7dc2320", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-5?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-9?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8f2e71b5-d6e4-4d3b-85c9-62903310ec0a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTc=;sn=242217", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e7a42f46-ba9f-45dc-acd6-26aab623cff5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"xvWXKxQ0DjgiOXdIppCSo918sCT\"", - "x-ms-request-id" : "e7a42f46-ba9f-45dc-acd6-26aab623cff5", - "Body" : "{\"etag\":\"xvWXKxQ0DjgiOXdIppCSo918sCT\",\"key\":\"key30682-5\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "ba697748-c29c-43bd-9211-052c4e54a95c" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f4cd4df4-ed00-4441-b932-84b9e86bdfdf", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rNOH45oAkFJoU1p6qs3x0jTGFvx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjQ=;sn=364024", + "x-ms-request-id" : "f4cd4df4-ed00-4441-b932-84b9e86bdfdf", + "Body" : "{\"etag\":\"rNOH45oAkFJoU1p6qs3x0jTGFvx\",\"key\":\"key99304-9\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "8f2e71b5-d6e4-4d3b-85c9-62903310ec0a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-6?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-7?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "73fa4303-631f-4636-b8f1-c443dd2c66ee", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTg=;sn=242218", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "77100525-2c81-4aaf-bfb9-adc92665b287", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\"", - "x-ms-request-id" : "77100525-2c81-4aaf-bfb9-adc92665b287", - "Body" : "{\"etag\":\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\",\"key\":\"key30682-6\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "004acf17-ba68-440d-b52b-66981b30c999" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cf8b4506-fb1c-4f56-bfd2-3409c66d58ab", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gdtsYdyUXr2p6f9aF49KO8tII0T\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjU=;sn=364025", + "x-ms-request-id" : "cf8b4506-fb1c-4f56-bfd2-3409c66d58ab", + "Body" : "{\"etag\":\"gdtsYdyUXr2p6f9aF49KO8tII0T\",\"key\":\"key99304-7\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "73fa4303-631f-4636-b8f1-c443dd2c66ee", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-7?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-4?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e873ed49-d39b-43a5-a67f-7df986b4b11a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMTk=;sn=242219", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0e9fa556-c0d0-48e6-8b20-e98301357f11", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\"", - "x-ms-request-id" : "0e9fa556-c0d0-48e6-8b20-e98301357f11", - "Body" : "{\"etag\":\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\",\"key\":\"key30682-7\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "057fba8f-b72d-4fd9-a447-dc50fd92661d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2ed397a4-4b02-441d-ace7-0ace3d303121", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xpnir6rxcSj0QU1QZdR7HcKyB9B\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjc=;sn=364027", + "x-ms-request-id" : "2ed397a4-4b02-441d-ace7-0ace3d303121", + "Body" : "{\"etag\":\"xpnir6rxcSj0QU1QZdR7HcKyB9B\",\"key\":\"key99304-4\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "e873ed49-d39b-43a5-a67f-7df986b4b11a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-8?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-11?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "36f1327c-e5bc-4b54-8e65-bfb127b9e701", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjA=;sn=242220", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d934f924-27df-40fe-9e74-6b0d21f62fd5", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zyEVdnrrWWaBJRJXvN3isfXeUV3\"", - "x-ms-request-id" : "d934f924-27df-40fe-9e74-6b0d21f62fd5", - "Body" : "{\"etag\":\"zyEVdnrrWWaBJRJXvN3isfXeUV3\",\"key\":\"key30682-8\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "841d773d-6d30-4fee-a3f9-6a747655724f" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a14ad271-e7d1-4051-9feb-aac904fd6518", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dcF4DabDrbvrIUIeORO1iJZmsAo\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjY=;sn=364026", + "x-ms-request-id" : "a14ad271-e7d1-4051-9feb-aac904fd6518", + "Body" : "{\"etag\":\"dcF4DabDrbvrIUIeORO1iJZmsAo\",\"key\":\"key99304-11\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "36f1327c-e5bc-4b54-8e65-bfb127b9e701", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-9?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-10?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "415bb2d9-636c-4c69-9f28-9c7417a77ba0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjE=;sn=242221", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "062bf931-fdd1-4030-b52b-2bc626d47817", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"qYMKx1USUtyKPoElfcgHSi26dli\"", - "x-ms-request-id" : "062bf931-fdd1-4030-b52b-2bc626d47817", - "Body" : "{\"etag\":\"qYMKx1USUtyKPoElfcgHSi26dli\",\"key\":\"key30682-9\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "17f58234-96fa-4329-82ce-c51376375bcc" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "436c2b4b-707a-4ef0-9a29-a2425351ef12", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjg=;sn=364028", + "x-ms-request-id" : "436c2b4b-707a-4ef0-9a29-a2425351ef12", + "Body" : "{\"etag\":\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\",\"key\":\"key99304-10\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "415bb2d9-636c-4c69-9f28-9c7417a77ba0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-10?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-12?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "17963f13-59d7-44db-ac10-60492248a1e8", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjI=;sn=242222", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "cad2b95e-71ca-485d-8dc4-2ab3e1e7786c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"dwzHhzXCHrqo2dg1exX0HlWbZeE\"", - "x-ms-request-id" : "cad2b95e-71ca-485d-8dc4-2ab3e1e7786c", - "Body" : "{\"etag\":\"dwzHhzXCHrqo2dg1exX0HlWbZeE\",\"key\":\"key30682-10\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "8b34a7d8-daff-48b0-8583-b2a5b36baf74" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9e2b2ab6-b1d6-4539-ac24-cbfedbb1b542", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3FSSBvO9Uy62EqgKY7BqMzl9gII\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMjk=;sn=364029", + "x-ms-request-id" : "9e2b2ab6-b1d6-4539-ac24-cbfedbb1b542", + "Body" : "{\"etag\":\"3FSSBvO9Uy62EqgKY7BqMzl9gII\",\"key\":\"key99304-12\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "17963f13-59d7-44db-ac10-60492248a1e8", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-11?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-5?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d09a9077-ebf3-4894-bc88-cb8c47e5e3af", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjM=;sn=242223", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "93719aa2-c101-4b23-8c18-51ee1e107e78", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"EguDa0BHuT9oVYVsITJBKq8R1no\"", - "x-ms-request-id" : "93719aa2-c101-4b23-8c18-51ee1e107e78", - "Body" : "{\"etag\":\"EguDa0BHuT9oVYVsITJBKq8R1no\",\"key\":\"key30682-11\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "111cce2b-ead5-4d5a-a213-1d1426f20202" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d6427481-0e18-44ee-bae8-bbbeba09f613", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B59roZdHRq5d01subExNMn6Z6UW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzA=;sn=364030", + "x-ms-request-id" : "d6427481-0e18-44ee-bae8-bbbeba09f613", + "Body" : "{\"etag\":\"B59roZdHRq5d01subExNMn6Z6UW\",\"key\":\"key99304-5\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d09a9077-ebf3-4894-bc88-cb8c47e5e3af", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-12?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-16?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c5a4bfe7-e812-4da0-baff-e123d273b0ec", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjQ=;sn=242224", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c9824d2e-316a-4796-80ae-c88e8331506e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"WbRik97b0pbOOR2tLFkCNQ5pxCa\"", - "x-ms-request-id" : "c9824d2e-316a-4796-80ae-c88e8331506e", - "Body" : "{\"etag\":\"WbRik97b0pbOOR2tLFkCNQ5pxCa\",\"key\":\"key30682-12\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "67caec8f-f0b8-45a4-8ce8-3547e55f953f" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4508a580-cd7e-4b05-b940-810e56997771", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dYHgeTjK8SH5A48mM1QcbNdGpb4\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzE=;sn=364031", + "x-ms-request-id" : "4508a580-cd7e-4b05-b940-810e56997771", + "Body" : "{\"etag\":\"dYHgeTjK8SH5A48mM1QcbNdGpb4\",\"key\":\"key99304-16\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "c5a4bfe7-e812-4da0-baff-e123d273b0ec", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-13?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-19?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0d03b269-338b-43fa-993a-3c18ea2070e1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjU=;sn=242225", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4afb52cd-8492-4a36-ad04-f08f6dd80471", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HShaKkJJptGYpZCBdItkZToCXyc\"", - "x-ms-request-id" : "4afb52cd-8492-4a36-ad04-f08f6dd80471", - "Body" : "{\"etag\":\"HShaKkJJptGYpZCBdItkZToCXyc\",\"key\":\"key30682-13\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "005e8df4-8a0c-4eaf-8983-838789ec2a84" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d95279a7-8167-4e81-9c56-b50227f102d4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzI=;sn=364032", + "x-ms-request-id" : "d95279a7-8167-4e81-9c56-b50227f102d4", + "Body" : "{\"etag\":\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\",\"key\":\"key99304-19\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0d03b269-338b-43fa-993a-3c18ea2070e1", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-14?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-8?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0598de6e-78c7-487f-9739-73b2a1bd2079", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjY=;sn=242226", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1a1bc016-349a-4f33-996a-79b766cceed0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"puLV7Bqbm7qH79yXSeAEXu31DH2\"", - "x-ms-request-id" : "1a1bc016-349a-4f33-996a-79b766cceed0", - "Body" : "{\"etag\":\"puLV7Bqbm7qH79yXSeAEXu31DH2\",\"key\":\"key30682-14\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "0eca1f8a-cb14-4737-9f4f-3d2098c9c5de" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "95e97a40-d4ae-4f92-8703-243acf25eb97", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1GV25hcOOdt2K1eHXe4UG0H5SEF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzM=;sn=364033", + "x-ms-request-id" : "95e97a40-d4ae-4f92-8703-243acf25eb97", + "Body" : "{\"etag\":\"1GV25hcOOdt2K1eHXe4UG0H5SEF\",\"key\":\"key99304-8\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0598de6e-78c7-487f-9739-73b2a1bd2079", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-15?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-18?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3e12fa0b-fdba-4472-b083-42b92369c662", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjc=;sn=242227", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4f48f2cc-0947-42fd-a0c0-41dfa3bcac8e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\"", - "x-ms-request-id" : "4f48f2cc-0947-42fd-a0c0-41dfa3bcac8e", - "Body" : "{\"etag\":\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\",\"key\":\"key30682-15\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "a4dae5ad-bcac-42c7-8935-d0b2276a62ec" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "93bcc7d1-57ff-45e9-884a-c7ab80e936a9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fHM8jJqubVBs0TkD7RvmJVWrtAf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzQ=;sn=364034", + "x-ms-request-id" : "93bcc7d1-57ff-45e9-884a-c7ab80e936a9", + "Body" : "{\"etag\":\"fHM8jJqubVBs0TkD7RvmJVWrtAf\",\"key\":\"key99304-18\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3e12fa0b-fdba-4472-b083-42b92369c662", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-16?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-21?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "88eb5fa4-ad8a-4f80-9a1b-33f1b01e9e8f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjg=;sn=242228", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8d38a2d9-8bfc-4920-ad88-e51c32b9bbe1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"okwjEwn4s5ycNqg5b81Jji4b0V6\"", - "x-ms-request-id" : "8d38a2d9-8bfc-4920-ad88-e51c32b9bbe1", - "Body" : "{\"etag\":\"okwjEwn4s5ycNqg5b81Jji4b0V6\",\"key\":\"key30682-16\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "a55dc9ff-1473-4eac-9147-81da3568998d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9a8f9f5d-b9fe-4897-955f-12fd75fe02b4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzU=;sn=364035", + "x-ms-request-id" : "9a8f9f5d-b9fe-4897-955f-12fd75fe02b4", + "Body" : "{\"etag\":\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\",\"key\":\"key99304-21\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "88eb5fa4-ad8a-4f80-9a1b-33f1b01e9e8f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-17?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-13?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c8cbbf65-7495-42b3-b3b7-adb351303c54", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMjk=;sn=242229", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ba9cca8a-e735-4346-b011-30ed87a5990d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"mXGbZdRG5rEK82UBEecJYnA8KuB\"", - "x-ms-request-id" : "ba9cca8a-e735-4346-b011-30ed87a5990d", - "Body" : "{\"etag\":\"mXGbZdRG5rEK82UBEecJYnA8KuB\",\"key\":\"key30682-17\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "dd45d5d8-be07-4f16-bf10-1f9f383816e7" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ac020f1b-1776-4c0d-a5bd-fb0ed12edf94", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dTeYepWo9SdrrSqi2LW0oUmBWHy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzY=;sn=364036", + "x-ms-request-id" : "ac020f1b-1776-4c0d-a5bd-fb0ed12edf94", + "Body" : "{\"etag\":\"dTeYepWo9SdrrSqi2LW0oUmBWHy\",\"key\":\"key99304-13\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "c8cbbf65-7495-42b3-b3b7-adb351303c54", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-18?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-26?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c27fc70-89c1-4759-9b7b-effbd7f06795", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzA=;sn=242230", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3b351e6a-3270-4851-85e3-26e80447d4f3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\"", - "x-ms-request-id" : "3b351e6a-3270-4851-85e3-26e80447d4f3", - "Body" : "{\"etag\":\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\",\"key\":\"key30682-18\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "97248e34-2784-4638-b3ca-d5633a0dd8af" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e29c41b7-d739-4843-802d-17f1882ff0a0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7fbSXemCWQJCwDZYb7vTEKnVsBy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzc=;sn=364037", + "x-ms-request-id" : "e29c41b7-d739-4843-802d-17f1882ff0a0", + "Body" : "{\"etag\":\"7fbSXemCWQJCwDZYb7vTEKnVsBy\",\"key\":\"key99304-26\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5c27fc70-89c1-4759-9b7b-effbd7f06795", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-19?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-14?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4b543eef-1716-48ae-9d24-78f27bd8fe42", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzE=;sn=242231", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1a72c2e3-c53d-4f61-a8ef-3867bf7b1f4a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"QhFGEYhJ6C9hismLxoyGNfpTMyo\"", - "x-ms-request-id" : "1a72c2e3-c53d-4f61-a8ef-3867bf7b1f4a", - "Body" : "{\"etag\":\"QhFGEYhJ6C9hismLxoyGNfpTMyo\",\"key\":\"key30682-19\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "53483e35-ba1f-4594-ba95-1fe614df7746" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f337ffc8-f336-4bca-b8e4-acc11c1a6ff5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fJMpFvCN3msURVcqpX8teoKndLy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzk=;sn=364039", + "x-ms-request-id" : "f337ffc8-f336-4bca-b8e4-acc11c1a6ff5", + "Body" : "{\"etag\":\"fJMpFvCN3msURVcqpX8teoKndLy\",\"key\":\"key99304-14\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "4b543eef-1716-48ae-9d24-78f27bd8fe42", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-20?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-20?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3383fee1-d5d2-4088-bf21-fb8b10da2bfb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzI=;sn=242232", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3ffb2329-36e5-4702-a34f-21c9882192e7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"k9xvLBAk324MLXJCVfh6lT47xE1\"", - "x-ms-request-id" : "3ffb2329-36e5-4702-a34f-21c9882192e7", - "Body" : "{\"etag\":\"k9xvLBAk324MLXJCVfh6lT47xE1\",\"key\":\"key30682-20\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "9690f00f-64cf-426e-8727-b999b854a98f" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6d9b2ad8-46bb-43cc-a52c-f11e6fa53268", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1DuljhivvbJpePSFhYhFMUsy3mK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMzg=;sn=364038", + "x-ms-request-id" : "6d9b2ad8-46bb-43cc-a52c-f11e6fa53268", + "Body" : "{\"etag\":\"1DuljhivvbJpePSFhYhFMUsy3mK\",\"key\":\"key99304-20\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3383fee1-d5d2-4088-bf21-fb8b10da2bfb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-21?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-32?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "59d645e8-696d-403a-aa7d-ca85c1a8c875", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzM=;sn=242233", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5cc39753-7302-4bbf-97f4-6b28cd641fe7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"p1jK1mJHpgDcDxwsdEg0E8IR29d\"", - "x-ms-request-id" : "5cc39753-7302-4bbf-97f4-6b28cd641fe7", - "Body" : "{\"etag\":\"p1jK1mJHpgDcDxwsdEg0E8IR29d\",\"key\":\"key30682-21\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "4d29aa83-2d1c-4530-9a57-069da3e8e437" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ec666c98-93a2-47d0-bb54-b103dc15f36d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xzzBZCVM73W4CDp2QBKrcUgSY72\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDA=;sn=364040", + "x-ms-request-id" : "ec666c98-93a2-47d0-bb54-b103dc15f36d", + "Body" : "{\"etag\":\"xzzBZCVM73W4CDp2QBKrcUgSY72\",\"key\":\"key99304-32\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "59d645e8-696d-403a-aa7d-ca85c1a8c875", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-22?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-22?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5208bcbb-418f-42c4-b262-1c8ae8effd1d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:19 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzQ=;sn=242234", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f7c08702-c882-473a-ab81-41a36ae3e967", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\"", - "x-ms-request-id" : "f7c08702-c882-473a-ab81-41a36ae3e967", - "Body" : "{\"etag\":\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\",\"key\":\"key30682-22\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "9fdcdb0b-ea4e-4818-b7c7-223dc65e161c" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b589389d-65c0-4b65-938b-ca57125850d3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"po1yraeGOKA5dtxocBCIU6uQxPS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDE=;sn=364041", + "x-ms-request-id" : "b589389d-65c0-4b65-938b-ca57125850d3", + "Body" : "{\"etag\":\"po1yraeGOKA5dtxocBCIU6uQxPS\",\"key\":\"key99304-22\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5208bcbb-418f-42c4-b262-1c8ae8effd1d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-23?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-15?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b2856767-ade8-4bde-9fa5-36e59c9b8b12", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzU=;sn=242235", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0b46090d-c83f-4e79-885a-a48b38c3dbe8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"PwgAPk2NfpWKXAWAue2iR6FIhMG\"", - "x-ms-request-id" : "0b46090d-c83f-4e79-885a-a48b38c3dbe8", - "Body" : "{\"etag\":\"PwgAPk2NfpWKXAWAue2iR6FIhMG\",\"key\":\"key30682-23\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "65d078a6-4647-41f5-94cf-f4d638714a1b" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "466a8d10-696f-4a15-903a-48a5e4d63b50", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDI=;sn=364042", + "x-ms-request-id" : "466a8d10-696f-4a15-903a-48a5e4d63b50", + "Body" : "{\"etag\":\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\",\"key\":\"key99304-15\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "b2856767-ade8-4bde-9fa5-36e59c9b8b12", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-24?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-34?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "da2bbb5a-a492-46ec-8d69-470e48b14efa", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzY=;sn=242236", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c0625c15-f7a4-44da-906d-f65919606bc9", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"x1AGhrkI8UzmFAahtWUZjN1VtKH\"", - "x-ms-request-id" : "c0625c15-f7a4-44da-906d-f65919606bc9", - "Body" : "{\"etag\":\"x1AGhrkI8UzmFAahtWUZjN1VtKH\",\"key\":\"key30682-24\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "b4f67361-207c-45f6-a17d-cf14ad840d18" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "02e70e3c-66cd-4f57-a498-35cb143dbab0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDM=;sn=364043", + "x-ms-request-id" : "02e70e3c-66cd-4f57-a498-35cb143dbab0", + "Body" : "{\"etag\":\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\",\"key\":\"key99304-34\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "da2bbb5a-a492-46ec-8d69-470e48b14efa", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-25?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-23?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9f9696e1-e9fd-4284-83be-ec65523f9d5a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzc=;sn=242237", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a7d61ad7-7a15-4cf8-bb65-610d783498e8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"UkKaBp8CPSvnWrNAouPT288iKtj\"", - "x-ms-request-id" : "a7d61ad7-7a15-4cf8-bb65-610d783498e8", - "Body" : "{\"etag\":\"UkKaBp8CPSvnWrNAouPT288iKtj\",\"key\":\"key30682-25\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "2ff9ecd2-4ce6-4454-9139-31f16c429d7d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "621aa7c1-452e-4c39-bdb8-a2c76819726f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDQ=;sn=364044", + "x-ms-request-id" : "621aa7c1-452e-4c39-bdb8-a2c76819726f", + "Body" : "{\"etag\":\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\",\"key\":\"key99304-23\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "9f9696e1-e9fd-4284-83be-ec65523f9d5a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-26?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-17?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1e3f3982-d49a-4ef5-9397-8f2d85d4af9e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzg=;sn=242238", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "53cfc1d7-4021-4cda-8301-677b65326b01", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\"", - "x-ms-request-id" : "53cfc1d7-4021-4cda-8301-677b65326b01", - "Body" : "{\"etag\":\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\",\"key\":\"key30682-26\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "7b5586b9-3e88-4c07-9a12-1d4e706eabed" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a27941fd-2cb9-41a0-a24c-3fdfdfd06f0f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"hPfaUnC0G3LWYgn9vmL19K55fEj\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDU=;sn=364045", + "x-ms-request-id" : "a27941fd-2cb9-41a0-a24c-3fdfdfd06f0f", + "Body" : "{\"etag\":\"hPfaUnC0G3LWYgn9vmL19K55fEj\",\"key\":\"key99304-17\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1e3f3982-d49a-4ef5-9397-8f2d85d4af9e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-27?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-24?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a7a54716-1565-43c3-9148-0a72cd470772", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyMzk=;sn=242239", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b22be587-3ca9-46ef-917a-f886218f76a3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\"", - "x-ms-request-id" : "b22be587-3ca9-46ef-917a-f886218f76a3", - "Body" : "{\"etag\":\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\",\"key\":\"key30682-27\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "f7d05d9d-7d03-48dd-a31c-bd3178cc619a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4df8c060-7955-4738-85c1-877d22766382", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"hiSIedELpPQuVc6cdfv2cMXyqzl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDY=;sn=364046", + "x-ms-request-id" : "4df8c060-7955-4738-85c1-877d22766382", + "Body" : "{\"etag\":\"hiSIedELpPQuVc6cdfv2cMXyqzl\",\"key\":\"key99304-24\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "a7a54716-1565-43c3-9148-0a72cd470772", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-28?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-35?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ad538dee-f86a-44ff-bf27-c99d545e798d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDA=;sn=242240", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5a947b36-0db4-432c-881a-cb6efec158f1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\"", - "x-ms-request-id" : "5a947b36-0db4-432c-881a-cb6efec158f1", - "Body" : "{\"etag\":\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\",\"key\":\"key30682-28\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "492b2338-f210-4ad2-846d-366a9cd91f4e" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2841830e-4e85-4eec-a511-9c57048ccd87", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qcredQGvg0fG58d3HhZPhXfk80e\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDc=;sn=364047", + "x-ms-request-id" : "2841830e-4e85-4eec-a511-9c57048ccd87", + "Body" : "{\"etag\":\"qcredQGvg0fG58d3HhZPhXfk80e\",\"key\":\"key99304-35\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "ad538dee-f86a-44ff-bf27-c99d545e798d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-29?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-29?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3a3af45f-f076-40af-8c4b-b80c42074018", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDE=;sn=242241", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e358ba56-caaa-4ec4-939d-fcf58f0413f0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\"", - "x-ms-request-id" : "e358ba56-caaa-4ec4-939d-fcf58f0413f0", - "Body" : "{\"etag\":\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\",\"key\":\"key30682-29\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "5c8b207f-4ba7-4f8f-a7b9-136cb28530b2" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5feff5e0-a63a-43ab-bc88-0c71c0cc0626", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"nTu9DJCdASfscLZ6SkkMYUtYGcs\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDg=;sn=364048", + "x-ms-request-id" : "5feff5e0-a63a-43ab-bc88-0c71c0cc0626", + "Body" : "{\"etag\":\"nTu9DJCdASfscLZ6SkkMYUtYGcs\",\"key\":\"key99304-29\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3a3af45f-f076-40af-8c4b-b80c42074018", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-30?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-25?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "38806de8-5d47-4619-ac2f-023ea420eef5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDI=;sn=242242", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "2a4916ac-6679-495b-8942-e1733e4d0340", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\"", - "x-ms-request-id" : "2a4916ac-6679-495b-8942-e1733e4d0340", - "Body" : "{\"etag\":\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\",\"key\":\"key30682-30\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "e06e9878-8eb7-4449-be77-a9fb5bb3cf7a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "18f82c9f-e6f8-4259-b623-3f292a60e1d4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WfSnMjEhy7PkXepHaJMcVINVCqn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNDk=;sn=364049", + "x-ms-request-id" : "18f82c9f-e6f8-4259-b623-3f292a60e1d4", + "Body" : "{\"etag\":\"WfSnMjEhy7PkXepHaJMcVINVCqn\",\"key\":\"key99304-25\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "38806de8-5d47-4619-ac2f-023ea420eef5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-31?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-31?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9338eec7-93cf-4125-921f-b18b4e405765", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDM=;sn=242243", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c822a7fb-9b0e-42f3-91e6-c0b1f6bf3128", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"QuIfGsQXupHwlc1kA06Xovtwhu0\"", - "x-ms-request-id" : "c822a7fb-9b0e-42f3-91e6-c0b1f6bf3128", - "Body" : "{\"etag\":\"QuIfGsQXupHwlc1kA06Xovtwhu0\",\"key\":\"key30682-31\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "68cb8ec9-72f8-48ec-8979-2943f6ad4dd9" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "17c5c9a7-2902-4156-b38f-864ae4484677", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"y1nQqsDlgv6h36rBXGlEe4oRtMq\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTA=;sn=364050", + "x-ms-request-id" : "17c5c9a7-2902-4156-b38f-864ae4484677", + "Body" : "{\"etag\":\"y1nQqsDlgv6h36rBXGlEe4oRtMq\",\"key\":\"key99304-31\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "9338eec7-93cf-4125-921f-b18b4e405765", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-32?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-38?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8be6a67a-63f9-4b51-9878-a5e7ae9db7a3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDQ=;sn=242244", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "299c8e38-43db-4d58-9b3e-4f7986fceef4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\"", - "x-ms-request-id" : "299c8e38-43db-4d58-9b3e-4f7986fceef4", - "Body" : "{\"etag\":\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\",\"key\":\"key30682-32\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "53645677-b5fb-4805-b3e5-5ac96c4e4fbd" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "615f21fc-a05c-4599-8836-214d1342c75d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XDnfiflnoBCOb2rxleMb0yxsSgn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTE=;sn=364051", + "x-ms-request-id" : "615f21fc-a05c-4599-8836-214d1342c75d", + "Body" : "{\"etag\":\"XDnfiflnoBCOb2rxleMb0yxsSgn\",\"key\":\"key99304-38\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "8be6a67a-63f9-4b51-9878-a5e7ae9db7a3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-33?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-27?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "411a26ba-5690-49c9-94e4-3028d9c33b37", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDU=;sn=242245", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "55f887f6-7410-4ae5-a4db-2de827b60133", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\"", - "x-ms-request-id" : "55f887f6-7410-4ae5-a4db-2de827b60133", - "Body" : "{\"etag\":\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\",\"key\":\"key30682-33\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "724495f4-2e80-4c4b-bd8c-8e377e4a4e6a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e7993981-75f3-4637-b620-e1a7ca6990c9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"VJ01OzgangfOtCXDT2EH3v9bjgq\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTI=;sn=364052", + "x-ms-request-id" : "e7993981-75f3-4637-b620-e1a7ca6990c9", + "Body" : "{\"etag\":\"VJ01OzgangfOtCXDT2EH3v9bjgq\",\"key\":\"key99304-27\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "411a26ba-5690-49c9-94e4-3028d9c33b37", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-34?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-37?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0fa5cf7e-70a4-4122-85ed-8183bc4b4ebf", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDY=;sn=242246", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e04b048d-b51b-4684-89c8-12a7554c7b6d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\"", - "x-ms-request-id" : "e04b048d-b51b-4684-89c8-12a7554c7b6d", - "Body" : "{\"etag\":\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\",\"key\":\"key30682-34\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "90f13d71-94c2-4237-88f5-68674f0e4f0d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3d167bb1-c6ba-491e-baaf-392d030318d0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"IL8tvingcsLl0KiOSfUlONW9ks6\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTQ=;sn=364054", + "x-ms-request-id" : "3d167bb1-c6ba-491e-baaf-392d030318d0", + "Body" : "{\"etag\":\"IL8tvingcsLl0KiOSfUlONW9ks6\",\"key\":\"key99304-37\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0fa5cf7e-70a4-4122-85ed-8183bc4b4ebf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-35?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-30?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2cebe3fc-0240-4281-ae00-fc1fd1f95c54", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDc=;sn=242247", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1423ac2c-ea13-4ca1-8cc4-51dc3ac800bd", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\"", - "x-ms-request-id" : "1423ac2c-ea13-4ca1-8cc4-51dc3ac800bd", - "Body" : "{\"etag\":\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\",\"key\":\"key30682-35\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "de728670-80aa-4f89-8412-0b8abc5388dc" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f3ead5f8-ef42-489d-ae76-59ab28e1b1c4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4ctkyo5owukHVbIeoDuSThqKkOG\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTM=;sn=364053", + "x-ms-request-id" : "f3ead5f8-ef42-489d-ae76-59ab28e1b1c4", + "Body" : "{\"etag\":\"4ctkyo5owukHVbIeoDuSThqKkOG\",\"key\":\"key99304-30\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "2cebe3fc-0240-4281-ae00-fc1fd1f95c54", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-36?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-28?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d9beb732-20d2-4ec4-ac7c-6c012d60a3f3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDg=;sn=242248", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "17cb0d64-ae12-49c3-b524-0c71ff61cf6d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"E94oA2ueBIlDidwfp3dj0cyMdwp\"", - "x-ms-request-id" : "17cb0d64-ae12-49c3-b524-0c71ff61cf6d", - "Body" : "{\"etag\":\"E94oA2ueBIlDidwfp3dj0cyMdwp\",\"key\":\"key30682-36\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "f147bdf2-f6f5-4d83-aac6-8889b46cdb4d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dac698bd-8b63-4be7-b8c2-af134a534568", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"8UyvCNIG0Nd1jVH31wJB6nYX611\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTU=;sn=364055", + "x-ms-request-id" : "dac698bd-8b63-4be7-b8c2-af134a534568", + "Body" : "{\"etag\":\"8UyvCNIG0Nd1jVH31wJB6nYX611\",\"key\":\"key99304-28\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d9beb732-20d2-4ec4-ac7c-6c012d60a3f3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-37?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-36?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "57f83766-8ef6-445b-816d-cf0a105ce258", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNDk=;sn=242249", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a2f20ca3-c51b-4fc2-9e2d-a4bb650f4ffb", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\"", - "x-ms-request-id" : "a2f20ca3-c51b-4fc2-9e2d-a4bb650f4ffb", - "Body" : "{\"etag\":\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\",\"key\":\"key30682-37\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "ff83df4f-c26b-405d-a7b3-5c2071c15a21" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4f9d2cef-71f5-48d4-aa26-aa415945efd9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"yk0PX4lggfUZrvCxqNKoiga9c6x\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTc=;sn=364057", + "x-ms-request-id" : "4f9d2cef-71f5-48d4-aa26-aa415945efd9", + "Body" : "{\"etag\":\"yk0PX4lggfUZrvCxqNKoiga9c6x\",\"key\":\"key99304-36\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "57f83766-8ef6-445b-816d-cf0a105ce258", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-38?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-41?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1f274119-b920-4416-9bbe-dd2938e1a78d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTA=;sn=242250", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "70b57616-9bd0-4852-a4ae-b29f5632c328", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\"", - "x-ms-request-id" : "70b57616-9bd0-4852-a4ae-b29f5632c328", - "Body" : "{\"etag\":\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\",\"key\":\"key30682-38\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "fb91e50d-574e-4202-88d3-c75eab3befde" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7b2b5396-a2cc-4135-a56f-4637cb341227", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTY=;sn=364056", + "x-ms-request-id" : "7b2b5396-a2cc-4135-a56f-4637cb341227", + "Body" : "{\"etag\":\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\",\"key\":\"key99304-41\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1f274119-b920-4416-9bbe-dd2938e1a78d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-39?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-33?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5f94cd8a-e22c-4655-aa6f-dea79735ba44", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTE=;sn=242251", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "aca098c3-bb3e-4dc6-9b5e-7b2139119151", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FkOkoWQf7XMOwzxuh34QXmlMxdz\"", - "x-ms-request-id" : "aca098c3-bb3e-4dc6-9b5e-7b2139119151", - "Body" : "{\"etag\":\"FkOkoWQf7XMOwzxuh34QXmlMxdz\",\"key\":\"key30682-39\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "0f078840-34c1-495b-9ce0-b622cc622c49" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "49767877-4ee3-4e04-824e-5754e36cd3a4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"uazmz2bqY1jMQqmu96hyaGmV6WF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTg=;sn=364058", + "x-ms-request-id" : "49767877-4ee3-4e04-824e-5754e36cd3a4", + "Body" : "{\"etag\":\"uazmz2bqY1jMQqmu96hyaGmV6WF\",\"key\":\"key99304-33\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5f94cd8a-e22c-4655-aa6f-dea79735ba44", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-40?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-44?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6869ba79-c533-4bf4-988e-edeae47ef982", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTI=;sn=242252", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "089df753-5ed3-415c-bff2-13b22b166e86", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"br3NFDJGay40IGp791lFXcWbxqe\"", - "x-ms-request-id" : "089df753-5ed3-415c-bff2-13b22b166e86", - "Body" : "{\"etag\":\"br3NFDJGay40IGp791lFXcWbxqe\",\"key\":\"key30682-40\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "e44947c0-958e-4757-9296-4b0c9bd3b0f0" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "59de09eb-ca48-4ad3-876c-e5fef1464d95", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"bqqttoLB96T9XocpWRMQknOlRiS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNTk=;sn=364059", + "x-ms-request-id" : "59de09eb-ca48-4ad3-876c-e5fef1464d95", + "Body" : "{\"etag\":\"bqqttoLB96T9XocpWRMQknOlRiS\",\"key\":\"key99304-44\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "6869ba79-c533-4bf4-988e-edeae47ef982", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-41?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-42?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2f5e3a96-dee0-4bf6-83ca-179a4f708025", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTM=;sn=242253", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f1211266-14a7-43a2-b793-f4cd8f3bb14c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"speDXMCgF8XpQzurleTh0L2tnVs\"", - "x-ms-request-id" : "f1211266-14a7-43a2-b793-f4cd8f3bb14c", - "Body" : "{\"etag\":\"speDXMCgF8XpQzurleTh0L2tnVs\",\"key\":\"key30682-41\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "e0f723ef-f354-4d17-acae-371087045027" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "38ffd429-2e8c-4ff8-ba04-81612d7b8808", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"a4XS5iIhl0phasW0aCdhuq40VWd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjA=;sn=364060", + "x-ms-request-id" : "38ffd429-2e8c-4ff8-ba04-81612d7b8808", + "Body" : "{\"etag\":\"a4XS5iIhl0phasW0aCdhuq40VWd\",\"key\":\"key99304-42\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "2f5e3a96-dee0-4bf6-83ca-179a4f708025", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-42?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-39?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4b7e5b9d-d10f-412e-87bf-ee471a4ab620", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTQ=;sn=242254", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "40d44843-8374-4d62-8a5a-27a2626e9803", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\"", - "x-ms-request-id" : "40d44843-8374-4d62-8a5a-27a2626e9803", - "Body" : "{\"etag\":\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\",\"key\":\"key30682-42\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "76abbfbf-5b0b-4624-88b1-014110c55538" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cac3de18-fb24-4024-9c3c-58c02365c9c3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"40qJDdNv0bZrcBswtJnkAiJ7oVa\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjE=;sn=364061", + "x-ms-request-id" : "cac3de18-fb24-4024-9c3c-58c02365c9c3", + "Body" : "{\"etag\":\"40qJDdNv0bZrcBswtJnkAiJ7oVa\",\"key\":\"key99304-39\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "4b7e5b9d-d10f-412e-87bf-ee471a4ab620", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-43?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-45?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5b38494d-e5e1-49d6-8afe-70960204b270", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTU=;sn=242255", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6609d912-c985-49b0-82cb-820b8128122b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\"", - "x-ms-request-id" : "6609d912-c985-49b0-82cb-820b8128122b", - "Body" : "{\"etag\":\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\",\"key\":\"key30682-43\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "b8147a88-c354-4bc1-85d5-ff06eb75eaf3" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "74e2c2b5-70c1-49f0-8128-8e20d5422428", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jAJUTj2G28FEtmEvxojY9icmfLY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjI=;sn=364062", + "x-ms-request-id" : "74e2c2b5-70c1-49f0-8128-8e20d5422428", + "Body" : "{\"etag\":\"jAJUTj2G28FEtmEvxojY9icmfLY\",\"key\":\"key99304-45\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5b38494d-e5e1-49d6-8afe-70960204b270", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-44?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-43?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c70927f7-8196-4544-9c9c-bf7fa37f374b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTY=;sn=242256", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "30bd9869-a77a-4bad-87bc-9ae8c528d889", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"cREv0TieVnL8rnJbw16HEXzYoXg\"", - "x-ms-request-id" : "30bd9869-a77a-4bad-87bc-9ae8c528d889", - "Body" : "{\"etag\":\"cREv0TieVnL8rnJbw16HEXzYoXg\",\"key\":\"key30682-44\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "1d24170c-4e9c-4bbb-8dad-92a52f41a86a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "87c1d2be-8ff0-441c-938e-d18e6a171569", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gs3W1llAsuBhdJRHn4mfePSUbmk\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjM=;sn=364063", + "x-ms-request-id" : "87c1d2be-8ff0-441c-938e-d18e6a171569", + "Body" : "{\"etag\":\"gs3W1llAsuBhdJRHn4mfePSUbmk\",\"key\":\"key99304-43\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "c70927f7-8196-4544-9c9c-bf7fa37f374b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-45?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-40?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e5102069-ddf8-49ca-9b2e-9ab2a0044372", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTc=;sn=242257", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "24d5f353-b484-4053-a29c-a7656e4d6849", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\"", - "x-ms-request-id" : "24d5f353-b484-4053-a29c-a7656e4d6849", - "Body" : "{\"etag\":\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\",\"key\":\"key30682-45\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "36a941a1-52cd-468f-91b4-cb70beec62b0" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2c4bccbb-2b68-4440-b3fb-3fbd7c85415e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7rToRRTdSivgowPf9oVX3V2zey0\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjQ=;sn=364064", + "x-ms-request-id" : "2c4bccbb-2b68-4440-b3fb-3fbd7c85415e", + "Body" : "{\"etag\":\"7rToRRTdSivgowPf9oVX3V2zey0\",\"key\":\"key99304-40\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "e5102069-ddf8-49ca-9b2e-9ab2a0044372", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-46?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-46?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7559ad06-9a87-461a-9f43-86e085c74eea", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTg=;sn=242258", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f272c799-e468-414d-9dc5-08cec24157e4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\"", - "x-ms-request-id" : "f272c799-e468-414d-9dc5-08cec24157e4", - "Body" : "{\"etag\":\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\",\"key\":\"key30682-46\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "5b2f4acb-a6ab-40a6-b8c9-2e92b23d23e0" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ca2062b1-59db-4b2c-8d31-78d60c0842b5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xY1cWj6d0CgY2lj34EB0nMUUFXX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjU=;sn=364065", + "x-ms-request-id" : "ca2062b1-59db-4b2c-8d31-78d60c0842b5", + "Body" : "{\"etag\":\"xY1cWj6d0CgY2lj34EB0nMUUFXX\",\"key\":\"key99304-46\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "7559ad06-9a87-461a-9f43-86e085c74eea", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-47?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-49?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1642f93f-93e7-4db4-a4f4-5df4464ce150", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNTk=;sn=242259", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "9565b6a7-35d2-48d9-818b-8f9e0593b779", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rpwfVtxCYrEnBdz749ciQpd4DEl\"", - "x-ms-request-id" : "9565b6a7-35d2-48d9-818b-8f9e0593b779", - "Body" : "{\"etag\":\"rpwfVtxCYrEnBdz749ciQpd4DEl\",\"key\":\"key30682-47\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "7b5efcc3-577e-4dfd-8cd7-9c6995c823c0" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ae54f89b-2a1a-4e76-bf37-a31fd2999ae6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"j7wRmaYYhIbCdxn9F6AoX1soRpA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjY=;sn=364066", + "x-ms-request-id" : "ae54f89b-2a1a-4e76-bf37-a31fd2999ae6", + "Body" : "{\"etag\":\"j7wRmaYYhIbCdxn9F6AoX1soRpA\",\"key\":\"key99304-49\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1642f93f-93e7-4db4-a4f4-5df4464ce150", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-48?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-48?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ebaf4d6a-67a7-4949-9c1a-8fde074b646d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjA=;sn=242260", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ff2c55b2-c848-4bb7-b6d8-034808a11fba", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\"", - "x-ms-request-id" : "ff2c55b2-c848-4bb7-b6d8-034808a11fba", - "Body" : "{\"etag\":\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\",\"key\":\"key30682-48\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "09a6cc02-8988-4ea2-b891-0fc609ce1fc4" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "49537e4e-a880-495c-bd1d-8c5738111ee6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjc=;sn=364067", + "x-ms-request-id" : "49537e4e-a880-495c-bd1d-8c5738111ee6", + "Body" : "{\"etag\":\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\",\"key\":\"key99304-48\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "ebaf4d6a-67a7-4949-9c1a-8fde074b646d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-49?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-47?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "446fd77d-ad67-4dbe-9239-70fcb949f3e5", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjE=;sn=242261", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d24b5b93-4a1e-4a2f-a409-add53ddf620d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"vsoyJe2EVEkkPkJphvFe5Bqp8al\"", - "x-ms-request-id" : "d24b5b93-4a1e-4a2f-a409-add53ddf620d", - "Body" : "{\"etag\":\"vsoyJe2EVEkkPkJphvFe5Bqp8al\",\"key\":\"key30682-49\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "8dd58251-2c38-47b2-9415-51d59d8e9f4e" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2dec16af-122c-4deb-b666-7e3be9250800", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5MMFywEspSKzXLyEjpsvUY7HRzR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjg=;sn=364068", + "x-ms-request-id" : "2dec16af-122c-4deb-b666-7e3be9250800", + "Body" : "{\"etag\":\"5MMFywEspSKzXLyEjpsvUY7HRzR\",\"key\":\"key99304-47\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "446fd77d-ad67-4dbe-9239-70fcb949f3e5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key30682-%2a&label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key99304-%2a&label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "150b77e2-dd46-4a67-8069-0eb8209a9386", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:20 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjE=;sn=242261", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7f5eac1b-1ced-48db-9bc1-f1cf9ba08da2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "7f5eac1b-1ced-48db-9bc1-f1cf9ba08da2", - "Body" : "{\"items\":[{\"etag\":\"ne0uSOuqbzgXs0hkb3piwaLPGe9\",\"key\":\"key30682-0\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\",\"key\":\"key30682-1\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"dwzHhzXCHrqo2dg1exX0HlWbZeE\",\"key\":\"key30682-10\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"EguDa0BHuT9oVYVsITJBKq8R1no\",\"key\":\"key30682-11\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"WbRik97b0pbOOR2tLFkCNQ5pxCa\",\"key\":\"key30682-12\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"HShaKkJJptGYpZCBdItkZToCXyc\",\"key\":\"key30682-13\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"puLV7Bqbm7qH79yXSeAEXu31DH2\",\"key\":\"key30682-14\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\",\"key\":\"key30682-15\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"okwjEwn4s5ycNqg5b81Jji4b0V6\",\"key\":\"key30682-16\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"mXGbZdRG5rEK82UBEecJYnA8KuB\",\"key\":\"key30682-17\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\",\"key\":\"key30682-18\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"QhFGEYhJ6C9hismLxoyGNfpTMyo\",\"key\":\"key30682-19\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"zDDobNOSiskvgJaNAH4ewhA8WxU\",\"key\":\"key30682-2\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"k9xvLBAk324MLXJCVfh6lT47xE1\",\"key\":\"key30682-20\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"p1jK1mJHpgDcDxwsdEg0E8IR29d\",\"key\":\"key30682-21\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\",\"key\":\"key30682-22\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"PwgAPk2NfpWKXAWAue2iR6FIhMG\",\"key\":\"key30682-23\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"x1AGhrkI8UzmFAahtWUZjN1VtKH\",\"key\":\"key30682-24\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"UkKaBp8CPSvnWrNAouPT288iKtj\",\"key\":\"key30682-25\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\",\"key\":\"key30682-26\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\",\"key\":\"key30682-27\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\",\"key\":\"key30682-28\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\",\"key\":\"key30682-29\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"H3SdzhY8Kyd906YGc9ZC7DhVktv\",\"key\":\"key30682-3\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\",\"key\":\"key30682-30\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"QuIfGsQXupHwlc1kA06Xovtwhu0\",\"key\":\"key30682-31\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\",\"key\":\"key30682-32\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\",\"key\":\"key30682-33\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\",\"key\":\"key30682-34\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\",\"key\":\"key30682-35\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"E94oA2ueBIlDidwfp3dj0cyMdwp\",\"key\":\"key30682-36\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\",\"key\":\"key30682-37\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\",\"key\":\"key30682-38\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"FkOkoWQf7XMOwzxuh34QXmlMxdz\",\"key\":\"key30682-39\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"Ck1hamhYgyPCdPEhrz5deOzqR3r\",\"key\":\"key30682-4\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"br3NFDJGay40IGp791lFXcWbxqe\",\"key\":\"key30682-40\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"speDXMCgF8XpQzurleTh0L2tnVs\",\"key\":\"key30682-41\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\",\"key\":\"key30682-42\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\",\"key\":\"key30682-43\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"cREv0TieVnL8rnJbw16HEXzYoXg\",\"key\":\"key30682-44\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\",\"key\":\"key30682-45\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\",\"key\":\"key30682-46\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"rpwfVtxCYrEnBdz749ciQpd4DEl\",\"key\":\"key30682-47\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\",\"key\":\"key30682-48\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"vsoyJe2EVEkkPkJphvFe5Bqp8al\",\"key\":\"key30682-49\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"xvWXKxQ0DjgiOXdIppCSo918sCT\",\"key\":\"key30682-5\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\",\"key\":\"key30682-6\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\",\"key\":\"key30682-7\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"zyEVdnrrWWaBJRJXvN3isfXeUV3\",\"key\":\"key30682-8\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"qYMKx1USUtyKPoElfcgHSi26dli\",\"key\":\"key30682-9\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}]}", - "x-ms-client-request-id" : "65aa27de-488d-46c4-9b11-390b56e51905" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d211023f-e97c-4b26-bfda-e193acb51235", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjg=;sn=364068", + "x-ms-request-id" : "d211023f-e97c-4b26-bfda-e193acb51235", + "Body" : "{\"items\":[{\"etag\":\"C8Mie18fbd3g3qocMDz7085nlFK\",\"key\":\"key99304-0\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"zcSDaCY0xo37i8oN4HkbYWWfn5q\",\"key\":\"key99304-1\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\",\"key\":\"key99304-10\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dcF4DabDrbvrIUIeORO1iJZmsAo\",\"key\":\"key99304-11\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"3FSSBvO9Uy62EqgKY7BqMzl9gII\",\"key\":\"key99304-12\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dTeYepWo9SdrrSqi2LW0oUmBWHy\",\"key\":\"key99304-13\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fJMpFvCN3msURVcqpX8teoKndLy\",\"key\":\"key99304-14\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\",\"key\":\"key99304-15\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dYHgeTjK8SH5A48mM1QcbNdGpb4\",\"key\":\"key99304-16\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"hPfaUnC0G3LWYgn9vmL19K55fEj\",\"key\":\"key99304-17\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fHM8jJqubVBs0TkD7RvmJVWrtAf\",\"key\":\"key99304-18\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\",\"key\":\"key99304-19\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"tU5gwhB5xGE2BvOdOxp94xUVVoh\",\"key\":\"key99304-2\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"1DuljhivvbJpePSFhYhFMUsy3mK\",\"key\":\"key99304-20\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\",\"key\":\"key99304-21\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"po1yraeGOKA5dtxocBCIU6uQxPS\",\"key\":\"key99304-22\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\",\"key\":\"key99304-23\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"hiSIedELpPQuVc6cdfv2cMXyqzl\",\"key\":\"key99304-24\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"WfSnMjEhy7PkXepHaJMcVINVCqn\",\"key\":\"key99304-25\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"7fbSXemCWQJCwDZYb7vTEKnVsBy\",\"key\":\"key99304-26\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"VJ01OzgangfOtCXDT2EH3v9bjgq\",\"key\":\"key99304-27\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"8UyvCNIG0Nd1jVH31wJB6nYX611\",\"key\":\"key99304-28\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"nTu9DJCdASfscLZ6SkkMYUtYGcs\",\"key\":\"key99304-29\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\",\"key\":\"key99304-3\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"4ctkyo5owukHVbIeoDuSThqKkOG\",\"key\":\"key99304-30\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"y1nQqsDlgv6h36rBXGlEe4oRtMq\",\"key\":\"key99304-31\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xzzBZCVM73W4CDp2QBKrcUgSY72\",\"key\":\"key99304-32\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"uazmz2bqY1jMQqmu96hyaGmV6WF\",\"key\":\"key99304-33\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\",\"key\":\"key99304-34\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"qcredQGvg0fG58d3HhZPhXfk80e\",\"key\":\"key99304-35\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"yk0PX4lggfUZrvCxqNKoiga9c6x\",\"key\":\"key99304-36\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"IL8tvingcsLl0KiOSfUlONW9ks6\",\"key\":\"key99304-37\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"XDnfiflnoBCOb2rxleMb0yxsSgn\",\"key\":\"key99304-38\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"40qJDdNv0bZrcBswtJnkAiJ7oVa\",\"key\":\"key99304-39\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xpnir6rxcSj0QU1QZdR7HcKyB9B\",\"key\":\"key99304-4\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"7rToRRTdSivgowPf9oVX3V2zey0\",\"key\":\"key99304-40\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\",\"key\":\"key99304-41\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"a4XS5iIhl0phasW0aCdhuq40VWd\",\"key\":\"key99304-42\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"gs3W1llAsuBhdJRHn4mfePSUbmk\",\"key\":\"key99304-43\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"bqqttoLB96T9XocpWRMQknOlRiS\",\"key\":\"key99304-44\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"jAJUTj2G28FEtmEvxojY9icmfLY\",\"key\":\"key99304-45\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xY1cWj6d0CgY2lj34EB0nMUUFXX\",\"key\":\"key99304-46\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"5MMFywEspSKzXLyEjpsvUY7HRzR\",\"key\":\"key99304-47\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\",\"key\":\"key99304-48\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"j7wRmaYYhIbCdxn9F6AoX1soRpA\",\"key\":\"key99304-49\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"B59roZdHRq5d01subExNMn6Z6UW\",\"key\":\"key99304-5\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fOGNTUexfoNbo7dm0OeRCpfZH3w\",\"key\":\"key99304-6\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"gdtsYdyUXr2p6f9aF49KO8tII0T\",\"key\":\"key99304-7\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"1GV25hcOOdt2K1eHXe4UG0H5SEF\",\"key\":\"key99304-8\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"rNOH45oAkFJoU1p6qs3x0jTGFvx\",\"key\":\"key99304-9\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}]}", + "x-ms-client-request-id" : "150b77e2-dd46-4a67-8069-0eb8209a9386", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key30682%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key99304%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "94056fc1-0831-44dc-89c0-9f2c54d7f0e7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjE=;sn=242261", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "b3c56498-a396-44df-8006-8da7b80c178a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "b3c56498-a396-44df-8006-8da7b80c178a", - "Body" : "{\"items\":[{\"etag\":\"ne0uSOuqbzgXs0hkb3piwaLPGe9\",\"key\":\"key30682-0\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\",\"key\":\"key30682-1\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"dwzHhzXCHrqo2dg1exX0HlWbZeE\",\"key\":\"key30682-10\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"EguDa0BHuT9oVYVsITJBKq8R1no\",\"key\":\"key30682-11\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"WbRik97b0pbOOR2tLFkCNQ5pxCa\",\"key\":\"key30682-12\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"HShaKkJJptGYpZCBdItkZToCXyc\",\"key\":\"key30682-13\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"puLV7Bqbm7qH79yXSeAEXu31DH2\",\"key\":\"key30682-14\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\",\"key\":\"key30682-15\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"okwjEwn4s5ycNqg5b81Jji4b0V6\",\"key\":\"key30682-16\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"mXGbZdRG5rEK82UBEecJYnA8KuB\",\"key\":\"key30682-17\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\",\"key\":\"key30682-18\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"QhFGEYhJ6C9hismLxoyGNfpTMyo\",\"key\":\"key30682-19\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"zDDobNOSiskvgJaNAH4ewhA8WxU\",\"key\":\"key30682-2\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"k9xvLBAk324MLXJCVfh6lT47xE1\",\"key\":\"key30682-20\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"p1jK1mJHpgDcDxwsdEg0E8IR29d\",\"key\":\"key30682-21\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\",\"key\":\"key30682-22\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"PwgAPk2NfpWKXAWAue2iR6FIhMG\",\"key\":\"key30682-23\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"x1AGhrkI8UzmFAahtWUZjN1VtKH\",\"key\":\"key30682-24\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"UkKaBp8CPSvnWrNAouPT288iKtj\",\"key\":\"key30682-25\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\",\"key\":\"key30682-26\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\",\"key\":\"key30682-27\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\",\"key\":\"key30682-28\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\",\"key\":\"key30682-29\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"H3SdzhY8Kyd906YGc9ZC7DhVktv\",\"key\":\"key30682-3\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\",\"key\":\"key30682-30\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"QuIfGsQXupHwlc1kA06Xovtwhu0\",\"key\":\"key30682-31\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\",\"key\":\"key30682-32\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\",\"key\":\"key30682-33\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\",\"key\":\"key30682-34\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\",\"key\":\"key30682-35\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"E94oA2ueBIlDidwfp3dj0cyMdwp\",\"key\":\"key30682-36\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\",\"key\":\"key30682-37\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"},{\"etag\":\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\",\"key\":\"key30682-38\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"FkOkoWQf7XMOwzxuh34QXmlMxdz\",\"key\":\"key30682-39\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"Ck1hamhYgyPCdPEhrz5deOzqR3r\",\"key\":\"key30682-4\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"br3NFDJGay40IGp791lFXcWbxqe\",\"key\":\"key30682-40\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"speDXMCgF8XpQzurleTh0L2tnVs\",\"key\":\"key30682-41\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\",\"key\":\"key30682-42\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\",\"key\":\"key30682-43\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"cREv0TieVnL8rnJbw16HEXzYoXg\",\"key\":\"key30682-44\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\",\"key\":\"key30682-45\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\",\"key\":\"key30682-46\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"rpwfVtxCYrEnBdz749ciQpd4DEl\",\"key\":\"key30682-47\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\",\"key\":\"key30682-48\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"vsoyJe2EVEkkPkJphvFe5Bqp8al\",\"key\":\"key30682-49\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"},{\"etag\":\"xvWXKxQ0DjgiOXdIppCSo918sCT\",\"key\":\"key30682-5\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\",\"key\":\"key30682-6\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\",\"key\":\"key30682-7\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"zyEVdnrrWWaBJRJXvN3isfXeUV3\",\"key\":\"key30682-8\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"},{\"etag\":\"qYMKx1USUtyKPoElfcgHSi26dli\",\"key\":\"key30682-9\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}]}", - "x-ms-client-request-id" : "1066430e-a1d6-499b-a69c-d48a49b53c64" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fb9c1fda-29ee-44c8-abfe-38d4cc7e6c04", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjg=;sn=364068", + "x-ms-request-id" : "fb9c1fda-29ee-44c8-abfe-38d4cc7e6c04", + "Body" : "{\"items\":[{\"etag\":\"C8Mie18fbd3g3qocMDz7085nlFK\",\"key\":\"key99304-0\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"zcSDaCY0xo37i8oN4HkbYWWfn5q\",\"key\":\"key99304-1\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\",\"key\":\"key99304-10\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dcF4DabDrbvrIUIeORO1iJZmsAo\",\"key\":\"key99304-11\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"3FSSBvO9Uy62EqgKY7BqMzl9gII\",\"key\":\"key99304-12\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dTeYepWo9SdrrSqi2LW0oUmBWHy\",\"key\":\"key99304-13\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fJMpFvCN3msURVcqpX8teoKndLy\",\"key\":\"key99304-14\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\",\"key\":\"key99304-15\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"dYHgeTjK8SH5A48mM1QcbNdGpb4\",\"key\":\"key99304-16\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"hPfaUnC0G3LWYgn9vmL19K55fEj\",\"key\":\"key99304-17\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fHM8jJqubVBs0TkD7RvmJVWrtAf\",\"key\":\"key99304-18\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\",\"key\":\"key99304-19\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"tU5gwhB5xGE2BvOdOxp94xUVVoh\",\"key\":\"key99304-2\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"1DuljhivvbJpePSFhYhFMUsy3mK\",\"key\":\"key99304-20\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\",\"key\":\"key99304-21\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"po1yraeGOKA5dtxocBCIU6uQxPS\",\"key\":\"key99304-22\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\",\"key\":\"key99304-23\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"hiSIedELpPQuVc6cdfv2cMXyqzl\",\"key\":\"key99304-24\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"WfSnMjEhy7PkXepHaJMcVINVCqn\",\"key\":\"key99304-25\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"7fbSXemCWQJCwDZYb7vTEKnVsBy\",\"key\":\"key99304-26\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"VJ01OzgangfOtCXDT2EH3v9bjgq\",\"key\":\"key99304-27\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"8UyvCNIG0Nd1jVH31wJB6nYX611\",\"key\":\"key99304-28\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"nTu9DJCdASfscLZ6SkkMYUtYGcs\",\"key\":\"key99304-29\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\",\"key\":\"key99304-3\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"4ctkyo5owukHVbIeoDuSThqKkOG\",\"key\":\"key99304-30\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"y1nQqsDlgv6h36rBXGlEe4oRtMq\",\"key\":\"key99304-31\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xzzBZCVM73W4CDp2QBKrcUgSY72\",\"key\":\"key99304-32\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"uazmz2bqY1jMQqmu96hyaGmV6WF\",\"key\":\"key99304-33\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\",\"key\":\"key99304-34\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"qcredQGvg0fG58d3HhZPhXfk80e\",\"key\":\"key99304-35\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"yk0PX4lggfUZrvCxqNKoiga9c6x\",\"key\":\"key99304-36\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"IL8tvingcsLl0KiOSfUlONW9ks6\",\"key\":\"key99304-37\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"XDnfiflnoBCOb2rxleMb0yxsSgn\",\"key\":\"key99304-38\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"40qJDdNv0bZrcBswtJnkAiJ7oVa\",\"key\":\"key99304-39\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xpnir6rxcSj0QU1QZdR7HcKyB9B\",\"key\":\"key99304-4\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"7rToRRTdSivgowPf9oVX3V2zey0\",\"key\":\"key99304-40\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\",\"key\":\"key99304-41\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"a4XS5iIhl0phasW0aCdhuq40VWd\",\"key\":\"key99304-42\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"gs3W1llAsuBhdJRHn4mfePSUbmk\",\"key\":\"key99304-43\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"bqqttoLB96T9XocpWRMQknOlRiS\",\"key\":\"key99304-44\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"jAJUTj2G28FEtmEvxojY9icmfLY\",\"key\":\"key99304-45\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"xY1cWj6d0CgY2lj34EB0nMUUFXX\",\"key\":\"key99304-46\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"5MMFywEspSKzXLyEjpsvUY7HRzR\",\"key\":\"key99304-47\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\",\"key\":\"key99304-48\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"j7wRmaYYhIbCdxn9F6AoX1soRpA\",\"key\":\"key99304-49\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"B59roZdHRq5d01subExNMn6Z6UW\",\"key\":\"key99304-5\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"fOGNTUexfoNbo7dm0OeRCpfZH3w\",\"key\":\"key99304-6\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"gdtsYdyUXr2p6f9aF49KO8tII0T\",\"key\":\"key99304-7\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"1GV25hcOOdt2K1eHXe4UG0H5SEF\",\"key\":\"key99304-8\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"},{\"etag\":\"rNOH45oAkFJoU1p6qs3x0jTGFvx\",\"key\":\"key99304-9\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}]}", + "x-ms-client-request-id" : "94056fc1-0831-44dc-89c0-9f2c54d7f0e7", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-0?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-0?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "94b9ffa0-96a0-4ec6-9203-6edcdd257c9b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjI=;sn=242262", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8082f03f-497f-495e-8619-bc9cdab6d099", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ne0uSOuqbzgXs0hkb3piwaLPGe9\"", - "x-ms-request-id" : "8082f03f-497f-495e-8619-bc9cdab6d099", - "Body" : "{\"etag\":\"ne0uSOuqbzgXs0hkb3piwaLPGe9\",\"key\":\"key30682-0\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "9cc23f43-a4d6-4f4f-b047-bf4d84bf23c9" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "27069935-0a5f-4384-a70d-49be6d9bf3f7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"C8Mie18fbd3g3qocMDz7085nlFK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNjk=;sn=364069", + "x-ms-request-id" : "27069935-0a5f-4384-a70d-49be6d9bf3f7", + "Body" : "{\"etag\":\"C8Mie18fbd3g3qocMDz7085nlFK\",\"key\":\"key99304-0\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "94b9ffa0-96a0-4ec6-9203-6edcdd257c9b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-1?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-1?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e84029f-9f90-4616-a8a0-212f3ccc9e2d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjM=;sn=242263", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a54b0810-558f-46df-a384-67387d96e7f6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\"", - "x-ms-request-id" : "a54b0810-558f-46df-a384-67387d96e7f6", - "Body" : "{\"etag\":\"Xl29Fy6viBbPodyzAUzVVZ1LMw5\",\"key\":\"key30682-1\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "260ff248-49f1-4999-8685-97bc683115c3" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e5ffc1ab-2062-4aeb-98bc-fd7406fe2ead", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"zcSDaCY0xo37i8oN4HkbYWWfn5q\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzA=;sn=364070", + "x-ms-request-id" : "e5ffc1ab-2062-4aeb-98bc-fd7406fe2ead", + "Body" : "{\"etag\":\"zcSDaCY0xo37i8oN4HkbYWWfn5q\",\"key\":\"key99304-1\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "6e84029f-9f90-4616-a8a0-212f3ccc9e2d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-10?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-12?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "42b1e857-80d6-4f38-a6fd-65a04343df65", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjQ=;sn=242264", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8c25e921-c920-452a-9da5-58f90fbcb172", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"dwzHhzXCHrqo2dg1exX0HlWbZeE\"", - "x-ms-request-id" : "8c25e921-c920-452a-9da5-58f90fbcb172", - "Body" : "{\"etag\":\"dwzHhzXCHrqo2dg1exX0HlWbZeE\",\"key\":\"key30682-10\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "69b28bf2-da8a-4332-ac7a-05dcbe9e7e24" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0dc53838-9707-49c0-a836-0f2cb557ab3f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3FSSBvO9Uy62EqgKY7BqMzl9gII\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzE=;sn=364071", + "x-ms-request-id" : "0dc53838-9707-49c0-a836-0f2cb557ab3f", + "Body" : "{\"etag\":\"3FSSBvO9Uy62EqgKY7BqMzl9gII\",\"key\":\"key99304-12\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "42b1e857-80d6-4f38-a6fd-65a04343df65", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-11?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-14?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e02be35-f4ca-4beb-9faa-cba500ed3176", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjU=;sn=242265", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d9127825-549b-41d3-9308-b9f9da7bbb40", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"EguDa0BHuT9oVYVsITJBKq8R1no\"", - "x-ms-request-id" : "d9127825-549b-41d3-9308-b9f9da7bbb40", - "Body" : "{\"etag\":\"EguDa0BHuT9oVYVsITJBKq8R1no\",\"key\":\"key30682-11\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "ae460d08-71ba-46b4-9416-9a38d709f461" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d9517871-1cd5-455c-b034-6b6a7996a99c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fJMpFvCN3msURVcqpX8teoKndLy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzM=;sn=364073", + "x-ms-request-id" : "d9517871-1cd5-455c-b034-6b6a7996a99c", + "Body" : "{\"etag\":\"fJMpFvCN3msURVcqpX8teoKndLy\",\"key\":\"key99304-14\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "6e02be35-f4ca-4beb-9faa-cba500ed3176", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-12?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-10?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "48f52359-cec4-44f1-a1ab-6df487aab4c7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjY=;sn=242266", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ce15a3b7-fcc7-4419-805a-f35d168b19ae", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"WbRik97b0pbOOR2tLFkCNQ5pxCa\"", - "x-ms-request-id" : "ce15a3b7-fcc7-4419-805a-f35d168b19ae", - "Body" : "{\"etag\":\"WbRik97b0pbOOR2tLFkCNQ5pxCa\",\"key\":\"key30682-12\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "df72f458-5671-4015-9564-dddfbfbe27f4" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "75ed1c13-1618-4311-83d1-cb40f017fb1b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzI=;sn=364072", + "x-ms-request-id" : "75ed1c13-1618-4311-83d1-cb40f017fb1b", + "Body" : "{\"etag\":\"CGUPVEjzGLIRA5mqwNHETnDX9Lx\",\"key\":\"key99304-10\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "48f52359-cec4-44f1-a1ab-6df487aab4c7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-13?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-13?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1db04ed8-44fc-4cfe-a345-a532a782748e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjc=;sn=242267", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "49e3f159-1b43-43be-94c1-d7084622e394", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"HShaKkJJptGYpZCBdItkZToCXyc\"", - "x-ms-request-id" : "49e3f159-1b43-43be-94c1-d7084622e394", - "Body" : "{\"etag\":\"HShaKkJJptGYpZCBdItkZToCXyc\",\"key\":\"key30682-13\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "67b86e59-83a9-4add-8454-012e19c6045e" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "30c6b172-8688-4ad1-b155-3ae742bd6c6e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dTeYepWo9SdrrSqi2LW0oUmBWHy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzQ=;sn=364074", + "x-ms-request-id" : "30c6b172-8688-4ad1-b155-3ae742bd6c6e", + "Body" : "{\"etag\":\"dTeYepWo9SdrrSqi2LW0oUmBWHy\",\"key\":\"key99304-13\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1db04ed8-44fc-4cfe-a345-a532a782748e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-14?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-11?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e099b395-fd9c-4bd7-b0ac-c3dd7c334a19", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjg=;sn=242268", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "bdf08550-6c3f-42cc-80a2-44364989d145", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"puLV7Bqbm7qH79yXSeAEXu31DH2\"", - "x-ms-request-id" : "bdf08550-6c3f-42cc-80a2-44364989d145", - "Body" : "{\"etag\":\"puLV7Bqbm7qH79yXSeAEXu31DH2\",\"key\":\"key30682-14\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "0617168c-48a9-45aa-bb52-448c11b8a62f" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "de066df2-677d-497a-aa7d-6c9c3f3ce7c2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dcF4DabDrbvrIUIeORO1iJZmsAo\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzU=;sn=364075", + "x-ms-request-id" : "de066df2-677d-497a-aa7d-6c9c3f3ce7c2", + "Body" : "{\"etag\":\"dcF4DabDrbvrIUIeORO1iJZmsAo\",\"key\":\"key99304-11\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "e099b395-fd9c-4bd7-b0ac-c3dd7c334a19", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-15?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-15?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "20075dfe-f443-4ce7-86e5-4eee35a3f22d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNjk=;sn=242269", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "74501515-666d-4dd7-8608-178a623bfe9a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\"", - "x-ms-request-id" : "74501515-666d-4dd7-8608-178a623bfe9a", - "Body" : "{\"etag\":\"CN2MVS0Y9n6Qca1YCJi1wuOFKGB\",\"key\":\"key30682-15\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "2927b2e1-b970-463a-9f7b-0c8531dc6d5e" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f33ed2a2-81ac-4bba-a7c2-7070787d8fec", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzY=;sn=364076", + "x-ms-request-id" : "f33ed2a2-81ac-4bba-a7c2-7070787d8fec", + "Body" : "{\"etag\":\"Qf1CSSTgtHv3roMBcj5x5OLvPyA\",\"key\":\"key99304-15\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "20075dfe-f443-4ce7-86e5-4eee35a3f22d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-16?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-19?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0b839147-fafb-418a-a95a-9b4d33db30ef", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzA=;sn=242270", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7a8afb24-65f2-4b48-9fdf-dbb03b734a4e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"okwjEwn4s5ycNqg5b81Jji4b0V6\"", - "x-ms-request-id" : "7a8afb24-65f2-4b48-9fdf-dbb03b734a4e", - "Body" : "{\"etag\":\"okwjEwn4s5ycNqg5b81Jji4b0V6\",\"key\":\"key30682-16\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "26551115-cf57-497a-914e-e8627a91481c" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8a8e1699-b516-4215-9686-eb4b8e06b3af", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzc=;sn=364077", + "x-ms-request-id" : "8a8e1699-b516-4215-9686-eb4b8e06b3af", + "Body" : "{\"etag\":\"otgFcIR3alxXDVgkpG0Nk2Ijj1D\",\"key\":\"key99304-19\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0b839147-fafb-418a-a95a-9b4d33db30ef", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-17?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-16?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "488ea594-e67f-493e-aa84-de779d9a9fc6", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzE=;sn=242271", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6bc08391-2937-4c93-80b5-eaea8404d845", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"mXGbZdRG5rEK82UBEecJYnA8KuB\"", - "x-ms-request-id" : "6bc08391-2937-4c93-80b5-eaea8404d845", - "Body" : "{\"etag\":\"mXGbZdRG5rEK82UBEecJYnA8KuB\",\"key\":\"key30682-17\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "df7a447e-65b8-412b-b0e0-e61f9e90bfe7" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dbd201b3-44c4-45b8-9d84-b1e91c3cef16", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dYHgeTjK8SH5A48mM1QcbNdGpb4\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzg=;sn=364078", + "x-ms-request-id" : "dbd201b3-44c4-45b8-9d84-b1e91c3cef16", + "Body" : "{\"etag\":\"dYHgeTjK8SH5A48mM1QcbNdGpb4\",\"key\":\"key99304-16\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "488ea594-e67f-493e-aa84-de779d9a9fc6", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-18?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-18?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3404c269-cb2d-44a0-9ca5-8880612ab5bd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzI=;sn=242272", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "aeec373e-3b82-46fe-9460-d1eef6c8a891", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\"", - "x-ms-request-id" : "aeec373e-3b82-46fe-9460-d1eef6c8a891", - "Body" : "{\"etag\":\"rNPT5E3Xyiko3apQY0vAVIf9Bm9\",\"key\":\"key30682-18\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "951fda2c-379f-446b-b0b1-66ec17e41415" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e4d3327b-cda4-49cb-8b72-94c7d4d97ca5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fHM8jJqubVBs0TkD7RvmJVWrtAf\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwNzk=;sn=364079", + "x-ms-request-id" : "e4d3327b-cda4-49cb-8b72-94c7d4d97ca5", + "Body" : "{\"etag\":\"fHM8jJqubVBs0TkD7RvmJVWrtAf\",\"key\":\"key99304-18\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3404c269-cb2d-44a0-9ca5-8880612ab5bd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-19?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-22?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cf8e946d-e81e-479e-8043-d1ef1bbc7591", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzM=;sn=242273", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "d420806c-ed14-4d65-b38a-9799205f60db", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"QhFGEYhJ6C9hismLxoyGNfpTMyo\"", - "x-ms-request-id" : "d420806c-ed14-4d65-b38a-9799205f60db", - "Body" : "{\"etag\":\"QhFGEYhJ6C9hismLxoyGNfpTMyo\",\"key\":\"key30682-19\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "8841bc6b-1528-44bf-ba56-119e754caecc" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bdb012ee-c200-43f9-94e8-b7297cba5c11", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"po1yraeGOKA5dtxocBCIU6uQxPS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODA=;sn=364080", + "x-ms-request-id" : "bdb012ee-c200-43f9-94e8-b7297cba5c11", + "Body" : "{\"etag\":\"po1yraeGOKA5dtxocBCIU6uQxPS\",\"key\":\"key99304-22\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "cf8e946d-e81e-479e-8043-d1ef1bbc7591", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-2?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-17?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d45f1548-e250-4ddd-aaa5-75fdda07e709", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzQ=;sn=242274", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "88bcb54c-0e85-4a67-ac9f-736fe2c877df", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zDDobNOSiskvgJaNAH4ewhA8WxU\"", - "x-ms-request-id" : "88bcb54c-0e85-4a67-ac9f-736fe2c877df", - "Body" : "{\"etag\":\"zDDobNOSiskvgJaNAH4ewhA8WxU\",\"key\":\"key30682-2\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "c85b84ba-405b-408f-a240-fde0b5a9e391" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "92f3ea28-2477-45d3-9968-02948151e31c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"hPfaUnC0G3LWYgn9vmL19K55fEj\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODE=;sn=364081", + "x-ms-request-id" : "92f3ea28-2477-45d3-9968-02948151e31c", + "Body" : "{\"etag\":\"hPfaUnC0G3LWYgn9vmL19K55fEj\",\"key\":\"key99304-17\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d45f1548-e250-4ddd-aaa5-75fdda07e709", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-20?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-23?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ea316847-fdd1-4e83-a3c3-0c08c60bb0b3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzU=;sn=242275", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7999547f-ef22-4435-a7e5-0578a80ad42d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"k9xvLBAk324MLXJCVfh6lT47xE1\"", - "x-ms-request-id" : "7999547f-ef22-4435-a7e5-0578a80ad42d", - "Body" : "{\"etag\":\"k9xvLBAk324MLXJCVfh6lT47xE1\",\"key\":\"key30682-20\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "1f5d2789-69c5-4c66-ab91-ebe4f294e458" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ec1cd588-dd26-4636-8e39-89ced4dd2ba1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODI=;sn=364082", + "x-ms-request-id" : "ec1cd588-dd26-4636-8e39-89ced4dd2ba1", + "Body" : "{\"etag\":\"3rMUKQojo5tNVrJLY5Qn4QvvHCu\",\"key\":\"key99304-23\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "ea316847-fdd1-4e83-a3c3-0c08c60bb0b3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-21?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-24?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09777c33-69c5-4db3-9348-378a29bf3a8a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzY=;sn=242276", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "64137db0-52ca-4564-b291-210e4476d5ec", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"p1jK1mJHpgDcDxwsdEg0E8IR29d\"", - "x-ms-request-id" : "64137db0-52ca-4564-b291-210e4476d5ec", - "Body" : "{\"etag\":\"p1jK1mJHpgDcDxwsdEg0E8IR29d\",\"key\":\"key30682-21\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "d2c1cbf4-838c-467f-ba07-ce23b250c31d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "dee20bee-e4ec-46a2-903a-c64daafe53db", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"hiSIedELpPQuVc6cdfv2cMXyqzl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODM=;sn=364083", + "x-ms-request-id" : "dee20bee-e4ec-46a2-903a-c64daafe53db", + "Body" : "{\"etag\":\"hiSIedELpPQuVc6cdfv2cMXyqzl\",\"key\":\"key99304-24\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "09777c33-69c5-4db3-9348-378a29bf3a8a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-22?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-2?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "08e88064-f656-4cf9-95af-30b4a8958abe", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzc=;sn=242277", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "61a0f53f-16bd-47ba-9c96-b81f310045d1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\"", - "x-ms-request-id" : "61a0f53f-16bd-47ba-9c96-b81f310045d1", - "Body" : "{\"etag\":\"LFbMdVhsmuBnNW0cvSV4WxQVIaZ\",\"key\":\"key30682-22\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "29ebe630-cff4-4c8f-bc6d-e31debd539f5" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0cc38137-f604-4a9a-aaf1-576f38e7276b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"tU5gwhB5xGE2BvOdOxp94xUVVoh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODQ=;sn=364084", + "x-ms-request-id" : "0cc38137-f604-4a9a-aaf1-576f38e7276b", + "Body" : "{\"etag\":\"tU5gwhB5xGE2BvOdOxp94xUVVoh\",\"key\":\"key99304-2\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "08e88064-f656-4cf9-95af-30b4a8958abe", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-23?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-27?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7e52c88b-112e-4c43-8665-05633615c8c4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzg=;sn=242278", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "612700d0-8790-4c19-87e4-aaec9d24361f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"PwgAPk2NfpWKXAWAue2iR6FIhMG\"", - "x-ms-request-id" : "612700d0-8790-4c19-87e4-aaec9d24361f", - "Body" : "{\"etag\":\"PwgAPk2NfpWKXAWAue2iR6FIhMG\",\"key\":\"key30682-23\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "c1e4bc29-a696-469d-931b-b5e67045d681" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7d7fece7-fbb9-488e-9624-82305d374dec", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"VJ01OzgangfOtCXDT2EH3v9bjgq\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODU=;sn=364085", + "x-ms-request-id" : "7d7fece7-fbb9-488e-9624-82305d374dec", + "Body" : "{\"etag\":\"VJ01OzgangfOtCXDT2EH3v9bjgq\",\"key\":\"key99304-27\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "7e52c88b-112e-4c43-8665-05633615c8c4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-24?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-25?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "06a49059-7ee5-4972-8c69-6cf06cc19dae", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyNzk=;sn=242279", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8e8d90e1-c236-448b-9216-cb0159074886", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"x1AGhrkI8UzmFAahtWUZjN1VtKH\"", - "x-ms-request-id" : "8e8d90e1-c236-448b-9216-cb0159074886", - "Body" : "{\"etag\":\"x1AGhrkI8UzmFAahtWUZjN1VtKH\",\"key\":\"key30682-24\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "256d50d1-f5d6-49b7-b15e-88121b66dcf6" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6a003021-c695-4e02-b795-89f98c928516", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WfSnMjEhy7PkXepHaJMcVINVCqn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODY=;sn=364086", + "x-ms-request-id" : "6a003021-c695-4e02-b795-89f98c928516", + "Body" : "{\"etag\":\"WfSnMjEhy7PkXepHaJMcVINVCqn\",\"key\":\"key99304-25\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "06a49059-7ee5-4972-8c69-6cf06cc19dae", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-25?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-20?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca323454-b236-4800-b788-7191e19dacce", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODA=;sn=242280", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "5023b9f4-221b-4ca4-a39c-8987e076ba66", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"UkKaBp8CPSvnWrNAouPT288iKtj\"", - "x-ms-request-id" : "5023b9f4-221b-4ca4-a39c-8987e076ba66", - "Body" : "{\"etag\":\"UkKaBp8CPSvnWrNAouPT288iKtj\",\"key\":\"key30682-25\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "aff38439-6cb6-48f4-b5f0-e9d731ce6fe5" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bfce2147-a20f-4d18-b936-9194dab894c7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1DuljhivvbJpePSFhYhFMUsy3mK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODc=;sn=364087", + "x-ms-request-id" : "bfce2147-a20f-4d18-b936-9194dab894c7", + "Body" : "{\"etag\":\"1DuljhivvbJpePSFhYhFMUsy3mK\",\"key\":\"key99304-20\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "ca323454-b236-4800-b788-7191e19dacce", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-26?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-28?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3f7f5c0b-2541-45d5-b075-f0110b3f8418", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODE=;sn=242281", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ab470bf6-dac6-4702-be0d-7ba169b15650", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\"", - "x-ms-request-id" : "ab470bf6-dac6-4702-be0d-7ba169b15650", - "Body" : "{\"etag\":\"bvUPcGMFQW0f5SY1AY2g9fBrSNq\",\"key\":\"key30682-26\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "babb0de8-6612-4967-862e-dbad5d19ae50" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9fb7d6b8-876d-4112-9d74-4cfcfbf9bbe4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"8UyvCNIG0Nd1jVH31wJB6nYX611\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODg=;sn=364088", + "x-ms-request-id" : "9fb7d6b8-876d-4112-9d74-4cfcfbf9bbe4", + "Body" : "{\"etag\":\"8UyvCNIG0Nd1jVH31wJB6nYX611\",\"key\":\"key99304-28\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3f7f5c0b-2541-45d5-b075-f0110b3f8418", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-27?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-26?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7fe6107b-fcbc-4d77-8b89-251e70062731", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODI=;sn=242282", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c621d4a1-5def-434f-86d0-9c06ebe02b88", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\"", - "x-ms-request-id" : "c621d4a1-5def-434f-86d0-9c06ebe02b88", - "Body" : "{\"etag\":\"Hk4nGlQdRoDThXdSQYCWsdwRxj5\",\"key\":\"key30682-27\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "a218dd65-4aa5-4baf-8619-1510d4f91cf5" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a5991d02-9e58-4584-a9fd-b21d5d6a24bb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7fbSXemCWQJCwDZYb7vTEKnVsBy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwODk=;sn=364089", + "x-ms-request-id" : "a5991d02-9e58-4584-a9fd-b21d5d6a24bb", + "Body" : "{\"etag\":\"7fbSXemCWQJCwDZYb7vTEKnVsBy\",\"key\":\"key99304-26\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "7fe6107b-fcbc-4d77-8b89-251e70062731", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-28?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-21?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9a3aba9d-7d89-4861-9c93-c2a0af75196f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODM=;sn=242283", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f36f0224-9ccb-4f2a-9b72-64a350446705", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\"", - "x-ms-request-id" : "f36f0224-9ccb-4f2a-9b72-64a350446705", - "Body" : "{\"etag\":\"hfOiMmboQ1YCIeWJ89xrQcjynuZ\",\"key\":\"key30682-28\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "f4e202d4-f4b8-48d2-a1f2-46819f350749" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f914888b-0959-438f-b47e-4ab4f1f16954", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTA=;sn=364090", + "x-ms-request-id" : "f914888b-0959-438f-b47e-4ab4f1f16954", + "Body" : "{\"etag\":\"NwLhPEl3m4Lxxr24GFK0vd9VSKS\",\"key\":\"key99304-21\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "9a3aba9d-7d89-4861-9c93-c2a0af75196f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-29?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-30?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b7e6cbac-6f7c-438a-95d6-8af5cb5920ba", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODQ=;sn=242284", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6d61aa32-a88b-4278-a357-7ea17245542c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\"", - "x-ms-request-id" : "6d61aa32-a88b-4278-a357-7ea17245542c", - "Body" : "{\"etag\":\"9EBqwa6Hwv5PcBGljEkvz3qEPVH\",\"key\":\"key30682-29\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "0f1f72ab-12e4-4d9d-b597-8c2cf629da70" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "87aa5830-cd81-4a40-baa4-c74fb2216a47", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4ctkyo5owukHVbIeoDuSThqKkOG\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTE=;sn=364091", + "x-ms-request-id" : "87aa5830-cd81-4a40-baa4-c74fb2216a47", + "Body" : "{\"etag\":\"4ctkyo5owukHVbIeoDuSThqKkOG\",\"key\":\"key99304-30\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "b7e6cbac-6f7c-438a-95d6-8af5cb5920ba", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-3?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-29?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3db33265-ed89-485d-814d-769ad3d23152", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODU=;sn=242285", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "8e87f573-4986-4936-9da0-d5ee2230174a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"H3SdzhY8Kyd906YGc9ZC7DhVktv\"", - "x-ms-request-id" : "8e87f573-4986-4936-9da0-d5ee2230174a", - "Body" : "{\"etag\":\"H3SdzhY8Kyd906YGc9ZC7DhVktv\",\"key\":\"key30682-3\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "2563febb-dfb8-40f7-9aa5-d6c85bda086a" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6d3b5f42-74e7-41e6-8293-dec9848a3c51", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"nTu9DJCdASfscLZ6SkkMYUtYGcs\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTI=;sn=364092", + "x-ms-request-id" : "6d3b5f42-74e7-41e6-8293-dec9848a3c51", + "Body" : "{\"etag\":\"nTu9DJCdASfscLZ6SkkMYUtYGcs\",\"key\":\"key99304-29\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3db33265-ed89-485d-814d-769ad3d23152", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-30?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-33?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f8d1b761-2838-4dee-93f0-74c786b096ff", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODY=;sn=242286", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "37249636-96e9-498d-9f24-0d2159f1c298", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\"", - "x-ms-request-id" : "37249636-96e9-498d-9f24-0d2159f1c298", - "Body" : "{\"etag\":\"EPvEiOJI2O5NgvMfAsL1RiHWy0H\",\"key\":\"key30682-30\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "69c4503f-bdb7-4db9-b221-1de02b96fa45" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7aa96613-8671-4cc2-a40c-2ec5d62daf92", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"uazmz2bqY1jMQqmu96hyaGmV6WF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTM=;sn=364093", + "x-ms-request-id" : "7aa96613-8671-4cc2-a40c-2ec5d62daf92", + "Body" : "{\"etag\":\"uazmz2bqY1jMQqmu96hyaGmV6WF\",\"key\":\"key99304-33\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "f8d1b761-2838-4dee-93f0-74c786b096ff", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-31?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-32?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "67880334-9c76-4188-accb-26a1ec9c6ea3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:21 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODc=;sn=242287", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3383f04a-2e34-4e99-9a0a-111d75c6ab01", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"QuIfGsQXupHwlc1kA06Xovtwhu0\"", - "x-ms-request-id" : "3383f04a-2e34-4e99-9a0a-111d75c6ab01", - "Body" : "{\"etag\":\"QuIfGsQXupHwlc1kA06Xovtwhu0\",\"key\":\"key30682-31\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "cc85983e-82c8-422b-b6aa-160ad68363b3" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e8d96306-bc75-405e-bb5e-ded9ec47f4ed", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xzzBZCVM73W4CDp2QBKrcUgSY72\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTQ=;sn=364094", + "x-ms-request-id" : "e8d96306-bc75-405e-bb5e-ded9ec47f4ed", + "Body" : "{\"etag\":\"xzzBZCVM73W4CDp2QBKrcUgSY72\",\"key\":\"key99304-32\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "67880334-9c76-4188-accb-26a1ec9c6ea3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-32?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-3?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a659d7a6-5c3b-4a1a-92ce-18bf73cb6326", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODg=;sn=242288", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "41c0b8f6-2ed0-4f28-b8c1-ded0c6199b95", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\"", - "x-ms-request-id" : "41c0b8f6-2ed0-4f28-b8c1-ded0c6199b95", - "Body" : "{\"etag\":\"6Qg1kYgzcg5j6wPU30ilQVHiAJ2\",\"key\":\"key30682-32\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "0da0c3ed-adb6-4536-8bf5-d8692017f205" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b3fe3bb9-6695-46b2-a7fc-3789c1b2c268", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTU=;sn=364095", + "x-ms-request-id" : "b3fe3bb9-6695-46b2-a7fc-3789c1b2c268", + "Body" : "{\"etag\":\"0ylYmQAKp1Unx8YU6qtA5UFTFjX\",\"key\":\"key99304-3\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "a659d7a6-5c3b-4a1a-92ce-18bf73cb6326", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-33?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-34?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a9f66740-8a36-4477-aed0-068848fa42d3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyODk=;sn=242289", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "08a56677-8713-4019-bfa3-c6bc6b23f040", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\"", - "x-ms-request-id" : "08a56677-8713-4019-bfa3-c6bc6b23f040", - "Body" : "{\"etag\":\"Vrn8TAQrIg0kOmeT56kOQhlqGZ2\",\"key\":\"key30682-33\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "8134ab6b-2600-4014-a438-5ad2aad24c44" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "80fd3097-bf2e-4eb8-8662-f88b74575be9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTY=;sn=364096", + "x-ms-request-id" : "80fd3097-bf2e-4eb8-8662-f88b74575be9", + "Body" : "{\"etag\":\"fv1ZsvQiRFumZzmPNnY7JFqKfHw\",\"key\":\"key99304-34\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "a9f66740-8a36-4477-aed0-068848fa42d3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-34?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-31?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3de1a050-9eb2-4c85-a3d5-af629cbc3cbb", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTA=;sn=242290", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "35fd03ca-b28f-4fce-827b-550737e0837d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\"", - "x-ms-request-id" : "35fd03ca-b28f-4fce-827b-550737e0837d", - "Body" : "{\"etag\":\"KNNwjhADuX0l5MOVaX0rX2zOO3Z\",\"key\":\"key30682-34\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "2e85648a-8075-484c-97d7-f200948a9a57" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f0c3b2cc-9256-4060-ac58-1026da6d5727", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"y1nQqsDlgv6h36rBXGlEe4oRtMq\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTg=;sn=364098", + "x-ms-request-id" : "f0c3b2cc-9256-4060-ac58-1026da6d5727", + "Body" : "{\"etag\":\"y1nQqsDlgv6h36rBXGlEe4oRtMq\",\"key\":\"key99304-31\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "3de1a050-9eb2-4c85-a3d5-af629cbc3cbb", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-35?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-35?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b0e1e6ed-0505-4dee-a300-eca8fb23eca3", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTE=;sn=242291", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "911c6f50-fec7-4abe-9238-ec307b7e10f8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\"", - "x-ms-request-id" : "911c6f50-fec7-4abe-9238-ec307b7e10f8", - "Body" : "{\"etag\":\"Yx3uAVJEUL5rqKUJ2j5zY0YZtps\",\"key\":\"key30682-35\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "c8e4459f-1dc8-43e5-9375-3fbc0b7c9296" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9eada19c-f231-4ea6-a796-5791b70c89b6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qcredQGvg0fG58d3HhZPhXfk80e\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTc=;sn=364097", + "x-ms-request-id" : "9eada19c-f231-4ea6-a796-5791b70c89b6", + "Body" : "{\"etag\":\"qcredQGvg0fG58d3HhZPhXfk80e\",\"key\":\"key99304-35\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "b0e1e6ed-0505-4dee-a300-eca8fb23eca3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-36?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-36?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6daffec0-7fc2-4116-9f6c-56d7331adfd0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTI=;sn=242292", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "da45adaf-62df-4152-a08f-305fbf743d35", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"E94oA2ueBIlDidwfp3dj0cyMdwp\"", - "x-ms-request-id" : "da45adaf-62df-4152-a08f-305fbf743d35", - "Body" : "{\"etag\":\"E94oA2ueBIlDidwfp3dj0cyMdwp\",\"key\":\"key30682-36\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "f3c3c0ff-1745-4950-8228-4f2a2f6dc8a7" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "257fd7c4-680f-4f67-ade3-a79137e9d9b6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"yk0PX4lggfUZrvCxqNKoiga9c6x\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwOTk=;sn=364099", + "x-ms-request-id" : "257fd7c4-680f-4f67-ade3-a79137e9d9b6", + "Body" : "{\"etag\":\"yk0PX4lggfUZrvCxqNKoiga9c6x\",\"key\":\"key99304-36\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "6daffec0-7fc2-4116-9f6c-56d7331adfd0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-37?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-42?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a16b52ab-bf14-41e3-ac80-85a5f8d6621a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTM=;sn=242293", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0885a308-2e82-4405-9a85-774db61ea87e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:20 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\"", - "x-ms-request-id" : "0885a308-2e82-4405-9a85-774db61ea87e", - "Body" : "{\"etag\":\"z5q7hyBOgwgYSu7z9cxrkoMgf8t\",\"key\":\"key30682-37\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:20+00:00\"}", - "x-ms-client-request-id" : "b8dbce53-e6d6-4a86-a514-6e8e55061e52" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cf29e86c-a591-4d89-8ccd-25282d1d2063", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"a4XS5iIhl0phasW0aCdhuq40VWd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDA=;sn=364100", + "x-ms-request-id" : "cf29e86c-a591-4d89-8ccd-25282d1d2063", + "Body" : "{\"etag\":\"a4XS5iIhl0phasW0aCdhuq40VWd\",\"key\":\"key99304-42\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "a16b52ab-bf14-41e3-ac80-85a5f8d6621a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-38?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-38?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d7bdb72-71aa-4214-a7a4-e04fa1759075", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTQ=;sn=242294", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0a249c20-3230-48c6-85fd-bbfe37bb025b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\"", - "x-ms-request-id" : "0a249c20-3230-48c6-85fd-bbfe37bb025b", - "Body" : "{\"etag\":\"2hfagWQ2Dl7GGMZ5YKL8srJNqvl\",\"key\":\"key30682-38\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "93e92036-80d7-4231-8f56-2a5dad09bb1c" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "092d28f0-a3c1-4eae-b535-de06a41f8e04", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XDnfiflnoBCOb2rxleMb0yxsSgn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDE=;sn=364101", + "x-ms-request-id" : "092d28f0-a3c1-4eae-b535-de06a41f8e04", + "Body" : "{\"etag\":\"XDnfiflnoBCOb2rxleMb0yxsSgn\",\"key\":\"key99304-38\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "1d7bdb72-71aa-4214-a7a4-e04fa1759075", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-39?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-39?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "0f1c528a-435f-4875-a87b-7aff565af872", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTU=;sn=242295", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f6b00d68-7bd2-4509-b5e6-17264d03c914", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FkOkoWQf7XMOwzxuh34QXmlMxdz\"", - "x-ms-request-id" : "f6b00d68-7bd2-4509-b5e6-17264d03c914", - "Body" : "{\"etag\":\"FkOkoWQf7XMOwzxuh34QXmlMxdz\",\"key\":\"key30682-39\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "964ceaf3-05c0-4d54-bdc9-e91dc7bdf4e6" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0a779e93-89dc-44bd-bf8a-381c9d1131c8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"40qJDdNv0bZrcBswtJnkAiJ7oVa\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDI=;sn=364102", + "x-ms-request-id" : "0a779e93-89dc-44bd-bf8a-381c9d1131c8", + "Body" : "{\"etag\":\"40qJDdNv0bZrcBswtJnkAiJ7oVa\",\"key\":\"key99304-39\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "0f1c528a-435f-4875-a87b-7aff565af872", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-4?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-40?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9119c2ce-8697-44cb-a876-649105dc1178", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTY=;sn=242296", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "66f30448-0100-4014-99a8-37c355c5f9ae", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"Ck1hamhYgyPCdPEhrz5deOzqR3r\"", - "x-ms-request-id" : "66f30448-0100-4014-99a8-37c355c5f9ae", - "Body" : "{\"etag\":\"Ck1hamhYgyPCdPEhrz5deOzqR3r\",\"key\":\"key30682-4\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "89c8a24b-2034-41fb-8ec3-4e0be36786b2" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "fbd9efd0-ddef-4262-9e08-2bd53448657c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7rToRRTdSivgowPf9oVX3V2zey0\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDM=;sn=364103", + "x-ms-request-id" : "fbd9efd0-ddef-4262-9e08-2bd53448657c", + "Body" : "{\"etag\":\"7rToRRTdSivgowPf9oVX3V2zey0\",\"key\":\"key99304-40\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "9119c2ce-8697-44cb-a876-649105dc1178", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-40?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-37?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "75f2fb16-e352-48d0-8123-baf6c372c1fa", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTc=;sn=242297", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "cea4e422-eaff-4991-a170-132e8e279e3e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"br3NFDJGay40IGp791lFXcWbxqe\"", - "x-ms-request-id" : "cea4e422-eaff-4991-a170-132e8e279e3e", - "Body" : "{\"etag\":\"br3NFDJGay40IGp791lFXcWbxqe\",\"key\":\"key30682-40\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "b96aa3f3-fa2b-48b5-99a0-5871d303784d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c5155ac9-cdb1-447d-96e1-7ef7091a877e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"IL8tvingcsLl0KiOSfUlONW9ks6\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDQ=;sn=364104", + "x-ms-request-id" : "c5155ac9-cdb1-447d-96e1-7ef7091a877e", + "Body" : "{\"etag\":\"IL8tvingcsLl0KiOSfUlONW9ks6\",\"key\":\"key99304-37\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "75f2fb16-e352-48d0-8123-baf6c372c1fa", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-41?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-43?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b09560f7-5e4d-4009-92cf-036eef8d67ee", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTg=;sn=242298", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "e46c55a4-0c74-4610-a354-a1c746b5cf47", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"speDXMCgF8XpQzurleTh0L2tnVs\"", - "x-ms-request-id" : "e46c55a4-0c74-4610-a354-a1c746b5cf47", - "Body" : "{\"etag\":\"speDXMCgF8XpQzurleTh0L2tnVs\",\"key\":\"key30682-41\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "904eb534-ea30-4535-95f7-b1f5818e29f0" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d4236e42-365b-4a17-9cb7-d41c764bfe0b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gs3W1llAsuBhdJRHn4mfePSUbmk\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDU=;sn=364105", + "x-ms-request-id" : "d4236e42-365b-4a17-9cb7-d41c764bfe0b", + "Body" : "{\"etag\":\"gs3W1llAsuBhdJRHn4mfePSUbmk\",\"key\":\"key99304-43\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "b09560f7-5e4d-4009-92cf-036eef8d67ee", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-42?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-45?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "68d5ada1-e75e-46a0-b0d4-5649e8095bd6", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIyOTk=;sn=242299", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0a6a4b7b-b965-4c57-b6b5-4cea64170d3e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\"", - "x-ms-request-id" : "0a6a4b7b-b965-4c57-b6b5-4cea64170d3e", - "Body" : "{\"etag\":\"KQdHiMZaTW8pV4lqIZwSWmGhlyd\",\"key\":\"key30682-42\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "fe9edbb1-e7e0-45cb-8921-3a373ef2e0b6" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bc61fb64-c9fb-4595-874e-8d1cf1fa4ed2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jAJUTj2G28FEtmEvxojY9icmfLY\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDY=;sn=364106", + "x-ms-request-id" : "bc61fb64-c9fb-4595-874e-8d1cf1fa4ed2", + "Body" : "{\"etag\":\"jAJUTj2G28FEtmEvxojY9icmfLY\",\"key\":\"key99304-45\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "68d5ada1-e75e-46a0-b0d4-5649e8095bd6", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-43?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-4?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d5392a36-b84f-4fea-920f-b6f9cb3a9d18", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDA=;sn=242300", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "87800790-a14e-4f81-98ac-b06238a46df0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "close", - "etag" : "\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\"", - "x-ms-request-id" : "87800790-a14e-4f81-98ac-b06238a46df0", - "Body" : "{\"etag\":\"HXo5dzSlTW0Mc5GgMiCvWXzQWPl\",\"key\":\"key30682-43\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "5f638020-bc8d-4acb-8b6f-9dbac8a26b82" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7081afc3-4284-4068-a318-76fe3ee70aab", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xpnir6rxcSj0QU1QZdR7HcKyB9B\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDc=;sn=364107", + "x-ms-request-id" : "7081afc3-4284-4068-a318-76fe3ee70aab", + "Body" : "{\"etag\":\"xpnir6rxcSj0QU1QZdR7HcKyB9B\",\"key\":\"key99304-4\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d5392a36-b84f-4fea-920f-b6f9cb3a9d18", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-44?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-46?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "db0bbe8d-87f9-4b79-8386-c4cbfc3d7713", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDE=;sn=242301", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ef7bde07-9fc0-45f5-bf9b-c504e5bd863a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"cREv0TieVnL8rnJbw16HEXzYoXg\"", - "x-ms-request-id" : "ef7bde07-9fc0-45f5-bf9b-c504e5bd863a", - "Body" : "{\"etag\":\"cREv0TieVnL8rnJbw16HEXzYoXg\",\"key\":\"key30682-44\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "e63a95e0-4035-458b-8183-0b354653d497" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a15a90e7-aa5a-4693-9b07-ace89e9a6ae2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xY1cWj6d0CgY2lj34EB0nMUUFXX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDg=;sn=364108", + "x-ms-request-id" : "a15a90e7-aa5a-4693-9b07-ace89e9a6ae2", + "Body" : "{\"etag\":\"xY1cWj6d0CgY2lj34EB0nMUUFXX\",\"key\":\"key99304-46\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "db0bbe8d-87f9-4b79-8386-c4cbfc3d7713", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-45?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-48?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "225da5f9-b5a3-47aa-a93a-56b7e38dda35", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDI=;sn=242302", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "59594e40-94a5-4d1d-8a2f-ef1b6f3af33e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\"", - "x-ms-request-id" : "59594e40-94a5-4d1d-8a2f-ef1b6f3af33e", - "Body" : "{\"etag\":\"GkfCr4ltzqgnXtFxBQBcDbsPw1P\",\"key\":\"key30682-45\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "3a79f2e8-386a-4d30-81c6-1427da8f2470" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "15df3f53-792a-4985-92f8-8e6bb4caa10f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMDk=;sn=364109", + "x-ms-request-id" : "15df3f53-792a-4985-92f8-8e6bb4caa10f", + "Body" : "{\"etag\":\"rSVvHnbFL9EwRlOn9w6n7xEMwyv\",\"key\":\"key99304-48\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "225da5f9-b5a3-47aa-a93a-56b7e38dda35", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-46?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-41?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d2624306-b0be-4281-9bb9-c6d4be50cc9a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDM=;sn=242303", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ddca713b-793e-4b9b-891e-80d23fbdbdc6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\"", - "x-ms-request-id" : "ddca713b-793e-4b9b-891e-80d23fbdbdc6", - "Body" : "{\"etag\":\"UmMaSIs0l0k5WEoXmNhYIxBqiR0\",\"key\":\"key30682-46\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "b981b668-e726-4abe-9682-6d7b667a073f" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "32066283-7277-4f07-bccd-c693ea85c898", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTA=;sn=364110", + "x-ms-request-id" : "32066283-7277-4f07-bccd-c693ea85c898", + "Body" : "{\"etag\":\"SQBDqqJ3Qw1kGl83Vw2thGtGgSl\",\"key\":\"key99304-41\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d2624306-b0be-4281-9bb9-c6d4be50cc9a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-47?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-47?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "22c70068-ee0d-4c39-ba23-d566e99a2e7f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDQ=;sn=242304", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "138b4ab7-683e-4694-beeb-958184af59a6", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"rpwfVtxCYrEnBdz749ciQpd4DEl\"", - "x-ms-request-id" : "138b4ab7-683e-4694-beeb-958184af59a6", - "Body" : "{\"etag\":\"rpwfVtxCYrEnBdz749ciQpd4DEl\",\"key\":\"key30682-47\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "44b0ec6f-0305-417a-9966-713ad0dded58" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b5c2c09a-5ef8-41aa-8c1c-1c530ef45bb1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5MMFywEspSKzXLyEjpsvUY7HRzR\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTE=;sn=364111", + "x-ms-request-id" : "b5c2c09a-5ef8-41aa-8c1c-1c530ef45bb1", + "Body" : "{\"etag\":\"5MMFywEspSKzXLyEjpsvUY7HRzR\",\"key\":\"key99304-47\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "22c70068-ee0d-4c39-ba23-d566e99a2e7f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-48?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-6?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dcb0084d-52af-439a-b6e9-4fc4d7ab57b8", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDU=;sn=242305", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0c450d64-1672-4b74-b1f2-1fe20177e0aa", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\"", - "x-ms-request-id" : "0c450d64-1672-4b74-b1f2-1fe20177e0aa", - "Body" : "{\"etag\":\"XmVGRqlVdBuMI7LzVvRhyXEnpEr\",\"key\":\"key30682-48\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "e2efd629-29ff-4d73-bc58-948c6abcc246" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "195b490c-2916-45e7-a80a-282e5753d984", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fOGNTUexfoNbo7dm0OeRCpfZH3w\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTI=;sn=364112", + "x-ms-request-id" : "195b490c-2916-45e7-a80a-282e5753d984", + "Body" : "{\"etag\":\"fOGNTUexfoNbo7dm0OeRCpfZH3w\",\"key\":\"key99304-6\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "dcb0084d-52af-439a-b6e9-4fc4d7ab57b8", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-49?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-44?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7b7f39ed-7416-4f98-993a-a887d6d7acd0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDY=;sn=242306", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0c80328a-9686-4e44-8472-a0d98be61dd2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:21 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"vsoyJe2EVEkkPkJphvFe5Bqp8al\"", - "x-ms-request-id" : "0c80328a-9686-4e44-8472-a0d98be61dd2", - "Body" : "{\"etag\":\"vsoyJe2EVEkkPkJphvFe5Bqp8al\",\"key\":\"key30682-49\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:21+00:00\"}", - "x-ms-client-request-id" : "08eef499-5792-44d9-ae24-c18a90a0636e" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a96c4f57-5e0e-4c5c-9358-de5ae72e832b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"bqqttoLB96T9XocpWRMQknOlRiS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTM=;sn=364113", + "x-ms-request-id" : "a96c4f57-5e0e-4c5c-9358-de5ae72e832b", + "Body" : "{\"etag\":\"bqqttoLB96T9XocpWRMQknOlRiS\",\"key\":\"key99304-44\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "7b7f39ed-7416-4f98-993a-a887d6d7acd0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-5?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-7?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5b356968-54f7-48ad-bed6-94aa5a641814", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDc=;sn=242307", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "eae54048-3a89-4665-9207-f0e30a5d0c33", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"xvWXKxQ0DjgiOXdIppCSo918sCT\"", - "x-ms-request-id" : "eae54048-3a89-4665-9207-f0e30a5d0c33", - "Body" : "{\"etag\":\"xvWXKxQ0DjgiOXdIppCSo918sCT\",\"key\":\"key30682-5\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "99a8db20-093e-472a-b577-345aec115969" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e50fa79b-e743-4d5e-a713-d434e10923c6", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gdtsYdyUXr2p6f9aF49KO8tII0T\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTQ=;sn=364114", + "x-ms-request-id" : "e50fa79b-e743-4d5e-a713-d434e10923c6", + "Body" : "{\"etag\":\"gdtsYdyUXr2p6f9aF49KO8tII0T\",\"key\":\"key99304-7\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "5b356968-54f7-48ad-bed6-94aa5a641814", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-6?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-8?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fe0f32a0-13e3-4810-81a0-5e09712e54dd", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDg=;sn=242308", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6ac36e3b-155d-43b4-a245-defa819f464c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\"", - "x-ms-request-id" : "6ac36e3b-155d-43b4-a245-defa819f464c", - "Body" : "{\"etag\":\"fHQX6ZQ5HkBFusOiD93Aj6wzc7E\",\"key\":\"key30682-6\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "6ec269a7-b973-4f3b-9618-c065b28b4cba" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ef51a768-b349-4c64-a1b5-401a2ce18500", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1GV25hcOOdt2K1eHXe4UG0H5SEF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTU=;sn=364115", + "x-ms-request-id" : "ef51a768-b349-4c64-a1b5-401a2ce18500", + "Body" : "{\"etag\":\"1GV25hcOOdt2K1eHXe4UG0H5SEF\",\"key\":\"key99304-8\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "fe0f32a0-13e3-4810-81a0-5e09712e54dd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-7?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-5?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "562eb1d1-9864-4035-a34a-428a012f9ff9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMDk=;sn=242309", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1b5e31ee-ec02-4c44-a562-17fca38ae614", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\"", - "x-ms-request-id" : "1b5e31ee-ec02-4c44-a562-17fca38ae614", - "Body" : "{\"etag\":\"eJn4SKRUaaxsO7DdmbZGBHQ1ExE\",\"key\":\"key30682-7\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "30659153-8213-42ce-9b85-7d9f7f567257" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "85e8523b-0057-478d-8e93-d35d8ec0d26b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B59roZdHRq5d01subExNMn6Z6UW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTY=;sn=364116", + "x-ms-request-id" : "85e8523b-0057-478d-8e93-d35d8ec0d26b", + "Body" : "{\"etag\":\"B59roZdHRq5d01subExNMn6Z6UW\",\"key\":\"key99304-5\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "562eb1d1-9864-4035-a34a-428a012f9ff9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-8?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-49?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7192262-c542-4cfe-9e74-01af3a43f705", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMTA=;sn=242310", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "53e2663e-b127-485b-a677-686bcb89be77", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"zyEVdnrrWWaBJRJXvN3isfXeUV3\"", - "x-ms-request-id" : "53e2663e-b127-485b-a677-686bcb89be77", - "Body" : "{\"etag\":\"zyEVdnrrWWaBJRJXvN3isfXeUV3\",\"key\":\"key30682-8\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "23f580cf-eab0-4bb9-ab53-04ff71ae9e67" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4dd0a44f-70bd-4365-b06d-38dd30f7fb38", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"j7wRmaYYhIbCdxn9F6AoX1soRpA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTc=;sn=364117", + "x-ms-request-id" : "4dd0a44f-70bd-4365-b06d-38dd30f7fb38", + "Body" : "{\"etag\":\"j7wRmaYYhIbCdxn9F6AoX1soRpA\",\"key\":\"key99304-49\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "d7192262-c542-4cfe-9e74-01af3a43f705", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key30682-9?label=3cb30545", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key99304-9?label=16fa6f19", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "988c5cc1-1663-4021-8cc7-11b210f22f5c", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 29 Apr 2019 16:17:22 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyNDIzMTE=;sn=242311", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "61e5a792-66f7-4f49-ba27-2ce01343396c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Mon, 29 Apr 2019 16:17:19 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"qYMKx1USUtyKPoElfcgHSi26dli\"", - "x-ms-request-id" : "61e5a792-66f7-4f49-ba27-2ce01343396c", - "Body" : "{\"etag\":\"qYMKx1USUtyKPoElfcgHSi26dli\",\"key\":\"key30682-9\",\"label\":\"3cb30545\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-29T16:17:19+00:00\"}", - "x-ms-client-request-id" : "9150f460-abfb-40db-9b8f-b286a9b9a97d" - } + "Date" : "Wed, 02 Oct 2019 20:46:54 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5ac7cf48-130d-4e7c-adf9-e2198fa66048", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rNOH45oAkFJoU1p6qs3x0jTGFvx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQxMTg=;sn=364118", + "x-ms-request-id" : "5ac7cf48-130d-4e7c-adf9-e2198fa66048", + "Body" : "{\"etag\":\"rNOH45oAkFJoU1p6qs3x0jTGFvx\",\"key\":\"key99304-9\",\"label\":\"16fa6f19\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:54+00:00\"}", + "x-ms-client-request-id" : "988c5cc1-1663-4021-8cc7-11b210f22f5c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key30682", "3cb30545" ] -} + "variables" : [ "key99304", "16fa6f19" ] +} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json index 1911e75ce77a..96d155ca03e9 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithKeyAndLabel.json @@ -1,118 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key02726080348?label=lbl45343", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5259539810b?label=lbl35135", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "463a9ea1-c601-4cec-ae7c-724d0b57053a", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzQ=;sn=228174", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "57a90aea-1e8e-4fe7-8c7b-96e63da7db64", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ac7qI13RKtpXPiKKrLo9VtWggEO\"", - "x-ms-request-id" : "57a90aea-1e8e-4fe7-8c7b-96e63da7db64", - "Body" : "{\"etag\":\"ac7qI13RKtpXPiKKrLo9VtWggEO\",\"key\":\"key02726080348\",\"label\":\"lbl45343\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "4b915220-a35d-4ed4-af12-a35e288b967a" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2a3a3bf7-7af9-46ef-8f28-baadb698d275", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"LCgVMP0zWr3YD1uIfD9oknsNbiw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDc=;sn=364007", + "x-ms-request-id" : "2a3a3bf7-7af9-46ef-8f28-baadb698d275", + "Body" : "{\"etag\":\"LCgVMP0zWr3YD1uIfD9oknsNbiw\",\"key\":\"key5259539810b\",\"label\":\"lbl35135\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "463a9ea1-c601-4cec-ae7c-724d0b57053a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key02726080348&label=lbl45343", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key5259539810b&label=lbl35135", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c28e5473-c249-403d-b093-2241cf6156e6", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzQ=;sn=228174", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "869b17cd-071e-4174-aa0a-b380675fb1ce", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "869b17cd-071e-4174-aa0a-b380675fb1ce", - "Body" : "{\"items\":[{\"etag\":\"ac7qI13RKtpXPiKKrLo9VtWggEO\",\"key\":\"key02726080348\",\"label\":\"lbl45343\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "560b1527-4f65-4f9a-8a10-6264855b9173" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6a05e9e2-725f-4517-b588-15b14446912f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDc=;sn=364007", + "x-ms-request-id" : "6a05e9e2-725f-4517-b588-15b14446912f", + "Body" : "{\"items\":[{\"etag\":\"LCgVMP0zWr3YD1uIfD9oknsNbiw\",\"key\":\"key5259539810b\",\"label\":\"lbl35135\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}]}", + "x-ms-client-request-id" : "c28e5473-c249-403d-b093-2241cf6156e6", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key02726080348", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key5259539810b", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e7c90a03-786a-421b-ba7f-8092d579e1b9", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzQ=;sn=228174", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "71a7ddde-cb04-4fb5-ac42-0f7c0de10650", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "71a7ddde-cb04-4fb5-ac42-0f7c0de10650", - "Body" : "{\"items\":[{\"etag\":\"ac7qI13RKtpXPiKKrLo9VtWggEO\",\"key\":\"key02726080348\",\"label\":\"lbl45343\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "6fedb8c6-31b0-4e3e-9599-8cb21d11e7c4" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c8826549-031c-42d0-bbef-f41a141276ee", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDc=;sn=364007", + "x-ms-request-id" : "c8826549-031c-42d0-bbef-f41a141276ee", + "Body" : "{\"items\":[{\"etag\":\"LCgVMP0zWr3YD1uIfD9oknsNbiw\",\"key\":\"key5259539810b\",\"label\":\"lbl35135\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}]}", + "x-ms-client-request-id" : "e7c90a03-786a-421b-ba7f-8092d579e1b9", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key02726%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key52595%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5c23aa17-552b-47e6-9748-28d9ad746c7e", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzQ=;sn=228174", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "357e9b29-1553-4b37-8c93-9e4e4e56936c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "357e9b29-1553-4b37-8c93-9e4e4e56936c", - "Body" : "{\"items\":[{\"etag\":\"ac7qI13RKtpXPiKKrLo9VtWggEO\",\"key\":\"key02726080348\",\"label\":\"lbl45343\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}]}", - "x-ms-client-request-id" : "4fbbb46a-180c-4aa3-b08e-acdfa16aeeb9" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7e047f7f-f933-4caf-919e-aeee3d626ef2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDc=;sn=364007", + "x-ms-request-id" : "7e047f7f-f933-4caf-919e-aeee3d626ef2", + "Body" : "{\"items\":[{\"etag\":\"LCgVMP0zWr3YD1uIfD9oknsNbiw\",\"key\":\"key5259539810b\",\"label\":\"lbl35135\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}]}", + "x-ms-client-request-id" : "5c23aa17-552b-47e6-9748-28d9ad746c7e", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key02726080348?label=lbl45343", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key5259539810b?label=lbl35135", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2546fcff-1210-428f-ac5c-6c91e8f4f15f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzU=;sn=228175", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "84822af7-9cd4-419f-b93e-092195af79c2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:50 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"ac7qI13RKtpXPiKKrLo9VtWggEO\"", - "x-ms-request-id" : "84822af7-9cd4-419f-b93e-092195af79c2", - "Body" : "{\"etag\":\"ac7qI13RKtpXPiKKrLo9VtWggEO\",\"key\":\"key02726080348\",\"label\":\"lbl45343\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:50+00:00\"}", - "x-ms-client-request-id" : "2a996e79-4d62-46c2-afcb-56e0691afec5" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "062df248-f0aa-4828-ab06-b28efefd19c3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"LCgVMP0zWr3YD1uIfD9oknsNbiw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDg=;sn=364008", + "x-ms-request-id" : "062df248-f0aa-4828-ab06-b28efefd19c3", + "Body" : "{\"etag\":\"LCgVMP0zWr3YD1uIfD9oknsNbiw\",\"key\":\"key5259539810b\",\"label\":\"lbl35135\",\"content_type\":null,\"value\":\"myValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:51+00:00\"}", + "x-ms-client-request-id" : "2546fcff-1210-428f-ac5c-6c91e8f4f15f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key02726", "431019df", "key02726080348", "lbl45343" ] + "variables" : [ "key52595", "aeeea7d1", "key5259539810b", "lbl35135" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json index c4b45f1c4b6f..a2f9fe8bccdf 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleKeys.json @@ -1,144 +1,186 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key14825408996", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72722305097", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de01cfe4-79f7-449a-a023-fef78af75134", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTI=;sn=228152", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "dffcb7cc-028c-411a-8e40-bd7ebad22157", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\"", - "x-ms-request-id" : "dffcb7cc-028c-411a-8e40-bd7ebad22157", - "Body" : "{\"etag\":\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\",\"key\":\"key14825408996\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "79f0188b-ce12-40d0-b956-b30ee6592a31" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6852169f-2e78-4bc7-a72e-81cd18007063", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"2dCSQ6SygvFuO5EopSehWgrSCdp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4Nzk=;sn=363879", + "x-ms-request-id" : "6852169f-2e78-4bc7-a72e-81cd18007063", + "Body" : "{\"etag\":\"2dCSQ6SygvFuO5EopSehWgrSCdp\",\"key\":\"key72722305097\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "de01cfe4-79f7-449a-a023-fef78af75134", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key14825092291", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7272243605c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bd1e096d-5e8f-453e-91d0-9515e320cb12", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:47 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTM=;sn=228153", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0011b86b-029c-4d5d-96fa-4017ed0ba201", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"yG5igvRrjq4lNcgjKxiIdZG67mM\"", - "x-ms-request-id" : "0011b86b-029c-4d5d-96fa-4017ed0ba201", - "Body" : "{\"etag\":\"yG5igvRrjq4lNcgjKxiIdZG67mM\",\"key\":\"key14825092291\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "8fb53574-75eb-4e42-87c5-3b7861257122" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9d893b56-9317-4e2a-870e-45abc41e05af", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"H5q710FHXCOcJCOB6Q6XonUf1L6\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODA=;sn=363880", + "x-ms-request-id" : "9d893b56-9317-4e2a-870e-45abc41e05af", + "Body" : "{\"etag\":\"H5q710FHXCOcJCOB6Q6XonUf1L6\",\"key\":\"key7272243605c\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "bd1e096d-5e8f-453e-91d0-9515e320cb12", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key14825408996%2ckey14825092291", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key72722305097%2ckey7272243605c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dee56a10-922d-4aa6-884e-d1b230651146", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTM=;sn=228153", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3aa9abb7-9018-4c96-86d9-0f4b88e6d733", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "3aa9abb7-9018-4c96-86d9-0f4b88e6d733", - "Body" : "{\"items\":[{\"etag\":\"yG5igvRrjq4lNcgjKxiIdZG67mM\",\"key\":\"key14825092291\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\",\"key\":\"key14825408996\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}]}", - "x-ms-client-request-id" : "bb5b59d6-ec14-4621-a912-b0df0db17ded" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f774ef97-c9fd-4aff-a8f8-c922b36d03a1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODA=;sn=363880", + "x-ms-request-id" : "f774ef97-c9fd-4aff-a8f8-c922b36d03a1", + "Body" : "{\"items\":[{\"etag\":\"2dCSQ6SygvFuO5EopSehWgrSCdp\",\"key\":\"key72722305097\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"},{\"etag\":\"H5q710FHXCOcJCOB6Q6XonUf1L6\",\"key\":\"key7272243605c\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}]}", + "x-ms-client-request-id" : "dee56a10-922d-4aa6-884e-d1b230651146", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key14825%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key72722%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d649f3f8-8059-4fa2-a79e-efac0697e15d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTM=;sn=228153", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "c6572e1a-801f-4596-914c-cf03cee1621c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "c6572e1a-801f-4596-914c-cf03cee1621c", - "Body" : "{\"items\":[{\"etag\":\"yG5igvRrjq4lNcgjKxiIdZG67mM\",\"key\":\"key14825092291\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\",\"key\":\"key14825408996\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}]}", - "x-ms-client-request-id" : "4c962205-2642-449e-8784-227da3f83264" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bc74eb27-2405-4972-aa70-dd694be09829", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODA=;sn=363880", + "x-ms-request-id" : "bc74eb27-2405-4972-aa70-dd694be09829", + "Body" : "{\"items\":[{\"etag\":\"2dCSQ6SygvFuO5EopSehWgrSCdp\",\"key\":\"key72722305097\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"},{\"etag\":\"H5q710FHXCOcJCOB6Q6XonUf1L6\",\"key\":\"key7272243605c\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}]}", + "x-ms-client-request-id" : "d649f3f8-8059-4fa2-a79e-efac0697e15d", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key14825092291", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key72722305097", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b6607998-7f92-4c30-8feb-d428b2ddab72", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTQ=;sn=228154", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "92f71b37-0b52-4f1e-9791-46f18125e9bf", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"yG5igvRrjq4lNcgjKxiIdZG67mM\"", - "x-ms-request-id" : "92f71b37-0b52-4f1e-9791-46f18125e9bf", - "Body" : "{\"etag\":\"yG5igvRrjq4lNcgjKxiIdZG67mM\",\"key\":\"key14825092291\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "1edf10a2-f15a-4884-98b7-26d7d3b7cce8" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3e46dab1-2101-4b9a-906e-24d15ca1ae95", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"2dCSQ6SygvFuO5EopSehWgrSCdp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODE=;sn=363881", + "x-ms-request-id" : "3e46dab1-2101-4b9a-906e-24d15ca1ae95", + "Body" : "{\"etag\":\"2dCSQ6SygvFuO5EopSehWgrSCdp\",\"key\":\"key72722305097\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "b6607998-7f92-4c30-8feb-d428b2ddab72", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key14825408996", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key7272243605c", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d7332470-7954-40c1-8c5e-c1c4a05e0d34", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTU=;sn=228155", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f713c746-145a-4cc5-a6c5-603b0a0adf8f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\"", - "x-ms-request-id" : "f713c746-145a-4cc5-a6c5-603b0a0adf8f", - "Body" : "{\"etag\":\"CJat4lBj8TrBsO1v9Tf7t0Zwqdf\",\"key\":\"key14825408996\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "411fd6df-b566-4b2b-b9be-25668d9384b7" - } + "Date" : "Wed, 02 Oct 2019 20:46:38 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1aeaf3b0-f3bc-46b1-ac05-9d52b3de7499", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"H5q710FHXCOcJCOB6Q6XonUf1L6\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODI=;sn=363882", + "x-ms-request-id" : "1aeaf3b0-f3bc-46b1-ac05-9d52b3de7499", + "Body" : "{\"etag\":\"H5q710FHXCOcJCOB6Q6XonUf1L6\",\"key\":\"key7272243605c\",\"label\":null,\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:39+00:00\"}", + "x-ms-client-request-id" : "d7332470-7954-40c1-8c5e-c1c4a05e0d34", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key14825", "51cf4d15", "key14825408996", "key14825092291" ] + "variables" : [ "key72722", "f371c8ae", "key72722305097", "key7272243605c" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json index 162a0ac2f5bb..02ceeae33bda 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listWithMultipleLabels.json @@ -1,144 +1,186 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key55481552829?label=8a547e84272803", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key12095076087?label=f4dcf7ee898666", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f7f0e1ad-cde8-4d48-928c-d70c2fc2b627", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwODk=;sn=228089", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1e3eeb1a-2d85-4883-b644-21761e67e727", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6DiyhVHPcexjK0y9Avpib5F4ZNF\"", - "x-ms-request-id" : "1e3eeb1a-2d85-4883-b644-21761e67e727", - "Body" : "{\"etag\":\"6DiyhVHPcexjK0y9Avpib5F4ZNF\",\"key\":\"key55481552829\",\"label\":\"8a547e84272803\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "83f4db4f-49ff-498c-8b24-8566007576b3" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6d61fcdf-ecf0-4c5a-bd18-e2e938afcba3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"zAn1KGbD9D9xa9ypYslxotJblsA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTY=;sn=363816", + "x-ms-request-id" : "6d61fcdf-ecf0-4c5a-bd18-e2e938afcba3", + "Body" : "{\"etag\":\"zAn1KGbD9D9xa9ypYslxotJblsA\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee898666\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "f7f0e1ad-cde8-4d48-928c-d70c2fc2b627", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key55481552829?label=8a547e8439365e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key12095076087?label=f4dcf7ee46777e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "12634fea-d7f4-41fb-92db-9c18c11fcf29", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTA=;sn=228090", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "6020183b-e036-4e30-af07-3a0924c5cf08", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"E95PrGzijXfeNsulv8DDtWWALQG\"", - "x-ms-request-id" : "6020183b-e036-4e30-af07-3a0924c5cf08", - "Body" : "{\"etag\":\"E95PrGzijXfeNsulv8DDtWWALQG\",\"key\":\"key55481552829\",\"label\":\"8a547e8439365e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "c3a48e22-cb7b-4c9b-8824-c37af6380b97" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c0080b82-b6fa-4f35-b449-0dc39a6a9d72", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTc=;sn=363817", + "x-ms-request-id" : "c0080b82-b6fa-4f35-b449-0dc39a6a9d72", + "Body" : "{\"etag\":\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee46777e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "12634fea-d7f4-41fb-92db-9c18c11fcf29", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key55481552829&label=8a547e84272803%2c8a547e8439365e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key12095076087&label=f4dcf7ee898666%2cf4dcf7ee46777e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "14db27d1-4a23-4763-ac51-06243eee528b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTA=;sn=228090", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "50ea6f56-b972-4598-956d-00224254bcbc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "50ea6f56-b972-4598-956d-00224254bcbc", - "Body" : "{\"items\":[{\"etag\":\"6DiyhVHPcexjK0y9Avpib5F4ZNF\",\"key\":\"key55481552829\",\"label\":\"8a547e84272803\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"E95PrGzijXfeNsulv8DDtWWALQG\",\"key\":\"key55481552829\",\"label\":\"8a547e8439365e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}]}", - "x-ms-client-request-id" : "d52d48ad-3682-4555-ba1b-b945efe04b63" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a2d04562-9fc6-4723-a946-7e17c3a50c5f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTc=;sn=363817", + "x-ms-request-id" : "a2d04562-9fc6-4723-a946-7e17c3a50c5f", + "Body" : "{\"items\":[{\"etag\":\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee46777e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"},{\"etag\":\"zAn1KGbD9D9xa9ypYslxotJblsA\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee898666\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}]}", + "x-ms-client-request-id" : "14db27d1-4a23-4763-ac51-06243eee528b", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key55481%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key12095%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c8fe946-e10f-4116-bf32-7850019abd5f", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTA=;sn=228090", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "89761a9c-103c-4a10-b5f7-d731944e24c0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "89761a9c-103c-4a10-b5f7-d731944e24c0", - "Body" : "{\"items\":[{\"etag\":\"6DiyhVHPcexjK0y9Avpib5F4ZNF\",\"key\":\"key55481552829\",\"label\":\"8a547e84272803\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"E95PrGzijXfeNsulv8DDtWWALQG\",\"key\":\"key55481552829\",\"label\":\"8a547e8439365e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}]}", - "x-ms-client-request-id" : "2448c5b7-be9c-4599-a206-49276133b6fa" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e92b0d2c-5127-41e7-b81b-40ed278e6033", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTc=;sn=363817", + "x-ms-request-id" : "e92b0d2c-5127-41e7-b81b-40ed278e6033", + "Body" : "{\"items\":[{\"etag\":\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee46777e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"},{\"etag\":\"zAn1KGbD9D9xa9ypYslxotJblsA\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee898666\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}]}", + "x-ms-client-request-id" : "1c8fe946-e10f-4116-bf32-7850019abd5f", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key55481552829?label=8a547e84272803", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key12095076087?label=f4dcf7ee46777e", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4bd5683d-e1f5-4dc0-ba66-bb1ade41b949", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTE=;sn=228091", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "73916fa1-d204-41f7-a753-39db2fb8162a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"6DiyhVHPcexjK0y9Avpib5F4ZNF\"", - "x-ms-request-id" : "73916fa1-d204-41f7-a753-39db2fb8162a", - "Body" : "{\"etag\":\"6DiyhVHPcexjK0y9Avpib5F4ZNF\",\"key\":\"key55481552829\",\"label\":\"8a547e84272803\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "56b9b76a-9313-4d62-b7d9-469ee8b7e760" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ac7eab1e-1b94-4f13-8cb3-1c8ef51273ab", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTg=;sn=363818", + "x-ms-request-id" : "ac7eab1e-1b94-4f13-8cb3-1c8ef51273ab", + "Body" : "{\"etag\":\"3NfnUu0mgyStxXr2CA0QUGM7c3Z\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee46777e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "4bd5683d-e1f5-4dc0-ba66-bb1ade41b949", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key55481552829?label=8a547e8439365e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key12095076087?label=f4dcf7ee898666", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "65d898e1-c75d-4c23-a67f-4195584e593d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTI=;sn=228092", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0edb191b-2902-4caf-9553-4fa1ea8ad492", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"E95PrGzijXfeNsulv8DDtWWALQG\"", - "x-ms-request-id" : "0edb191b-2902-4caf-9553-4fa1ea8ad492", - "Body" : "{\"etag\":\"E95PrGzijXfeNsulv8DDtWWALQG\",\"key\":\"key55481552829\",\"label\":\"8a547e8439365e\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "69b53923-4349-449b-96ce-c161ed2aec67" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9da4e879-7fc3-42c5-ac51-c0dc2d1a9f9c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"zAn1KGbD9D9xa9ypYslxotJblsA\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MTk=;sn=363819", + "x-ms-request-id" : "9da4e879-7fc3-42c5-ac51-c0dc2d1a9f9c", + "Body" : "{\"etag\":\"zAn1KGbD9D9xa9ypYslxotJblsA\",\"key\":\"key12095076087\",\"label\":\"f4dcf7ee898666\",\"content_type\":null,\"value\":\"value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "65d898e1-c75d-4c23-a67f-4195584e593d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key55481", "8a547e84", "key55481552829", "8a547e84272803", "8a547e8439365e" ] + "variables" : [ "key12095", "f4dcf7ee", "key12095076087", "f4dcf7ee898666", "f4dcf7ee46777e" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json index 1153b7f0d700..2b6b604764f5 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSetting.json @@ -1,122 +1,157 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3164175626d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14118383030", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ecd2dca5-69b6-4cf9-8f29-ccd37b7101e1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODM=;sn=228183", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "88f31c6a-3517-4744-8be6-dc31def6c33f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"utC6IZxPhkgDwF1JGAAQj9ip2Ta\"", - "x-ms-request-id" : "88f31c6a-3517-4744-8be6-dc31def6c33f", - "Body" : "{\"etag\":\"utC6IZxPhkgDwF1JGAAQj9ip2Ta\",\"key\":\"key3164175626d\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "94178ce2-ec58-496c-b5c5-bdd14f687697" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "055bb577-ef0f-4f36-9b3c-41a913a0f4b2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WWRvaQq2dfKARZGkYwwEASFHnyC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMDk=;sn=364009", + "x-ms-request-id" : "055bb577-ef0f-4f36-9b3c-41a913a0f4b2", + "Body" : "{\"etag\":\"WWRvaQq2dfKARZGkYwwEASFHnyC\",\"key\":\"key14118383030\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "ecd2dca5-69b6-4cf9-8f29-ccd37b7101e1", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3164175626d?label=e181d71001091e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14118383030?label=3844e6e6744284", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9885f8f9-88db-4129-b962-f2df11040167", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODQ=;sn=228184", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "772f6193-ff55-4124-a254-dfe67bbe8c09", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FlQn7KnJhyFKRJpKeht7X6y5pNJ\"", - "x-ms-request-id" : "772f6193-ff55-4124-a254-dfe67bbe8c09", - "Body" : "{\"etag\":\"FlQn7KnJhyFKRJpKeht7X6y5pNJ\",\"key\":\"key3164175626d\",\"label\":\"e181d71001091e\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "e71c1c71-a837-429a-8092-916b38c1092d" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "733068cf-7c42-45b4-9383-c406ba21d9e0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"NF89ohK4SEpsOpy2JqfMd7JJnNh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTA=;sn=364010", + "x-ms-request-id" : "733068cf-7c42-45b4-9383-c406ba21d9e0", + "Body" : "{\"etag\":\"NF89ohK4SEpsOpy2JqfMd7JJnNh\",\"key\":\"key14118383030\",\"label\":\"3844e6e6744284\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "9885f8f9-88db-4129-b962-f2df11040167", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key31641%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key14118%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "29edffdc-0950-4068-ba75-95d3f9000096", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODQ=;sn=228184", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3d0a4b8f-fe8a-4f65-8f5d-02f35e1b6d75", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "3d0a4b8f-fe8a-4f65-8f5d-02f35e1b6d75", - "Body" : "{\"items\":[{\"etag\":\"utC6IZxPhkgDwF1JGAAQj9ip2Ta\",\"key\":\"key3164175626d\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"},{\"etag\":\"FlQn7KnJhyFKRJpKeht7X6y5pNJ\",\"key\":\"key3164175626d\",\"label\":\"e181d71001091e\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}]}", - "x-ms-client-request-id" : "5acb950d-0536-4c80-878f-da4e739be148" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a0582df5-11c1-4fcb-a2b7-ee18545fccd5", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTA=;sn=364010", + "x-ms-request-id" : "a0582df5-11c1-4fcb-a2b7-ee18545fccd5", + "Body" : "{\"items\":[{\"etag\":\"WWRvaQq2dfKARZGkYwwEASFHnyC\",\"key\":\"key14118383030\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"},{\"etag\":\"NF89ohK4SEpsOpy2JqfMd7JJnNh\",\"key\":\"key14118383030\",\"label\":\"3844e6e6744284\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}]}", + "x-ms-client-request-id" : "29edffdc-0950-4068-ba75-95d3f9000096", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3164175626d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14118383030?label=3844e6e6744284", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "67fc61f9-090d-4905-af13-0f8833caa9c7", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODU=;sn=228185", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "0e1c747e-f611-458f-947b-9bc63ecce11e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"utC6IZxPhkgDwF1JGAAQj9ip2Ta\"", - "x-ms-request-id" : "0e1c747e-f611-458f-947b-9bc63ecce11e", - "Body" : "{\"etag\":\"utC6IZxPhkgDwF1JGAAQj9ip2Ta\",\"key\":\"key3164175626d\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "0f2ed6de-5585-425b-ac03-62b529e1b968" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3b5aa0ca-5287-479f-882d-cf8fb923266a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"NF89ohK4SEpsOpy2JqfMd7JJnNh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTI=;sn=364012", + "x-ms-request-id" : "3b5aa0ca-5287-479f-882d-cf8fb923266a", + "Body" : "{\"etag\":\"NF89ohK4SEpsOpy2JqfMd7JJnNh\",\"key\":\"key14118383030\",\"label\":\"3844e6e6744284\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "67fc61f9-090d-4905-af13-0f8833caa9c7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3164175626d?label=e181d71001091e", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key14118383030", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6e1faf96-ce85-4855-8f11-c272072df7da", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODY=;sn=228186", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a583a09f-474d-4436-ae85-923d4aeff85d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FlQn7KnJhyFKRJpKeht7X6y5pNJ\"", - "x-ms-request-id" : "a583a09f-474d-4436-ae85-923d4aeff85d", - "Body" : "{\"etag\":\"FlQn7KnJhyFKRJpKeht7X6y5pNJ\",\"key\":\"key3164175626d\",\"label\":\"e181d71001091e\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "9caa3033-de30-4505-a79f-ab30efd2a1da" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d76f1c73-c96a-4f82-91a8-a7cb98879ee7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WWRvaQq2dfKARZGkYwwEASFHnyC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjQwMTE=;sn=364011", + "x-ms-request-id" : "d76f1c73-c96a-4f82-91a8-a7cb98879ee7", + "Body" : "{\"etag\":\"WWRvaQq2dfKARZGkYwwEASFHnyC\",\"key\":\"key14118383030\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:52+00:00\"}", + "x-ms-client-request-id" : "6e1faf96-ce85-4855-8f11-c272072df7da", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key31641", "e181d710", "key3164175626d", "e181d71001091e" ] + "variables" : [ "key14118", "3844e6e6", "key14118383030", "3844e6e6744284" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json index 9d5847f0b2d3..e4941c92842d 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyKey.json @@ -1,44 +1,58 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3ec75536-8955-4ff8-8e73-6c7b93687f50", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "405", - "x-ms-request-id" : "ee98a6b9-8b12-46a0-9abc-21f516ae31fd", - "x-ms-client-request-id" : "b3d3b720-dc30-4806-873c-36fce8fe3a10", - "x-ms-correlation-request-id" : "ee98a6b9-8b12-46a0-9abc-21f516ae31fd", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "01115a82-954f-476c-b910-d6cdad0b307e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "01115a82-954f-476c-b910-d6cdad0b307e", + "x-ms-client-request-id" : "3ec75536-8955-4ff8-8e73-6c7b93687f50" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key96750%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key61531%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f17cfe3a-1663-4b03-9fd1-7b4a9b932021", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "0294b797-e5f0-426b-8119-879f866f7c5c", + "Date" : "Wed, 02 Oct 2019 20:46:51 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1115e9bf-82a6-4f47-8c3b-8c3d9b13f1a1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "1115e9bf-82a6-4f47-8c3b-8c3d9b13f1a1", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "b69f0b9b-734b-425c-9698-7bffb8104a1b", - "x-ms-correlation-request-id" : "0294b797-e5f0-426b-8119-879f866f7c5c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "f17cfe3a-1663-4b03-9fd1-7b4a9b932021", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key96750", "fb62af8e" ] + "variables" : [ "key61531", "5b508b50" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json index 2cdf9504648a..cf3540f6f911 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingEmptyValue.json @@ -1,170 +1,219 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de4626a9-45bb-4746-8d83-94098e5e0a1b", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTM=;sn=228093", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "3c0c1db3-2c55-472a-b75c-5aa02ed2597f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\"", - "x-ms-request-id" : "3c0c1db3-2c55-472a-b75c-5aa02ed2597f", - "Body" : "{\"etag\":\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\",\"key\":\"key7453453048d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "5df94299-6294-48f1-9bc3-42966c24c4ad" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "735f5c83-ceea-4eed-b7f3-689e5c608fa4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rADakSch9uOVgblJ8PKYl6QEmbU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjA=;sn=363820", + "x-ms-request-id" : "735f5c83-ceea-4eed-b7f3-689e5c608fa4", + "Body" : "{\"etag\":\"rADakSch9uOVgblJ8PKYl6QEmbU\",\"key\":\"key25284131054\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "de4626a9-45bb-4746-8d83-94098e5e0a1b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62ff4c8e-f154-49d8-b921-6fddd48842b0", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTM=;sn=228093", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "64e923d3-8718-41ea-9411-5f9667ddcf6e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\"", - "x-ms-request-id" : "64e923d3-8718-41ea-9411-5f9667ddcf6e", - "Body" : "{\"etag\":\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\",\"key\":\"key7453453048d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "67d59c1e-69b7-4fd4-9265-895b33b45140" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7cfc9cff-b632-43fd-acc2-3f6f7577ea1b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rADakSch9uOVgblJ8PKYl6QEmbU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjA=;sn=363820", + "x-ms-request-id" : "7cfc9cff-b632-43fd-acc2-3f6f7577ea1b", + "Body" : "{\"etag\":\"rADakSch9uOVgblJ8PKYl6QEmbU\",\"key\":\"key25284131054\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "62ff4c8e-f154-49d8-b921-6fddd48842b0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3d951a3f-1c10-4365-9187-9c28d86016ad", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTQ=;sn=228094", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "10818b18-524f-4c6f-909a-c48396545549", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:41 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\"", - "x-ms-request-id" : "10818b18-524f-4c6f-909a-c48396545549", - "Body" : "{\"etag\":\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\",\"key\":\"key7453453048d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}", - "x-ms-client-request-id" : "ce05932d-8a78-469b-88ad-22b929fb8047" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "69477124-95c4-434f-b162-503c39fd9233", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjE=;sn=363821", + "x-ms-request-id" : "69477124-95c4-434f-b162-503c39fd9233", + "Body" : "{\"etag\":\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\",\"key\":\"key25284131054-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "3d951a3f-1c10-4365-9187-9c28d86016ad", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "db958c85-72b7-44b7-b9a1-fb84466a73cc", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTQ=;sn=228094", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "bc75d81e-44a3-4061-aed0-8d02e2c540f2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:41 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\"", - "x-ms-request-id" : "bc75d81e-44a3-4061-aed0-8d02e2c540f2", - "Body" : "{\"etag\":\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\",\"key\":\"key7453453048d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}", - "x-ms-client-request-id" : "f63c4820-e370-4439-bd89-50067176900c" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "368b68c9-b01c-4de1-a728-17878802ed65", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjE=;sn=363821", + "x-ms-request-id" : "368b68c9-b01c-4de1-a728-17878802ed65", + "Body" : "{\"etag\":\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\",\"key\":\"key25284131054-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "db958c85-72b7-44b7-b9a1-fb84466a73cc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key74534%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key25284%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "41b845ca-ff8e-4832-bdb5-24e1d37b8a82", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTQ=;sn=228094", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "61d0981e-fc2b-40c1-bcd7-79ba30941e2c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "61d0981e-fc2b-40c1-bcd7-79ba30941e2c", - "Body" : "{\"items\":[{\"etag\":\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\",\"key\":\"key7453453048d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"},{\"etag\":\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\",\"key\":\"key7453453048d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}]}", - "x-ms-client-request-id" : "c5ed0439-218a-4b2d-b5a0-a1401c3263c3" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "55acf264-ebf1-4705-a8a3-dc47ef5428f7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjE=;sn=363821", + "x-ms-request-id" : "55acf264-ebf1-4705-a8a3-dc47ef5428f7", + "Body" : "{\"items\":[{\"etag\":\"rADakSch9uOVgblJ8PKYl6QEmbU\",\"key\":\"key25284131054\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"},{\"etag\":\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\",\"key\":\"key25284131054-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}]}", + "x-ms-client-request-id" : "41b845ca-ff8e-4832-bdb5-24e1d37b8a82", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "80515fe5-e282-4a2d-9cec-2d5a60b2e348", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTU=;sn=228095", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1486a119-7a39-4bd1-a9d2-c18d34a65f40", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:40 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\"", - "x-ms-request-id" : "1486a119-7a39-4bd1-a9d2-c18d34a65f40", - "Body" : "{\"etag\":\"5G0ak7czqe9EdgZ9LvKGeP4pjkD\",\"key\":\"key7453453048d\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:40+00:00\"}", - "x-ms-client-request-id" : "d36873cd-4004-417d-8c87-42b765f54718" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "65dfb019-d7d2-4264-aae2-0920516866b4", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rADakSch9uOVgblJ8PKYl6QEmbU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjI=;sn=363822", + "x-ms-request-id" : "65dfb019-d7d2-4264-aae2-0920516866b4", + "Body" : "{\"etag\":\"rADakSch9uOVgblJ8PKYl6QEmbU\",\"key\":\"key25284131054\",\"label\":null,\"content_type\":null,\"value\":null,\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "80515fe5-e282-4a2d-9cec-2d5a60b2e348", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key7453453048d-1", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key25284131054-1", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72b27a67-b13b-410b-a437-9026660df4b4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwOTY=;sn=228096", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "f116983e-e1ca-48ee-b9ee-168aa7d72bfc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:41 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\"", - "x-ms-request-id" : "f116983e-e1ca-48ee-b9ee-168aa7d72bfc", - "Body" : "{\"etag\":\"q7tv7BCiE8ZZiO5BsGesGyeJmQA\",\"key\":\"key7453453048d-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:41+00:00\"}", - "x-ms-client-request-id" : "c7cb0b3e-bd41-488b-a3cf-e2b3c41e329d" - } + "Date" : "Wed, 02 Oct 2019 20:46:32 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9be2ac39-4238-4cf9-9656-d0df99075203", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4MjM=;sn=363823", + "x-ms-request-id" : "9be2ac39-4238-4cf9-9656-d0df99075203", + "Body" : "{\"etag\":\"B2Gkd8WAYm6QFwdXc9grsVWGSOF\",\"key\":\"key25284131054-1\",\"label\":null,\"content_type\":null,\"value\":\"\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:32+00:00\"}", + "x-ms-client-request-id" : "72b27a67-b13b-410b-a437-9026660df4b4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key74534", "29f7905b", "key7453453048d" ] + "variables" : [ "key25284", "d1a80cf9", "key25284131054" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json index 4d02428d1e34..8f601c2f7364 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingIfEtag.json @@ -1,294 +1,385 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3933e082-3045-4b17-a2f9-e2b94460cf1d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "20aafa46-8b85-4b39-9865-514047b79058", - "x-ms-client-request-id" : "dd576844-bbb3-48e8-9de7-06191818f7fd", - "x-ms-correlation-request-id" : "20aafa46-8b85-4b39-9865-514047b79058", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "de6c26e2-1cdd-4330-b412-033a2bb62dcf", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "de6c26e2-1cdd-4330-b412-033a2bb62dcf", + "x-ms-client-request-id" : "3933e082-3045-4b17-a2f9-e2b94460cf1d" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "79468b94-342b-4c07-af4d-ab55855f8aa4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTY=;sn=228156", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "1855210b-6b92-4b63-a71c-a7d08687e57d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"z73TwXcZg2EyW7h2fIZQbFiVADi\"", - "x-ms-request-id" : "1855210b-6b92-4b63-a71c-a7d08687e57d", - "Body" : "{\"etag\":\"z73TwXcZg2EyW7h2fIZQbFiVADi\",\"key\":\"key0211057963d\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "e0aaca1a-c807-4ed1-b2eb-68ecb70e8924" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f178979a-3fc7-4f8b-a4dc-84eb28c9354e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"xn5LQlYDrAjlZ7xE5WnFbOwLkP0\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODc=;sn=363887", + "x-ms-request-id" : "f178979a-3fc7-4f8b-a4dc-84eb28c9354e", + "Body" : "{\"etag\":\"xn5LQlYDrAjlZ7xE5WnFbOwLkP0\",\"key\":\"key43490202167\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "79468b94-342b-4c07-af4d-ab55855f8aa4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a50972d7-9afb-4392-9b7a-e70b4812cbd1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTc=;sn=228157", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "7229d403-d4cd-4fd9-8561-b6add09bd569", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"lNtecRA5JZ2RXKjveoNEkqgapT2\"", - "x-ms-request-id" : "7229d403-d4cd-4fd9-8561-b6add09bd569", - "Body" : "{\"etag\":\"lNtecRA5JZ2RXKjveoNEkqgapT2\",\"key\":\"key0211057963d\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "16b83fa8-5b79-4d42-863c-a075348ad8ee" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f4f87f08-65c3-4df5-9b20-93fca71bb0c0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODg=;sn=363888", + "x-ms-request-id" : "f4f87f08-65c3-4df5-9b20-93fca71bb0c0", + "Body" : "{\"etag\":\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\",\"key\":\"key43490202167\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "a50972d7-9afb-4392-9b7a-e70b4812cbd1", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3ed5610d-cac6-4d02-9996-f40bf79c9748", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "6f187e50-be2c-40d2-a392-152c6179fa10", - "x-ms-client-request-id" : "953b0425-bafa-46d6-b3ed-b3ce7a0f3df4", - "x-ms-correlation-request-id" : "6f187e50-be2c-40d2-a392-152c6179fa10", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9ba76286-789f-43c5-a6a9-8c9d7e4afaf3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "9ba76286-789f-43c5-a6a9-8c9d7e4afaf3", + "x-ms-client-request-id" : "3ed5610d-cac6-4d02-9996-f40bf79c9748" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "63a6f2b5-f568-45f7-be77-9378a94dfd6d", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTc=;sn=228157", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "91c2223d-264d-4aa2-8723-4de64390a343", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"lNtecRA5JZ2RXKjveoNEkqgapT2\"", - "x-ms-request-id" : "91c2223d-264d-4aa2-8723-4de64390a343", - "Body" : "{\"etag\":\"lNtecRA5JZ2RXKjveoNEkqgapT2\",\"key\":\"key0211057963d\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "112640e6-0d9a-4265-a4f1-e4ee6597ce5d" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b069e957-5d77-4a17-82f0-66f21d683e11", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODg=;sn=363888", + "x-ms-request-id" : "b069e957-5d77-4a17-82f0-66f21d683e11", + "Body" : "{\"etag\":\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\",\"key\":\"key43490202167\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "63a6f2b5-f568-45f7-be77-9378a94dfd6d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "686dddcb-b6ec-4af6-bf2c-e49e2ed50681", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "4a5595b7-8fda-4d23-9f13-9341bf07421c", - "x-ms-client-request-id" : "426c7b00-e925-4421-925b-727ebddf8c17", - "x-ms-correlation-request-id" : "4a5595b7-8fda-4d23-9f13-9341bf07421c", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bbf42390-d750-4a8a-9f3c-0f0a380f2e49", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "bbf42390-d750-4a8a-9f3c-0f0a380f2e49", + "x-ms-client-request-id" : "686dddcb-b6ec-4af6-bf2c-e49e2ed50681" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9a9a48f6-74ed-426f-9b09-d0cd3be61aab", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTg=;sn=228158", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "4103049b-5e2d-47c4-aa38-f1b0f6b0e520", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"J6GxxiF58RqlSdDqnMRpl7pqQsg\"", - "x-ms-request-id" : "4103049b-5e2d-47c4-aa38-f1b0f6b0e520", - "Body" : "{\"etag\":\"J6GxxiF58RqlSdDqnMRpl7pqQsg\",\"key\":\"key0211057963d\",\"label\":\"fef86d4a90823d\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "a6e1433e-175b-4e2d-88bf-30c66984978b" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bf539549-4685-4ac6-9dde-a92ba45c0fd3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"147FQjMnzbKYyWaWBlsyTAG6JEE\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4ODk=;sn=363889", + "x-ms-request-id" : "bf539549-4685-4ac6-9dde-a92ba45c0fd3", + "Body" : "{\"etag\":\"147FQjMnzbKYyWaWBlsyTAG6JEE\",\"key\":\"key43490202167\",\"label\":\"e1a48319440877\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "9a9a48f6-74ed-426f-9b09-d0cd3be61aab", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f6fff307-4d38-4811-9e34-4cd44a042972", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTk=;sn=228159", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "76bd3df5-9429-42e0-a781-79a886b14252", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IHD6P9HocI6cjrxAruRGR8mpsyO\"", - "x-ms-request-id" : "76bd3df5-9429-42e0-a781-79a886b14252", - "Body" : "{\"etag\":\"IHD6P9HocI6cjrxAruRGR8mpsyO\",\"key\":\"key0211057963d\",\"label\":\"fef86d4a90823d\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "a388eb28-0987-4f7f-8060-036e3e8204ca" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "faa1b6f8-56c2-42c3-905c-8fd7b8bb4623", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"glmDRsEJ6AnczhD0nocxz3rpJwD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTA=;sn=363890", + "x-ms-request-id" : "faa1b6f8-56c2-42c3-905c-8fd7b8bb4623", + "Body" : "{\"etag\":\"glmDRsEJ6AnczhD0nocxz3rpJwD\",\"key\":\"key43490202167\",\"label\":\"e1a48319440877\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "f6fff307-4d38-4811-9e34-4cd44a042972", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9c674eb3-2e81-4e65-a67e-e366469187c1", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "ab70d1ea-c9c9-4a4f-a5ae-9d60f16e151a", - "x-ms-client-request-id" : "07b5ac82-3813-44d9-82c0-399f0e037df2", - "x-ms-correlation-request-id" : "ab70d1ea-c9c9-4a4f-a5ae-9d60f16e151a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "718112ab-c268-48f0-a436-4acd6b714455", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Content-Length" : "0", + "x-ms-request-id" : "718112ab-c268-48f0-a436-4acd6b714455", + "x-ms-client-request-id" : "9c674eb3-2e81-4e65-a67e-e366469187c1" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4a778316-f07f-485f-b497-6e811d97b967", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTk=;sn=228159", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "a78ab328-857e-460a-b8d2-1adbac63c438", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IHD6P9HocI6cjrxAruRGR8mpsyO\"", - "x-ms-request-id" : "a78ab328-857e-460a-b8d2-1adbac63c438", - "Body" : "{\"etag\":\"IHD6P9HocI6cjrxAruRGR8mpsyO\",\"key\":\"key0211057963d\",\"label\":\"fef86d4a90823d\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "bb724345-a50b-4440-bc0e-e7566b63d1b5" - } + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e87beec2-9b47-4f7a-bf39-b102fa8407b1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"glmDRsEJ6AnczhD0nocxz3rpJwD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTA=;sn=363890", + "x-ms-request-id" : "e87beec2-9b47-4f7a-bf39-b102fa8407b1", + "Body" : "{\"etag\":\"glmDRsEJ6AnczhD0nocxz3rpJwD\",\"key\":\"key43490202167\",\"label\":\"e1a48319440877\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "4a778316-f07f-485f-b497-6e811d97b967", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key02110%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key43490%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3734e8b2-2c3b-4296-9f45-69c058683644", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNTk=;sn=228159", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "ff0e49be-a748-4aba-a6c2-a92e15211de1", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "ff0e49be-a748-4aba-a6c2-a92e15211de1", - "Body" : "{\"items\":[{\"etag\":\"lNtecRA5JZ2RXKjveoNEkqgapT2\",\"key\":\"key0211057963d\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"},{\"etag\":\"IHD6P9HocI6cjrxAruRGR8mpsyO\",\"key\":\"key0211057963d\",\"label\":\"fef86d4a90823d\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}]}", - "x-ms-client-request-id" : "1570c6e9-c55c-4dcb-8360-fcaa425922ab" - } + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f634443e-7249-4c42-9bcf-fd4b8a1a40be", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTA=;sn=363890", + "x-ms-request-id" : "f634443e-7249-4c42-9bcf-fd4b8a1a40be", + "Body" : "{\"items\":[{\"etag\":\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\",\"key\":\"key43490202167\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"},{\"etag\":\"glmDRsEJ6AnczhD0nocxz3rpJwD\",\"key\":\"key43490202167\",\"label\":\"e1a48319440877\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}]}", + "x-ms-client-request-id" : "3734e8b2-2c3b-4296-9f45-69c058683644", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ed2854da-7c0d-4e43-8cfd-f57c7fc5d5d4", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjA=;sn=228160", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "016eb76f-754b-4096-a883-21664a87083f", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:48 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"lNtecRA5JZ2RXKjveoNEkqgapT2\"", - "x-ms-request-id" : "016eb76f-754b-4096-a883-21664a87083f", - "Body" : "{\"etag\":\"lNtecRA5JZ2RXKjveoNEkqgapT2\",\"key\":\"key0211057963d\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:48+00:00\"}", - "x-ms-client-request-id" : "f260afea-1eab-43f7-9748-971e79630adb" - } + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "36bede95-c2e5-4bf0-aad9-adca113d796e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTE=;sn=363891", + "x-ms-request-id" : "36bede95-c2e5-4bf0-aad9-adca113d796e", + "Body" : "{\"etag\":\"Ni6LCbvZUR7ecgj10t6AMf6LCaQ\",\"key\":\"key43490202167\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "ed2854da-7c0d-4e43-8cfd-f57c7fc5d5d4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key0211057963d?label=fef86d4a90823d", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv/key43490202167?label=e1a48319440877", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "08de8c00-544e-4bd1-9a57-8dc2fd002f19", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNjE=;sn=228161", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Wed, 02 Oct 2019 20:46:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "x-ms-correlation-request-id" : "457bf345-7689-480a-abca-dbcad05cc5d7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:49 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IHD6P9HocI6cjrxAruRGR8mpsyO\"", - "x-ms-request-id" : "457bf345-7689-480a-abca-dbcad05cc5d7", - "Body" : "{\"etag\":\"IHD6P9HocI6cjrxAruRGR8mpsyO\",\"key\":\"key0211057963d\",\"label\":\"fef86d4a90823d\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:49+00:00\"}", - "x-ms-client-request-id" : "2e2857d0-b8f0-44d0-8b82-98cf0088410c" - } + "Date" : "Wed, 02 Oct 2019 20:46:40 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0d56ec00-8189-442e-8d32-2bd07a5e4402", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"glmDRsEJ6AnczhD0nocxz3rpJwD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=MDotMSMzNjM4OTI=;sn=363892", + "x-ms-request-id" : "0d56ec00-8189-442e-8d32-2bd07a5e4402", + "Body" : "{\"etag\":\"glmDRsEJ6AnczhD0nocxz3rpJwD\",\"key\":\"key43490202167\",\"label\":\"e1a48319440877\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-10-02T20:46:40+00:00\"}", + "x-ms-client-request-id" : "08de8c00-544e-4bd1-9a57-8dc2fd002f19", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key02110", "fef86d4a", "key0211057963d", "fef86d4a90823d" ] + "variables" : [ "key43490", "e1a48319", "key43490202167", "e1a48319440877" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json index 7643c0bd46ff..500d6c72ef43 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/setSettingNullKey.json @@ -1,25 +1,32 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key58213%2a", + "Uri" : "https://appconfigtestshawnfang.azconfig.io/kv?key=key60590%2a", "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", + "User-Agent" : "azsdk-java-application-configuration/1.0.0-preview.4 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dea5afbc-8991-4c25-bd32-def69d0a8243", "Content-Type" : "application/json" }, "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:48 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", + "Transfer-Encoding" : "chunked", + "Server" : "openresty/1.15.8.1", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "a6e1741f-9d20-44d8-9725-f746e2755813", + "Date" : "Wed, 02 Oct 2019 20:46:39 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f9ee20b8-bf5d-45e4-bc79-a81285131e58", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "x-ms-request-id" : "f9ee20b8-bf5d-45e4-bc79-a81285131e58", "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "e1e5889c-4b13-420a-9099-8a5aed44fb19", - "x-ms-correlation-request-id" : "a6e1741f-9d20-44d8-9725-f746e2755813", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } + "x-ms-client-request-id" : "dea5afbc-8991-4c25-bd32-def69d0a8243", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + }, + "Exception" : null } ], - "variables" : [ "key58213", "413f8a18" ] + "variables" : [ "key60590", "24bb17de" ] } \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateNoExistingSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateNoExistingSetting.json deleted file mode 100644 index c6af17591b89..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateNoExistingSetting.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key08948953068", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "b4b72312-8e94-4865-bd14-167ddb294f49", - "x-ms-client-request-id" : "32d86917-f9a2-4762-853d-3cd1a1e19e2b", - "x-ms-correlation-request-id" : "b4b72312-8e94-4865-bd14-167ddb294f49", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key08948953068?label=3f9e2745097358", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "19617093-1784-43fe-90db-0c6fffe3e4f4", - "x-ms-client-request-id" : "0fbc81ef-281c-4f34-b01d-ff76d09ef37c", - "x-ms-correlation-request-id" : "19617093-1784-43fe-90db-0c6fffe3e4f4", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key08948%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:49 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a9464b4c-635f-4c68-a50e-73382cee576d", - "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "0282f7ed-0a3b-464e-8930-11191d12cb4c", - "x-ms-correlation-request-id" : "a9464b4c-635f-4c68-a50e-73382cee576d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - } ], - "variables" : [ "key08948", "3f9e2745", "key08948953068", "3f9e2745097358" ] -} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSetting.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSetting.json deleted file mode 100644 index e5cacc1977b2..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSetting.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3424823602b", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzk=;sn=228179", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "e78d06fe-1ee5-4f78-97c9-36db8345b72a", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"D8nd79Rqc4JPlU24hFgSbkRzJzJ\"", - "x-ms-request-id" : "e78d06fe-1ee5-4f78-97c9-36db8345b72a", - "Body" : "{\"etag\":\"D8nd79Rqc4JPlU24hFgSbkRzJzJ\",\"key\":\"key3424823602b\",\"label\":null,\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "32dd7dac-a7a9-4e3d-9b1e-f51a31313336" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3424823602b?label=6bc483a6636285", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODA=;sn=228180", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "a178991d-31aa-4b73-8ffd-1690ea43f3fc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IBiWA72l55PtH3jiwDEJQOeriQH\"", - "x-ms-request-id" : "a178991d-31aa-4b73-8ffd-1690ea43f3fc", - "Body" : "{\"etag\":\"IBiWA72l55PtH3jiwDEJQOeriQH\",\"key\":\"key3424823602b\",\"label\":\"6bc483a6636285\",\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "df90abe5-6789-45b8-8e7c-81ef98f1d6e0" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key34248%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODA=;sn=228180", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "1513e8be-3313-4768-829d-1fbda10f7115", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "1513e8be-3313-4768-829d-1fbda10f7115", - "Body" : "{\"items\":[{\"etag\":\"D8nd79Rqc4JPlU24hFgSbkRzJzJ\",\"key\":\"key3424823602b\",\"label\":null,\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"},{\"etag\":\"IBiWA72l55PtH3jiwDEJQOeriQH\",\"key\":\"key3424823602b\",\"label\":\"6bc483a6636285\",\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}]}", - "x-ms-client-request-id" : "ce7c218c-6820-4d45-acb6-5c4f5ed209db" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3424823602b", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODE=;sn=228181", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "db3ce856-e5cd-4df1-8648-6521755aab01", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"D8nd79Rqc4JPlU24hFgSbkRzJzJ\"", - "x-ms-request-id" : "db3ce856-e5cd-4df1-8648-6521755aab01", - "Body" : "{\"etag\":\"D8nd79Rqc4JPlU24hFgSbkRzJzJ\",\"key\":\"key3424823602b\",\"label\":null,\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "c154fcb3-823b-4331-b739-4634442295ae" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key3424823602b?label=6bc483a6636285", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:51 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxODI=;sn=228182", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "b1d9e2db-8a54-4b3e-bf05-5c695119a443", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IBiWA72l55PtH3jiwDEJQOeriQH\"", - "x-ms-request-id" : "b1d9e2db-8a54-4b3e-bf05-5c695119a443", - "Body" : "{\"etag\":\"IBiWA72l55PtH3jiwDEJQOeriQH\",\"key\":\"key3424823602b\",\"label\":\"6bc483a6636285\",\"content_type\":\"json\",\"value\":\"myNewValue\",\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "c02b1f71-3eba-4fc0-ab33-c86fc850a344" - } - } ], - "variables" : [ "key34248", "6bc483a6", "key3424823602b", "6bc483a6636285" ] -} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingIfEtag.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingIfEtag.json deleted file mode 100644 index a4b85f6dbbf3..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingIfEtag.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzE=;sn=228071", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "6f834861-16de-411a-8504-524e01cd0754", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"LcQHe18fNzE7ywzz9nULq3eKbOq\"", - "x-ms-request-id" : "6f834861-16de-411a-8504-524e01cd0754", - "Body" : "{\"etag\":\"LcQHe18fNzE7ywzz9nULq3eKbOq\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "7a0f63cf-1341-4abe-b975-cd9c2bacfa3a" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzI=;sn=228072", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "7a4ded1b-693c-4eb7-b64e-fa6952703cac", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"SVpkVM6aoD70TiybwgOXNcegKyk\"", - "x-ms-request-id" : "7a4ded1b-693c-4eb7-b64e-fa6952703cac", - "Body" : "{\"etag\":\"SVpkVM6aoD70TiybwgOXNcegKyk\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "b99c5d8f-50e8-40b7-8dd8-120a9be283aa" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "2860d09a-b015-4c9e-97a4-0b33b9d14b80", - "x-ms-client-request-id" : "dc93b20c-55a4-4165-93d8-f3f71eb94a82", - "x-ms-correlation-request-id" : "2860d09a-b015-4c9e-97a4-0b33b9d14b80", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzI=;sn=228072", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "ed9352ca-3776-4ef8-87db-271b8819800e", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"SVpkVM6aoD70TiybwgOXNcegKyk\"", - "x-ms-request-id" : "ed9352ca-3776-4ef8-87db-271b8819800e", - "Body" : "{\"etag\":\"SVpkVM6aoD70TiybwgOXNcegKyk\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "d3ae222d-dbb7-4e4b-8582-26301b2a99ba" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzM=;sn=228073", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "0220a983-0491-414e-9cc7-cb264eeca0b8", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KRiU4RyB3NifUDB71bWWo5XbGvz\"", - "x-ms-request-id" : "0220a983-0491-414e-9cc7-cb264eeca0b8", - "Body" : "{\"etag\":\"KRiU4RyB3NifUDB71bWWo5XbGvz\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "7933b949-f468-4161-b0bc-c5407b7d20b0" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzM=;sn=228073", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "df6144aa-afa1-4802-9062-ca35d5eb5954", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KRiU4RyB3NifUDB71bWWo5XbGvz\"", - "x-ms-request-id" : "df6144aa-afa1-4802-9062-ca35d5eb5954", - "Body" : "{\"etag\":\"KRiU4RyB3NifUDB71bWWo5XbGvz\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "375a48c5-7719-414b-b6d9-6cfc417dcb20" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "038affa0-a4a8-45d1-b149-10b8cbd07560", - "x-ms-client-request-id" : "9e6b7ab5-e39d-479c-bfb4-65b0c9bec545", - "x-ms-correlation-request-id" : "038affa0-a4a8-45d1-b149-10b8cbd07560", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:38 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzQ=;sn=228074", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "115ce7d5-2e82-4e05-ac12-40ffc54c09c0", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"PtdsfnIf5oTey3N3BSjKqReaq8S\"", - "x-ms-request-id" : "115ce7d5-2e82-4e05-ac12-40ffc54c09c0", - "Body" : "{\"etag\":\"PtdsfnIf5oTey3N3BSjKqReaq8S\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myNewValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "496e64b3-1901-47e3-9058-4f57841d91d3" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzU=;sn=228075", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "1de85531-a186-49f2-88c0-be4f51fcaef3", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FcaMqgwIRwoJn7XoylGXEIajHvw\"", - "x-ms-request-id" : "1de85531-a186-49f2-88c0-be4f51fcaef3", - "Body" : "{\"etag\":\"FcaMqgwIRwoJn7XoylGXEIajHvw\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "f9c12a44-739b-40bc-9703-c10dde5bdc12" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "a86da613-d5b1-4178-826b-06f142559953", - "x-ms-client-request-id" : "a4db530a-7913-4959-a496-074204fff61c", - "x-ms-correlation-request-id" : "a86da613-d5b1-4178-826b-06f142559953", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzU=;sn=228075", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "5e63fe36-4d24-415e-a5f9-38e9cbe3a57d", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"FcaMqgwIRwoJn7XoylGXEIajHvw\"", - "x-ms-request-id" : "5e63fe36-4d24-415e-a5f9-38e9cbe3a57d", - "Body" : "{\"etag\":\"FcaMqgwIRwoJn7XoylGXEIajHvw\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myUpdateValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "474510c9-e3b9-4e0d-abb3-182e88e11215" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzY=;sn=228076", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "05b348c8-82db-41ee-9069-8d63c6027abc", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"na6cEgels9RogW3S85ZpRu8Pthc\"", - "x-ms-request-id" : "05b348c8-82db-41ee-9069-8d63c6027abc", - "Body" : "{\"etag\":\"na6cEgels9RogW3S85ZpRu8Pthc\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "f7b57502-55b4-4c48-a30d-389d32eada71" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzY=;sn=228076", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "a900b242-fb7f-49b4-ac6c-233c61f1fd95", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"na6cEgels9RogW3S85ZpRu8Pthc\"", - "x-ms-request-id" : "a900b242-fb7f-49b4-ac6c-233c61f1fd95", - "Body" : "{\"etag\":\"na6cEgels9RogW3S85ZpRu8Pthc\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "508a3250-719e-45a4-8c2e-91614129cd46" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "content-length" : "0", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "84c18a0e-66ce-4a44-b85e-875d05e3ba58", - "x-ms-client-request-id" : "72f12c50-6fb3-408b-9187-39f301a830c0", - "x-ms-correlation-request-id" : "84c18a0e-66ce-4a44-b85e-875d05e3ba58", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key35383%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzY=;sn=228076", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "6e9f91e2-4022-44ca-9515-bff631da1b35", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "6e9f91e2-4022-44ca-9515-bff631da1b35", - "Body" : "{\"items\":[{\"etag\":\"KRiU4RyB3NifUDB71bWWo5XbGvz\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"},{\"etag\":\"na6cEgels9RogW3S85ZpRu8Pthc\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}]}", - "x-ms-client-request-id" : "c7d6f01e-2278-417c-9f20-b80532e232c7" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzc=;sn=228077", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "7326e6a6-e613-4b8c-8e46-a3f9bce35de7", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"KRiU4RyB3NifUDB71bWWo5XbGvz\"", - "x-ms-request-id" : "7326e6a6-e613-4b8c-8e46-a3f9bce35de7", - "Body" : "{\"etag\":\"KRiU4RyB3NifUDB71bWWo5XbGvz\",\"key\":\"key35383256988\",\"label\":null,\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "9c547da0-268f-4283-aec1-6f010e54cc4d" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key35383256988?label=249862c293363f", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:39 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgwNzg=;sn=228078", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "2851ac77-ab28-485c-9525-7f88a9593117", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:39 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"na6cEgels9RogW3S85ZpRu8Pthc\"", - "x-ms-request-id" : "2851ac77-ab28-485c-9525-7f88a9593117", - "Body" : "{\"etag\":\"na6cEgels9RogW3S85ZpRu8Pthc\",\"key\":\"key35383256988\",\"label\":\"249862c293363f\",\"content_type\":null,\"value\":\"myFinalValue\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:39+00:00\"}", - "x-ms-client-request-id" : "a643e8c5-979f-4d2f-acb7-fc4eedf83d57" - } - } ], - "variables" : [ "key35383", "249862c2", "key35383256988", "249862c293363f" ] -} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingNullKey.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingNullKey.json deleted file mode 100644 index 37dcd27971c5..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingNullKey.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key19273%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:40 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "e12567e7-a734-43ce-b378-dd14559cd718", - "Body" : "{\"items\":[]}", - "x-ms-client-request-id" : "11cf9f3d-7527-46e7-953f-3a5e9cbd07af", - "x-ms-correlation-request-id" : "e12567e7-a734-43ce-b378-dd14559cd718", - "strict-transport-security" : "max-age=15724800; includeSubDomains;" - } - } ], - "variables" : [ "key19273", "f267ad81" ] -} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingOverload.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingOverload.json deleted file mode 100644 index b9e3340d3db8..000000000000 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/updateSettingOverload.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key49019549680", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzY=;sn=228176", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "a85a6750-6d58-41f0-9de1-2d9766b14954", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"IN4fA3HwvfsgEEG5CMuUvpzMN6w\"", - "x-ms-request-id" : "a85a6750-6d58-41f0-9de1-2d9766b14954", - "Body" : "{\"etag\":\"IN4fA3HwvfsgEEG5CMuUvpzMN6w\",\"key\":\"key49019549680\",\"label\":null,\"content_type\":null,\"value\":\"A Value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "0240e6a6-0b33-46e8-bb96-d906614a1d20" - } - }, { - "Method" : "PUT", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key49019549680", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzc=;sn=228177", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "706e07d2-21b7-4c15-825f-224fe329885b", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"NtnWHtsEH9N8KTP0vYOR7GktPlz\"", - "x-ms-request-id" : "706e07d2-21b7-4c15-825f-224fe329885b", - "Body" : "{\"etag\":\"NtnWHtsEH9N8KTP0vYOR7GktPlz\",\"key\":\"key49019549680\",\"label\":null,\"content_type\":null,\"value\":\"A New Value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "6b56d23a-7403-4eb4-912e-c31ae674799c" - } - }, { - "Method" : "GET", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv?key=key49019%2a", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzc=;sn=228177", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "17d74677-6cef-4101-93cb-3293e027d749", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "content-type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8", - "connection" : "keep-alive", - "x-ms-request-id" : "17d74677-6cef-4101-93cb-3293e027d749", - "Body" : "{\"items\":[{\"etag\":\"NtnWHtsEH9N8KTP0vYOR7GktPlz\",\"key\":\"key49019549680\",\"label\":null,\"content_type\":null,\"value\":\"A New Value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}]}", - "x-ms-client-request-id" : "5e8d238a-1d66-483b-86c0-0cb395d88225" - } - }, { - "Method" : "DELETE", - "Uri" : "https://alzimmer-appconfig.azconfig.io/kv/key49019549680", - "Headers" : { - "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_202; Windows 10 10.0", - "Content-Type" : "application/json" - }, - "Response" : { - "date" : "Wed, 24 Apr 2019 18:48:50 GMT", - "server" : "nginx/1.13.9", - "transfer-encoding" : "chunked", - "sync-token" : "zAJw6V16=MjotMSMyMjgxNzg=;sn=228178", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "09e873e0-1a9c-4da8-a8bb-ea8103cf2ce2", - "strict-transport-security" : "max-age=15724800; includeSubDomains;", - "last-modified" : "Wed, 24 Apr 2019 18:48:51 GMT", - "content-type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8", - "connection" : "keep-alive", - "etag" : "\"NtnWHtsEH9N8KTP0vYOR7GktPlz\"", - "x-ms-request-id" : "09e873e0-1a9c-4da8-a8bb-ea8103cf2ce2", - "Body" : "{\"etag\":\"NtnWHtsEH9N8KTP0vYOR7GktPlz\",\"key\":\"key49019549680\",\"label\":null,\"content_type\":null,\"value\":\"A New Value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-04-24T18:48:51+00:00\"}", - "x-ms-client-request-id" : "27bd18ad-b156-422f-8ed5-f0a1f14b6255" - } - } ], - "variables" : [ "key49019", "1442913b", "key49019549680" ] -} \ No newline at end of file diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java index 0c7a5fc1bd11..45038ae2a0a9 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java @@ -17,14 +17,14 @@ public interface AmqpConnection extends EndpointStateNotifier, Closeable { * * @return The connection identifier. */ - String getIdentifier(); + String getId(); /** - * Gets the host for the AMQP connection. + * Gets the hostname for the AMQP connection. * - * @return The host for the AMQP connection. + * @return The hostname for the AMQP connection. */ - String getHost(); + String getHostname(); /** * Gets the maximum frame size for the connection. 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 d87c335fb0d5..3135e89f9bb1 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 @@ -109,7 +109,7 @@ public Mono getCBSNode() { } @Override - public String getIdentifier() { + public String getId() { return connectionId; } @@ -117,7 +117,7 @@ public String getIdentifier() { * {@inheritDoc} */ @Override - public String getHost() { + public String getHostname() { return handler.getHostname(); } @@ -148,8 +148,8 @@ public Mono createSession(String sessionName) { } return connectionMono.map(connection -> sessionMap.computeIfAbsent(sessionName, key -> { - final SessionHandler handler = handlerProvider.createSessionHandler(connectionId, getHost(), sessionName, - connectionOptions.getRetry().getTryTimeout()); + final SessionHandler handler = handlerProvider.createSessionHandler(connectionId, getHostname(), + sessionName, connectionOptions.getRetry().getTryTimeout()); final Session session = connection.session(); BaseHandler.setHandler(session, handler); @@ -220,7 +220,7 @@ protected Mono createRequestResponseChannel(String sessi String entityPath) { return createSession(sessionName) .cast(ReactorSession.class) - .map(reactorSession -> new RequestResponseChannel(getIdentifier(), getHost(), linkName, entityPath, + .map(reactorSession -> new RequestResponseChannel(getId(), getHostname(), linkName, entityPath, reactorSession.session(), connectionOptions.getRetry(), handlerProvider, reactorProvider, messageSerializer)); } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java index 81695b067341..6a80e4aefd04 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/TracerProvider.java @@ -2,10 +2,8 @@ // Licensed under the MIT License. package com.azure.core.amqp.implementation; -import static com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; - import com.azure.core.amqp.exception.AmqpException; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.tracing.Tracer; @@ -14,6 +12,8 @@ import java.util.Objects; import reactor.core.publisher.Signal; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + public class TracerProvider { private final ClientLogger logger = new ClientLogger(TracerProvider.class); private final List tracers = new ArrayList<>(); @@ -62,7 +62,7 @@ public void endSpan(Context context, Signal signal) { Objects.requireNonNull(signal, "'signal' cannot be null"); // Get the context that was added to the mono, this will contain the information needed to end the span. - if (!context.getData(OPENTELEMETRY_SPAN_KEY).isPresent()) { + if (!context.getData(OPENCENSUS_SPAN_KEY).isPresent()) { return; } diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java index 496184fe28fc..1569e8009054 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java @@ -118,8 +118,8 @@ public void createConnection() { // Assert Assert.assertTrue(connection instanceof ReactorConnection); - Assert.assertEquals(CONNECTION_ID, connection.getIdentifier()); - Assert.assertEquals(HOSTNAME, connection.getHost()); + Assert.assertEquals(CONNECTION_ID, connection.getId()); + Assert.assertEquals(HOSTNAME, connection.getHostname()); Assert.assertEquals(connectionHandler.getMaxFrameSize(), connection.getMaxFrameSize()); diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/TracerProviderTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/TracerProviderTest.java index 188c1530e38a..9ba3876242c8 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/TracerProviderTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/TracerProviderTest.java @@ -5,7 +5,7 @@ import com.azure.core.amqp.exception.AmqpException; import com.azure.core.amqp.exception.ErrorCondition; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.tracing.Tracer; import org.junit.After; @@ -22,7 +22,7 @@ import java.util.List; import java.util.Optional; -import static com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; @@ -114,7 +114,7 @@ public void startSpanReturnsUpdatedContext() { @Test public void endSpanSuccess() { // Act - tracerProvider.endSpan(new Context(OPENTELEMETRY_SPAN_KEY, "value"), Signal.complete()); + tracerProvider.endSpan(new Context(OPENCENSUS_SPAN_KEY, "value"), Signal.complete()); // Assert for (Tracer t : tracers) { @@ -137,7 +137,7 @@ public void endSpanNoKey() { public void endSpanError() { // Arrange Throwable testThrow = new Throwable("testError"); - Context sendContext = new Context(OPENTELEMETRY_SPAN_KEY, "value"); + Context sendContext = new Context(OPENCENSUS_SPAN_KEY, "value"); // Act tracerProvider.endSpan(sendContext, Signal.error(testThrow)); @@ -152,7 +152,7 @@ public void endSpanError() { public void endSpanOnSubscribe() { // Arrange Throwable testThrow = new Throwable("testError"); - Context sendContext = new Context(OPENTELEMETRY_SPAN_KEY, "value"); + Context sendContext = new Context(OPENCENSUS_SPAN_KEY, "value"); // Act tracerProvider.endSpan(sendContext, Signal.error(testThrow)); @@ -168,7 +168,7 @@ public void endSpanAmqpException() { // Arrange final ErrorCondition errorCondition = ErrorCondition.NOT_FOUND; final Exception exception = new AmqpException(true, errorCondition, "", null); - Context sendContext = new Context(OPENTELEMETRY_SPAN_KEY, "value"); + Context sendContext = new Context(OPENCENSUS_SPAN_KEY, "value"); // Act tracerProvider.endSpan(sendContext, Signal.error(exception)); diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java index 3d857d411826..cf0a064941d9 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java @@ -80,11 +80,14 @@ public void testMultipleSubscriptionsEmitsError() { HttpResponse response = getResponse("/short"); // Subscription:1 response.getBodyAsByteArray().block(); + // Subscription:2 StepVerifier.create(response.getBodyAsByteArray()) - .expectNextCount(0) // TODO: Check with smaldini, what is the verifier operator equivalent to .awaitDone(20, TimeUnit.SECONDS) - .verifyError(IllegalStateException.class); - + .expectNextCount(0) + // Reactor netty 0.9.0.RELEASE behavior changed - second subscription returns onComplete() instead + // of throwing an error + //.verifyError(IllegalStateException.class); + .verifyComplete(); } @Test diff --git a/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java b/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java index 2f3153e45c70..9757bcfd4de5 100644 --- a/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java +++ b/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java @@ -4,10 +4,12 @@ package com.azure.core.http.okhttp; import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeader; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import okhttp3.Call; import okhttp3.Headers; import okhttp3.MediaType; import okhttp3.OkHttpClient; @@ -26,6 +28,7 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -58,7 +61,9 @@ public Mono send(HttpRequest request) { // but block on the thread backing flux. This ignore any subscribeOn applied to send(r) // toOkHttpRequest(request).subscribe(okHttpRequest -> { - httpClient.newCall(okHttpRequest).enqueue(new OkHttpCallback(sink, request)); + Call call = httpClient.newCall(okHttpRequest); + call.enqueue(new OkHttpCallback(sink, request)); + sink.onCancel(() -> call.cancel()); }, sink::error); })); } @@ -74,7 +79,13 @@ private static Mono toOkHttpRequest(HttpRequest request) { .map(rb -> { rb.url(request.getUrl()); if (request.getHeaders() != null) { - return rb.headers(okhttp3.Headers.of(request.getHeaders().toMap())); + Map headers = new HashMap<>(); + for (HttpHeader hdr : request.getHeaders()) { + if (hdr.getValue() != null) { + headers.put(hdr.getName(), hdr.getValue()); + } + } + return rb.headers(okhttp3.Headers.of(headers)); } else { return rb.headers(okhttp3.Headers.of(new HashMap<>())); } @@ -189,7 +200,7 @@ private static class OkHttpResponse extends HttpResponse { rb -> Mono.just(rb), // Resource cleanup // square.github.io/okhttp/4.x/okhttp/okhttp3/-response-body/#the-response-body-must-be-closed - ResponseBody::close); + ResponseBody::close, /* Change in behavior since reactor-core 3.3.0.RELEASE */ false); } } diff --git a/sdk/core/azure-core-http-okhttp/src/samples/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderJavaDocCodeSnippets.java b/sdk/core/azure-core-http-okhttp/src/samples/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderJavaDocCodeSnippets.java index 217454edf50c..acbe5308124e 100644 --- a/sdk/core/azure-core-http-okhttp/src/samples/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderJavaDocCodeSnippets.java +++ b/sdk/core/azure-core-http-okhttp/src/samples/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderJavaDocCodeSnippets.java @@ -26,7 +26,7 @@ public void simpleInstantiation() { // END: com.azure.core.http.okhttp.instantiation-simple } - private void proxySample() { + public void proxySample() { // BEGIN: com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder#proxy final String proxyHost = ""; // e.g. localhost final int proxyPort = 9999; // Proxy port @@ -38,7 +38,7 @@ private void proxySample() { } - private void proxyBasicAuthenticationSample() { + public void proxyBasicAuthenticationSample() { // BEGIN: com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder#setProxyAuthenticator final String proxyHost = ""; // e.g. localhost @@ -60,7 +60,7 @@ private void proxyBasicAuthenticationSample() { } - private void connectionTimeoutSample() { + public void connectionTimeoutSample() { // BEGIN: com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder#connectionTimeout final Duration connectionTimeout = Duration.ofSeconds(250); // connection timeout of 250 seconds @@ -71,7 +71,7 @@ private void connectionTimeoutSample() { } - private void readTimeoutSample() { + public void readTimeoutSample() { // BEGIN: com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder#readTimeout final Duration readTimeout = Duration.ofSeconds(100); // read timeout of 100 seconds @@ -82,7 +82,7 @@ private void readTimeoutSample() { } - private void usingExistingHttpClientSample() { + public void usingExistingHttpClientSample() { // BEGIN: com.azure.core.http.okhttp.using-existing-okhttp // Create an OkHttpClient with connection timeout of 250 seconds. diff --git a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithHttpProxyOkHttpTests.java b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithHttpProxyOkHttpTests.java index b188822bc90d..54f2c126f560 100644 --- a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithHttpProxyOkHttpTests.java +++ b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithHttpProxyOkHttpTests.java @@ -9,7 +9,6 @@ import java.net.InetSocketAddress; import java.net.Proxy; import org.junit.Ignore; -import org.junit.Test; @Ignore("Should only be run manually when a local proxy server (e.g. Fiddler) is running") public class RestProxyWithHttpProxyOkHttpTests extends RestProxyTests { @@ -21,11 +20,4 @@ protected HttpClient createHttpClient() { .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", 8888))) .build(); } - - @Test - @Override - @Ignore("OKHttp does not support setting null as header value.") - public void syncGetRequestWithNullHeader() { - super.syncGetRequestWithNullHeader(); - } } diff --git a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithOkHttpTests.java b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithOkHttpTests.java index 1cdef63ecbf9..44665b295c81 100644 --- a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithOkHttpTests.java +++ b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/implementation/RestProxyWithOkHttpTests.java @@ -6,8 +6,6 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder; import com.azure.core.test.implementation.RestProxyTests; -import org.junit.Ignore; -import org.junit.Test; public class RestProxyWithOkHttpTests extends RestProxyTests { @@ -15,11 +13,4 @@ public class RestProxyWithOkHttpTests extends RestProxyTests { protected HttpClient createHttpClient() { return new OkHttpAsyncHttpClientBuilder().build(); } - - @Test - @Override - @Ignore("OKHttp does not support setting null as header value.") - public void syncGetRequestWithNullHeader() { - super.syncGetRequestWithNullHeader(); - } } diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 69a1db9b9e13..ed9e8315d999 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -113,6 +113,18 @@ jetty-server test
+ + org.openjdk.jmh + jmh-core + RELEASE + test + + + org.openjdk.jmh + jmh-generator-annprocess + RELEASE + test + diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java index d629d805beb3..06c08bd391d0 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/BasicAuthenticationCredential.java @@ -18,7 +18,7 @@ public class BasicAuthenticationCredential implements TokenCredential { /** * Basic auth user name. */ - private final String userName; + private final String username; /** * Basic auth password. @@ -28,11 +28,11 @@ public class BasicAuthenticationCredential implements TokenCredential { /** * Creates a basic authentication credential. * - * @param userName basic auth user name + * @param username basic auth user name * @param password basic auth password */ - public BasicAuthenticationCredential(String userName, String password) { - this.userName = userName; + public BasicAuthenticationCredential(String username, String password) { + this.username = username; this.password = password; } @@ -41,7 +41,7 @@ public BasicAuthenticationCredential(String userName, String password) { */ @Override public Mono getToken(TokenRequest request) { - String credential = userName + ":" + password; + String credential = username + ":" + password; String encodedCredential; try { encodedCredential = Base64Util.encodeToString(credential.getBytes("UTF8")); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java index 53f5b9e2c778..aef8864d854b 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/credentials/SimpleTokenCache.java @@ -21,16 +21,16 @@ public class SimpleTokenCache { private AccessToken cache; private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1); private final FluxSink sink = emitterProcessor.sink(OverflowStrategy.BUFFER); - private final Supplier> getNew; + private final Supplier> tokenSupplier; /** * Creates an instance of RefreshableTokenCredential with default scheme "Bearer". * - * @param getNew a method to get a new token + * @param tokenSupplier a method to get a new token */ - public SimpleTokenCache(Supplier> getNew) { + public SimpleTokenCache(Supplier> tokenSupplier) { this.wip = new AtomicBoolean(false); - this.getNew = getNew; + this.tokenSupplier = tokenSupplier; } /** @@ -43,7 +43,7 @@ public Mono getToken() { } return Mono.defer(() -> { if (!wip.getAndSet(true)) { - return getNew.get().doOnNext(ac -> cache = ac) + return tokenSupplier.get().doOnNext(ac -> cache = ac) .doOnNext(sink::next) .doOnError(sink::error) .doOnTerminate(() -> wip.set(false)); diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKey.java b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKey.java new file mode 100644 index 000000000000..6d69537bf409 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKey.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.cryptography; + +import reactor.core.publisher.Mono; + +/** + * A key which is used to asynchronously encrypt, or wrap, another key. + */ +public interface AsyncKeyEncryptionKey { + + /** + * Retrieves the key identifier. + * + * @return A {@link Mono} containing key identifier. + */ + Mono getKeyId(); + + /** + * Encrypts the specified key using the specified algorithm. + * + * @param algorithm The key wrap algorithm used to encrypt the specified key. + * @param key The key content to be encrypted. + * @return A {@link Mono} containing the encrypted key bytes. + */ + Mono wrapKey(String algorithm, byte[] key); + + /** + * Decrypts the specified encrypted key using the specified algorithm. + * + * @param algorithm The key wrap algorithm which was used to encrypt the specified encrypted key. + * @param encryptedKey The encrypted key content to be decrypted. + * @return A {@link Mono} containing the decrypted key bytes. + */ + Mono unwrapKey(String algorithm, byte[] encryptedKey); +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKeyResolver.java b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKeyResolver.java new file mode 100644 index 000000000000..1fca118a7bfa --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/AsyncKeyEncryptionKeyResolver.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.cryptography; + +import reactor.core.publisher.Mono; + +/** + * An object capable of asynchronously retrieving key encryption keys from a provided key identifier. + */ +public interface AsyncKeyEncryptionKeyResolver { + + /** + * Retrieves the {@link AsyncKeyEncryptionKey} corresponding to the specified {@code keyId} + * + * @param keyId The key identifier of the key encryption key to retrieve + * @return The key encryption key corresponding to the specified {@code keyId} + */ + Mono resolveKey(String keyId); +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKey.java b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKey.java new file mode 100644 index 000000000000..e9e137ffd3d8 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKey.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.cryptography; + +/** + * A key which is used to synchronously encrypt, or wrap, another key. + */ +public interface KeyEncryptionKey { + + /** + * Retrieves the key identifier. + * + * @return The key identifier. + */ + String getKeyId(); + + /** + * Encrypts the specified key using the specified algorithm. + * + * @param algorithm The key wrap algorithm used to encrypt the specified key. + * @param key The key content to be encrypted. + * @return The encrypted key bytes. + */ + byte[] wrapKey(String algorithm, byte[] key); + + /** + * Decrypts the specified encrypted key using the specified algorithm. + * + * @param algorithm The key wrap algorithm which was used to encrypt the specified encrypted key. + * @param encryptedKey The encrypted key content to be decrypted. + * @return The decrypted key bytes. + */ + byte[] unwrapKey(String algorithm, byte[] encryptedKey); +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKeyResolver.java b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKeyResolver.java new file mode 100644 index 000000000000..5ea675156dd8 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/KeyEncryptionKeyResolver.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.cryptography; + +/** + * An object capable of synchronously retrieving key encryption keys from a provided key identifier. + */ +public interface KeyEncryptionKeyResolver { + + /** + * Retrieves the {@link KeyEncryptionKey} corresponding to the specified {@code keyId} + * + * @param keyId The key identifier of the key encryption key to retrieve + * @return The key encryption key corresponding to the specified {@code keyId} + */ + KeyEncryptionKey resolveKey(String keyId); +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/package-info.java b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/package-info.java new file mode 100644 index 000000000000..5e39ad45fb6d --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/cryptography/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing core cryptography interfaces + */ +package com.azure.core.cryptography; diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java index 99a7712d9db7..d7b8df590693 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogDetailLevel.java @@ -37,7 +37,7 @@ public enum HttpLogDetailLevel { /** * @return a value indicating whether a request's URL should be logged. */ - public boolean shouldLogURL() { + public boolean shouldLogUrl() { return this != NONE; } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index f8df955bca2f..89b6c78e50cf 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -69,7 +69,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN } private Mono logRequest(final ClientLogger logger, final HttpRequest request) { - if (detailLevel.shouldLogURL()) { + if (detailLevel.shouldLogUrl()) { logger.info("--> {} {}", request.getHttpMethod(), request.getUrl()); } @@ -129,7 +129,7 @@ private Function> logResponseDelegate(final Cli } // HttpResponseStatus responseStatus = HttpResponseStatus.valueOf(response.statusCode()); - if (detailLevel.shouldLogURL()) { + if (detailLevel.shouldLogUrl()) { logger.info("<-- {} {} ({} ms, {} body)", response.getStatusCode(), url, tookMs, bodySize); } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java new file mode 100644 index 000000000000..f236ebf96fc1 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/ResponseConstructorsCache.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.implementation; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.implementation.serializer.HttpResponseDecoder; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * A concurrent cache of {@link Response} constructors. + */ +final class ResponseConstructorsCache { + private final ClientLogger logger = new ClientLogger(ResponseConstructorsCache.class); + private final Map, Constructor>> cache = new ConcurrentHashMap<>(); + + /** + * Identify the suitable constructor for the given response class. + * + * @param responseClass the response class + * @return identified constructor, null if there is no match + */ + Constructor> get(Class> responseClass) { + return this.cache.computeIfAbsent(responseClass, this::locateResponseConstructor); + } + + /** + * Identify the most specific constructor for the given response class. + * + * The most specific constructor is looked up following order: + * 1. (httpRequest, statusCode, headers, body, decodedHeaders) + * 2. (httpRequest, statusCode, headers, body) + * 3. (httpRequest, statusCode, headers) + * + * Developer Note: This method logic can be easily replaced with Java.Stream + * and associated operators but we're using basic sort and loop constructs + * here as this method is in hot path and Stream route is consuming a fair + * amount of resources. + * + * @param responseClass the response class + * @return identified constructor, null if there is no match + */ + @SuppressWarnings("unchecked") + private Constructor> locateResponseConstructor(Class responseClass) { + Constructor[] constructors = responseClass.getDeclaredConstructors(); + // Sort constructors in the "descending order" of parameter count. + Arrays.sort(constructors, Comparator.comparing(Constructor::getParameterCount, (a, b) -> b - a)); + for (Constructor constructor : constructors) { + final int paramCount = constructor.getParameterCount(); + if (paramCount >= 3 && paramCount <= 5) { + try { + return (Constructor>) constructor; + } catch (Throwable t) { + throw logger.logExceptionAsError(new RuntimeException(t)); + } + } + } + return null; + } + + /** + * Invoke the constructor this type represents. + * + * @param constructor the constructor type + * @param decodedResponse the decoded http response + * @param bodyAsObject the http response content + * @return an instance of a {@link Response} implementation + */ + Mono> invoke(final Constructor> constructor, + final HttpResponseDecoder.HttpDecodedResponse decodedResponse, + final Object bodyAsObject) { + final HttpResponse httpResponse = decodedResponse.getSourceResponse(); + final HttpRequest httpRequest = httpResponse.getRequest(); + final int responseStatusCode = httpResponse.getStatusCode(); + final HttpHeaders responseHeaders = httpResponse.getHeaders(); + + final int paramCount = constructor.getParameterCount(); + switch (paramCount) { + case 3: + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + case 4: + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + case 5: + return decodedResponse.getDecodedHeaders() + .map((Function>) decodedHeaders -> { + try { + return constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + decodedHeaders); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + }) + .switchIfEmpty(Mono.defer((Supplier>>) () -> { + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + null)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + })); + default: + throw logger.logExceptionAsError( + new IllegalStateException("Response constructor with expected parameters not found.")); + } + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java index eaea1c3de407..3eb5f24e3ef5 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/RestProxy.java @@ -7,7 +7,6 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpHeader; -import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpRequest; @@ -46,20 +45,16 @@ import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.lang.reflect.Type; import java.net.URL; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.function.Function; import java.util.function.Supplier; -import java.util.stream.Collectors; /** * Type to create a proxy implementation for an interface describing REST API methods. @@ -75,6 +70,8 @@ public class RestProxy implements InvocationHandler { private final SwaggerInterfaceParser interfaceParser; private final HttpResponseDecoder decoder; + private final ResponseConstructorsCache responseConstructorsCache; + /** * Create a RestProxy. * @@ -89,6 +86,7 @@ public RestProxy(HttpPipeline httpPipeline, SerializerAdapter serializer, Swagge this.serializer = serializer; this.interfaceParser = interfaceParser; this.decoder = new HttpResponseDecoder(this.serializer); + this.responseConstructorsCache = new ResponseConstructorsCache(); } /** @@ -203,7 +201,6 @@ private Method determineResumeMethod(Method method, String resumeMethodName) { return potentialResumeMethod; } } - return null; } @@ -478,11 +475,6 @@ private Mono handleRestResponseReturnType(HttpDecodedResponse response, Swagg @SuppressWarnings("unchecked") private Mono> createResponse(HttpDecodedResponse response, Type entityType, Object bodyAsObject) { - final HttpResponse httpResponse = response.getSourceResponse(); - final HttpRequest httpRequest = httpResponse.getRequest(); - final int responseStatusCode = httpResponse.getStatusCode(); - final HttpHeaders responseHeaders = httpResponse.getHeaders(); - // determine the type of response class. If the type is the 'RestResponse' interface, we will use the // 'RestResponseBase' class instead. Class> cls = (Class>) TypeUtil.getRawClass(entityType); @@ -496,58 +488,11 @@ private Mono> createResponse(HttpDecodedResponse response, Type enti "Unable to create PagedResponse. Body must be of a type that implements: " + Page.class)); } } - - // we try to find the most specific constructor, which we do in the following order: - // 1) (HttpRequest httpRequest, int statusCode, HttpHeaders headers, Object body, Object deserializedHeaders) - // 2) (HttpRequest httpRequest, int statusCode, HttpHeaders headers, Object body) - // 3) (HttpRequest httpRequest, int statusCode, HttpHeaders headers) - List> constructors = Arrays.stream(cls.getDeclaredConstructors()) - .filter(constructor -> { - int paramCount = constructor.getParameterCount(); - return paramCount >= 3 && paramCount <= 5; - }) - .sorted(Comparator.comparingInt(Constructor::getParameterCount)) - .collect(Collectors.toList()); - - if (constructors.isEmpty()) { - throw logger.logExceptionAsError(new RuntimeException("Cannot find suitable constructor for class " + cls)); - } - - // try to create an instance using our list of potential candidates - for (Constructor constructor : constructors) { - final Constructor> ctor = (Constructor>) constructor; - final int paramCount = constructor.getParameterCount(); - - switch (paramCount) { - case 3: - return Mono.just(createResponse(ctor, new Object[] - {httpRequest, responseStatusCode, responseHeaders})); - case 4: - return Mono.just(createResponse(ctor, new Object[] {httpRequest, responseStatusCode, - responseHeaders, bodyAsObject})); - case 5: - return response.getDecodedHeaders() - .map((Function>) headers -> { - return createResponse(ctor, new Object[] - {httpRequest, responseStatusCode, responseHeaders, bodyAsObject, headers}); - }).switchIfEmpty(Mono.defer((Supplier>>) () -> { - return Mono.just(createResponse(ctor, new Object[] - {httpRequest, responseStatusCode, responseHeaders, bodyAsObject, null})); - })); - default: - throw logger.logExceptionAsError(new IllegalStateException( - "Response constructor with expected parameters not found.")); - } - } - // error - throw logger.logExceptionAsError(new RuntimeException("Cannot find suitable constructor for class " + cls)); - } - - private Response createResponse(Constructor> ctor, Object[] args) { - try { - return ctor.newInstance(args); - } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); + Constructor> ctr = this.responseConstructorsCache.get(cls); + if (ctr != null) { + return this.responseConstructorsCache.invoke(ctr, response, bodyAsObject); + } else { + return Mono.error(new RuntimeException("Cannot find suitable constructor for class " + cls)); } } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/tracing/ProcessKind.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java similarity index 90% rename from sdk/core/azure-core/src/main/java/com/azure/core/implementation/tracing/ProcessKind.java rename to sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java index 36525024c9e9..69f4f351e517 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/tracing/ProcessKind.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.core.implementation.tracing; +package com.azure.core.util.tracing; /** * Contains constants common AMQP protocol process calls. 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 eb978487f12e..80d90c1481d2 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 @@ -3,33 +3,31 @@ package com.azure.core.util.tracing; -import com.azure.core.implementation.tracing.ProcessKind; import com.azure.core.util.Context; /** * Contract that all tracers must implement to be plug-able into the SDK. + * */ public interface Tracer { /** - * Key for {@link Context} which indicates that the context contains OpenTelemetry span data. This span will be used + * Key for {@link Context} which indicates that the context contains OpenCensus span data. This span will be used * as the parent span for all spans the SDK creates. - * - * If no span data is listed when the SDK creates its first span it will be used as the parent for all further spans - * it creates. + *

+ * If no span data is listed when the SDK creates its first span, this span key will be used as the parent span. */ - String OPENTELEMETRY_SPAN_KEY = "opentelemetry-span"; + String OPENCENSUS_SPAN_KEY = "opencensus-span"; /** - * Key for {@link Context} which indicates that the context contains the name for the OpenTelemetry spans that are + * Key for {@link Context} which indicates that the context contains the name for the OpenCensus spans that are * created. - * + *

* If no span name is listed when the span is created it will default to using the calling method's name. */ - String OPENTELEMETRY_SPAN_NAME_KEY = "opentelemetry-span-name"; + String OPENCENSUS_SPAN_NAME_KEY = "opencensus-span-name"; /** - * Key for {@link Context} which indicates that the context contains the Entity Path, remote endpoint path. - * + * Key for {@link Context} which indicates that the context contains an entity path. */ String ENTITY_PATH = "entity-path"; @@ -40,61 +38,108 @@ public interface Tracer { String HOST_NAME = "hostname"; /** - * Key for {@link Context} which indicates that the context contains message Span Context. + * Key for {@link Context} which indicates that the context contains a message span context. * */ String SPAN_CONTEXT = "span-context"; /** - * Key for {@link Context} which indicates that the context contains the Diagnostic Id for the service call. + * Key for {@link Context} which indicates that the context contains a "Diagnostic Id" for the service call. * */ String DIAGNOSTIC_ID_KEY = "diagnostic-id"; /** * Creates a new tracing span. + *

+ * The {@code context} will be checked for containing information about a parent span. If a parent span is found, + * the new span will be added as a child. Otherwise the parent span will be created and added to the {@code context} + * and any downstream {@code start()} calls will use the created span as the parent. * - * The {@code context} will be checked for containing information about a parent span. If a parent span is found the - * new span will be added as a child, otherwise the span will be created and added to the context and any downstream - * start calls will use the created span as the parent. + *

Code samples

+ * + *

Starts a tracing span with provided method name and explicit parent span

+ * {@codesnippet com.azure.core.util.tracing.start#string-context} * * @param methodName Name of the method triggering the span creation. * @param context Additional metadata that is passed through the call stack. - * @return An updated context object. + * + * @return The updated {@link Context} object containing the returned span. + * @throws NullPointerException if {@code methodName} or {@code context} is {@code null}. */ Context start(String methodName, Context context); /** - * Creates a new tracing span. + * Creates a new tracing span for AMQP calls. * + *

* The {@code context} will be checked for containing information about a parent span. If a parent span is found the - * new span will be added as a child, otherwise the span will be created and added to the context and any downstream - * start calls will use the created span as the parent. + * new span will be added as a child. Otherwise the span will be created and added to the {@code context} and any + * downstream {@code start()} calls will use the created span as the parent. + * + *

+ * Sets additional request attributes on the created span when {@code processKind} is + * {@link ProcessKind#SEND ProcessKind.SEND}. + * + *

+ * Returns the diagnostic Id and span context of the returned span when {@code processKind} is + * {@link ProcessKind#RECEIVE ProcessKind.RECEIVE}. + * + *

+ * Creates a new tracing span with remote parent and returns that scope when the given when {@code processKind} + * is {@link ProcessKind#PROCESS ProcessKind.PROCESS}. + * + *

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} + * + *

Starts a tracing span with provided method name and AMQP operation RECEIVE

+ * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-RECEIVE} + * + *

Starts a tracing span with provided method name and AMQP operation PROCESS

+ * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-PROCESS} * * @param methodName Name of the method triggering the span creation. * @param context Additional metadata that is passed through the call stack. - * @param processKind AMQP message process kind. - * @return An updated context object. + * @param processKind AMQP operation kind. + * + * @return The updated {@link Context} object containing the returned span. + * @throws NullPointerException if {@code methodName} or {@code context} or {@code processKind} is {@code null}. */ Context start(String methodName, Context context, ProcessKind processKind); /** * Completes the current tracing span. * + *

Code samples

+ * + *

Completes the tracing span present in the context, with the corresponding OpenCensus status for the given + * response status code

+ * {@codesnippet com.azure.core.util.tracing.end#int-throwable-context} + * * @param responseCode Response status code if the span is in a HTTP call context. - * @param error Potential throwable that happened during the span. + * @param error {@link Throwable} that happened during the span or {@code null} if no exception occurred. * @param context Additional metadata that is passed through the call stack. + * @throws NullPointerException if {@code context} is {@code null}. */ void end(int responseCode, Throwable error, Context context); /** * Completes the current tracing span. * - * @param errorCondition the error message that occurred during the call. - * @param error Potential throwable that happened during the span. + *

Code samples

+ * + *

Completes the tracing span with the corresponding OpenCensus status for the given status message

+ * {@codesnippet com.azure.core.util.tracing.end#string-throwable-context} + * + * @param statusMessage the error or success message that occurred during the call, or {@code null} if no error + * occurred. + * @param error {@link Throwable} that happened during the span or {@code null} if no exception occurred. * @param context Additional metadata that is passed through the call stack. + * @throws NullPointerException if {@code context} is {@code null}. */ - void end(String errorCondition, Throwable error, Context context); + void end(String statusMessage, Throwable error, Context context); /** * Adds metadata to the current span. The {@code context} is checked for having span information, if no span @@ -103,62 +148,53 @@ public interface Tracer { * @param key Name of the metadata. * @param value Value of the metadata. * @param context Additional metadata that is passed through the call stack. + * @throws NullPointerException if {@code key} or {@code value} or {@code context} is {@code null}. */ void setAttribute(String key, String value, Context context); - /* - * Adds metadata to the current span. The {@code context} is checked for having span information, if no span - * information is found in the context no metadata is added. - * - * @param key Name of the metadata. - * @param value Value of the metadata. - * @param context Additional metadata that is passed through the call stack. - */ - // void setAttribute(String key, long value, Context context); - - /* - * Adds metadata to the current span. The {@code context} is checked for having span information, if no span - * information is found in the context no metadata is added. + /** + * Sets the name for spans that are created. * - * @param key Name of the metadata. - * @param value Value of the metadata. - * @param context Additional metadata that is passed through the call stack. - */ - // void setAttribute(String key, double value, Context context); - - /* - * Adds metadata to the current span. The {@code context} is checked for having span information, if no span - * information is found in the context no metadata is added. + *

Code samples

* - * @param key Name of the metadata. - * @param value Value of the metadata. - * @param context Additional metadata that is passed through the call stack. - */ - // void setAttribute(String key, boolean value, Context context); - - /** - * Configures the name for spans that are created. + *

Retrieve the span name of the returned span

+ * {@codesnippet com.azure.core.util.tracing.setSpanName#string-context} * * @param spanName Name to give the next span. * @param context Additional metadata that is passed through the call stack. - * @return An updated context object. + * + * @return The updated {@link Context} object containing the name of the returned span. + * @throws NullPointerException if {@code spanName} or {@code context} is {@code null}. */ Context setSpanName(String spanName, Context context); /** - * Adds a link to the tracing span. + * Provides a way to link multiple tracing spans. * Used in batching operations to relate multiple requests under a single batch. * + *

Code samples

+ * + *

Link multiple spans using their span context information

+ * {@codesnippet com.azure.core.util.tracing.addLink#context} + * * @param context Additional metadata that is passed through the call stack. + * @throws NullPointerException if {@code context} is {@code null}. */ void addLink(Context context); /** - * Extracts the span's {@link Context} from the given event's diagnostic id. + * Extracts the span's context as {@link Context} from upstream. + * + *

Code samples

+ * + *

Extracts the corresponding span context information from a valid diagnostic id

+ * {@codesnippet com.azure.core.util.tracing.extractContext#string-context} * * @param diagnosticId Unique identifier for the trace information of the span. * @param context Additional metadata that is passed through the call stack. - * @return An updated context object. + * + * @return The updated {@link Context} object containing the span context. + * @throws NullPointerException if {@code diagnosticId} or {@code context} is {@code null}. */ Context extractContext(String diagnosticId, Context context); } diff --git a/sdk/core/azure-core/src/main/java/module-info.java b/sdk/core/azure-core/src/main/java/module-info.java index 0b6d1d43f75b..6b0b06294e65 100644 --- a/sdk/core/azure-core/src/main/java/module-info.java +++ b/sdk/core/azure-core/src/main/java/module-info.java @@ -6,7 +6,7 @@ requires transitive com.fasterxml.jackson.core; requires transitive com.fasterxml.jackson.annotation; - requires com.fasterxml.jackson.databind; + requires transitive com.fasterxml.jackson.databind; requires com.fasterxml.jackson.dataformat.xml; requires com.fasterxml.jackson.datatype.jsr310; @@ -91,9 +91,10 @@ com.azure.storage.file, // FIXME this should not be a long-term solution com.azure.storage.queue; // FIXME this should not be a long-term solution exports com.azure.core.implementation.util to + com.azure.core.amqp, // FIXME this should not be a long-term solution com.azure.core.management, // FIXME this should not be a long-term solution com.azure.core.test, // FIXME this should not be a long-term solution - com.azure.core.amqp, // FIXME this should not be a long-term solution + com.azure.core.tracing.opencensus, // FIXME this should not be a long-term solution com.azure.data.appconfiguration, // FIXME this should not be a long-term solution com.azure.http.netty, // FIXME this should not be a long-term solution com.azure.messaging.eventhubs, // FIXME this should not be a long-term solution @@ -103,22 +104,6 @@ com.azure.security.keyvault.keys, // FIXME this should not be a long-term solution com.azure.security.keyvault.secrets, // FIXME this should not be a long-term solution com.azure.storage.common, // FIXME this should not be a long-term solution - com.azure.tracing.opentelemetry, // FIXME this should not be a long-term solution - com.azure.storage.blob, // FIXME this should not be a long-term solution - com.azure.storage.file, // FIXME this should not be a long-term solution - com.azure.storage.queue; // FIXME this should not be a long-term solution - exports com.azure.core.implementation.tracing to - com.azure.core.management, // FIXME this should not be a long-term solution - com.azure.core.test, // FIXME this should not be a long-term solution - com.azure.core.amqp, // FIXME this should not be a long-term solution - com.azure.http.netty, // FIXME this should not be a long-term solution - com.azure.messaging.eventhubs, // FIXME this should not be a long-term solution - com.azure.messaging.eventhubs.checkpointstore.blob, // FIXME this should not be a long-term solution - com.azure.identity, // FIXME this should not be a long-term solution - com.azure.security.keyvault.keys, // FIXME this should not be a long-term solution - com.azure.security.keyvault.secrets, // FIXME this should not be a long-term solution - com.azure.storage.common, // FIXME this should not be a long-term solution - com.azure.tracing.opentelemetry, // FIXME this should not be a long-term solution com.azure.storage.blob, // FIXME this should not be a long-term solution com.azure.storage.file, // FIXME this should not be a long-term solution com.azure.storage.queue; // FIXME this should not be a long-term solution @@ -133,7 +118,7 @@ com.azure.security.keyvault.keys, // FIXME this should not be a long-term solution com.azure.security.keyvault.secrets, // FIXME this should not be a long-term solution com.azure.storage.common, // FIXME this should not be a long-term solution - com.azure.tracing.opentelemetry, // FIXME this should not be a long-term solution + com.azure.core.tracing.opencensus, // FIXME this should not be a long-term solution com.azure.storage.blob, // FIXME this should not be a long-term solution com.azure.storage.file, // FIXME this should not be a long-term solution com.azure.storage.queue; diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java new file mode 100644 index 000000000000..fab3db1a46b2 --- /dev/null +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/util/tracing/TracerJavaDocCodeSnippets.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.util.tracing; + +import com.azure.core.util.Context; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_NAME_KEY; +import static com.azure.core.util.tracing.Tracer.ENTITY_PATH; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.HOST_NAME; +import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; +import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; + +/** + * Contains code snippets when generating javadocs through doclets for {@link Tracer}. + */ +public class TracerJavaDocCodeSnippets { + final Tracer tracer = new TracerImplementation(); + + /** + * Code snippet for {@link Tracer#start(String, Context, ProcessKind)} and {@link Tracer#start(String, Context)} + */ + public void startTracingSpan() { + // BEGIN: com.azure.core.util.tracing.start#string-context + // pass the current tracing span context to the calling method + Context traceContext = new Context(OPENCENSUS_SPAN_KEY, ""); + // 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(OPENCENSUS_SPAN_KEY).get()); + // END: com.azure.core.util.tracing.start#string-context + + // BEGIN: 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(OPENCENSUS_SPAN_KEY, "") + .addData(ENTITY_PATH, "entity-path").addData(HOST_NAME, "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(OPENCENSUS_SPAN_KEY).get()); + // END: com.azure.core.util.tracing.start#string-context-processKind-SEND + + // BEGIN: com.azure.core.util.tracing.start#string-context-processKind-RECEIVE + // start a new tracing span with explicit parent, sets the diagnostic Id (traceparent headers) on the current + // context when process kind RECEIVE + Context updatedReceiveContext = tracer.start("azure.eventhubs.receive", traceContext, + ProcessKind.RECEIVE); + System.out.printf("Diagnostic Id: %s%n", updatedReceiveContext.getData(DIAGNOSTIC_ID_KEY).get().toString()); + // END: com.azure.core.util.tracing.start#string-context-processKind-RECEIVE + + // BEGIN: com.azure.core.util.tracing.start#string-context-processKind-PROCESS + // 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(OPENCENSUS_SPAN_KEY, "") + .addData(SPAN_CONTEXT, ""); + Context updatedProcessContext = tracer.start("azure.eventhubs.process", processContext, + ProcessKind.PROCESS); + System.out.printf("Scope: %s%n", updatedProcessContext.getData("scope").get()); + // END: com.azure.core.util.tracing.start#string-context-processKind-PROCESS + } + + /** + * Code snippet for {@link Tracer#end(int, Throwable, Context)} and {@link Tracer#end(String, Throwable, Context)} + */ + public void endTracingSpan() { + // BEGIN: com.azure.core.util.tracing.end#int-throwable-context + // context containing the current tracing span to end + Context traceContext = new Context(OPENCENSUS_SPAN_KEY, ""); + + // completes the tracing span with the passed response status code + tracer.end(200, null, traceContext); + // END: com.azure.core.util.tracing.end#int-throwable-context + + // BEGIN: 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); + // END: com.azure.core.util.tracing.end#string-throwable-context + } + + /** + * Code snippet for {@link Tracer#setSpanName(String, Context)} + */ + public void setSpanName() { + // BEGIN: com.azure.core.util.tracing.setSpanName#string-context + // Sets the span name of the returned span on the context object, with key OPENCENSUS_SPAN_NAME_KEY + Context context = tracer.setSpanName("test-span-method", Context.NONE); + System.out.printf("Span name: %s%n", context.getData(OPENCENSUS_SPAN_NAME_KEY).get().toString()); + // END: com.azure.core.util.tracing.setSpanName#string-context + } + + /** + * Code snippet for {@link Tracer#addLink(Context)} + */ + public void addLink() { + // BEGIN: 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(OPENCENSUS_SPAN_KEY, ""); + // use the returned span context information of the current tracing span to link + Context spanContext = tracer.start("test.method", parentContext, ProcessKind.RECEIVE); + + // 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); + // END: com.azure.core.util.tracing.addLink#context + } + + /** + * Code snippet for {@link Tracer#extractContext(String, Context)} + */ + public void extractContext() { + // BEGIN: 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. + Context spanContext = tracer.extractContext("valid-diagnostic-id", Context.NONE); + System.out.printf("Span context of the current tracing span: %s%n", spanContext.getData(SPAN_CONTEXT).get()); + // END: com.azure.core.util.tracing.extractContext#string-context + } + + //Noop Tracer + private static final class TracerImplementation implements Tracer { + @Override + public Context start(String methodName, Context context) { + return null; + } + + @Override + public Context start(String methodName, Context context, ProcessKind processKind) { + return null; + } + + @Override + public void end(int responseCode, Throwable error, Context context) { + + } + + @Override + public void end(String errorCondition, Throwable error, Context context) { + + } + + @Override + public void setAttribute(String key, String value, Context context) { + + } + + @Override + public Context setSpanName(String spanName, Context context) { + return null; + } + + @Override + public void addLink(Context context) { + + } + + @Override + public Context extractContext(String diagnosticId, Context context) { + return null; + } + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMark.java b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMark.java new file mode 100644 index 000000000000..17cb79f24ae2 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMark.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.implementation.util.TypeUtil; +import org.openjdk.jmh.Main; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.infra.Blackhole; +import org.openjdk.jmh.runner.RunnerException; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.util.concurrent.TimeUnit; + +@Fork(3) +@Warmup(iterations = 5, time = 2) +@Measurement(iterations = 5, time = 10) +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@State(Scope.Thread) +public class ResponseConstructorsCacheBenchMark { + private ResponseConstructorsCacheBenchMarkTestData testData; + // Cache Types + private ResponseConstructorsCache defaultCache; + private ResponseConstructorsCacheLambdaMetaFactory lambdaMetaCache; + private ResponseConstructorsNoCacheReflection reflectionNoCache; + + @Setup + public void setup() { + testData = new ResponseConstructorsCacheBenchMarkTestData(); + defaultCache = new ResponseConstructorsCache(); + lambdaMetaCache = new ResponseConstructorsCacheLambdaMetaFactory(); + reflectionNoCache = new ResponseConstructorsNoCacheReflection(); + } + + @Benchmark + @SuppressWarnings("unchecked") + public void reflectionCache(Blackhole blackhole) { + ResponseConstructorsCacheBenchMarkTestData.Input[] inputs = testData.inputs(); + + for (int i = 0; i < inputs.length; i++) { + Class> responseClass = + (Class>) TypeUtil.getRawClass(inputs[i].returnType()); + // Step1: Locate Constructor using Reflection. + Constructor> constructor = defaultCache.get(responseClass); + if (constructor == null) { + throw new IllegalStateException("Response constructor with expected parameters not found."); + } + // Step2: Invoke Constructor using Reflection. + Mono> response = defaultCache.invoke(constructor, inputs[i].decodedResponse(), + inputs[i].bodyAsObject()); + // avoid JVM dead code detection + blackhole.consume(response.block()); + } + } + + @Benchmark + @SuppressWarnings("unchecked") + public void lambdaMetaFactoryCache(Blackhole blackhole) { + ResponseConstructorsCacheBenchMarkTestData.Input[] inputs = testData.inputs(); + + for (int i = 0; i < inputs.length; i++) { + Class> responseClass = + (Class>) TypeUtil.getRawClass(inputs[i].returnType()); + // Step1: Locate Constructor using LambdaMetaFactory. + ResponseConstructorsCacheLambdaMetaFactory.ResponseConstructor constructor = + lambdaMetaCache.get(responseClass); + if (constructor == null) { + throw new IllegalStateException("Response constructor with expected parameters not found."); + } + // Step2: Invoke Constructor using LambdaMetaFactory functional interface. + Mono> response = constructor.invoke(inputs[i].decodedResponse(), + inputs[i].bodyAsObject()); + // avoid JVM dead code detection + blackhole.consume(response.block()); + } + } + + @Benchmark + @SuppressWarnings("unchecked") + public void reflectionNoCache(Blackhole blackhole) { + ResponseConstructorsCacheBenchMarkTestData.Input[] inputs = testData.inputs(); + + for (int i = 0; i < inputs.length; i++) { + Class> responseClass = + (Class>) TypeUtil.getRawClass(inputs[i].returnType()); + // Step1: Locate Constructor using Reflection. + Constructor> constructor = reflectionNoCache.get(responseClass); + if (constructor == null) { + throw new IllegalStateException("Response constructor with expected parameters not found."); + } + // Step2: Invoke Constructor using Reflection. + Mono> response = reflectionNoCache.invoke(constructor, inputs[i].decodedResponse(), + inputs[i].bodyAsObject()); + // avoid JVM dead code detection + blackhole.consume(response.block()); + } + } + + public static void main(String... args) throws IOException, RunnerException { + Main.main(args); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMarkTestData.java b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMarkTestData.java new file mode 100644 index 000000000000..f49bc6f74f39 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheBenchMarkTestData.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.implementation; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Page; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.http.rest.StreamResponse; +import com.azure.core.implementation.http.PagedResponseBase; +import com.azure.core.implementation.serializer.HttpResponseDecoder; +import com.azure.core.implementation.serializer.SerializerAdapter; +import com.azure.core.implementation.serializer.SerializerEncoding; +import com.azure.core.implementation.serializer.jackson.JacksonAdapter; +import com.fasterxml.jackson.annotation.JsonProperty; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +class ResponseConstructorsCacheBenchMarkTestData { + // Model type for Http content + static final class Foo { + @JsonProperty("name") + private String name; + + public Foo setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return this.name; + } + } + + // Model type for custom Http headers + static final class FooHeader { + @JsonProperty("customHdr") + private String customHdr; + + public String getCustomHdr() { + return this.customHdr; + } + } + + // 1. final VoidResponse (Ctr_args: 3) + static final class VoidResponse extends SimpleResponse { + VoidResponse(HttpRequest request, int statusCode, HttpHeaders headers, Void value) { + super(request, statusCode, headers, value); + } + } + + // 2. SimpleResponse Type (Ctr_args: 4) + static final class FooSimpleResponse extends SimpleResponse { + FooSimpleResponse(HttpRequest request, + int statusCode, + HttpHeaders headers, + Foo value) { + super(request, statusCode, headers, value); + } + } + + // 3. final StreamResponse (Ctr_args: 4) // Final class cannot be extended + // StreamResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux value) + + // 4. ResponseBase (Ctr_args: 5) + static final class FooResponseBase extends ResponseBase { + FooResponseBase(HttpRequest request, + int statusCode, + HttpHeaders headers, + Foo value, + FooHeader decodedHeaders) { + super(request, statusCode, headers, value, decodedHeaders); + } + } + + // 5. PagedResponseBase (Ctr_args: 5) + static final class FooPagedResponseBase extends PagedResponseBase { + FooPagedResponseBase(HttpRequest request, + int statusCode, + HttpHeaders headers, + Page page, + FooHeader decodedHeaders) { + super(request, statusCode, headers, page, decodedHeaders); + } + } + + // Dummy service client + public interface FooService { + VoidResponse getVoidResponse(); + FooSimpleResponse getFooSimpleResponse(); + StreamResponse getStreamResponse(); + FooResponseBase getResponseBaseFoo(); + FooPagedResponseBase getPagedResponseBaseFoo(); + } + + // Mock Http Response + static final class MockResponse extends HttpResponse { + private final int statusCode; + private final HttpHeaders headers; + private final Mono bodyBytes; + private final Flux bodyBb; + private final Mono bodyString; + + MockResponse(HttpRequest request, int statusCode, HttpHeaders headers, byte[] body) { + super(request); + this.statusCode = statusCode; + this.headers = headers; + this.bodyBytes = body == null ? Mono.empty() : Mono.just(body); + this.bodyBb = body == null ? Flux.empty() : Flux.just(ByteBuffer.wrap(body)); + this.bodyString = body == null + ? Mono.empty() + : Mono.just(new String(body, Charset.defaultCharset())); + } + + @Override + public int getStatusCode() { + return this.statusCode; + } + + @Override + public String getHeaderValue(String name) { + return this.headers.getValue(name); + } + + @Override + public HttpHeaders getHeaders() { + return this.headers; + } + + @Override + public Flux getBody() { + return bodyBb; + } + + @Override + public Mono getBodyAsByteArray() { + return this.bodyBytes; + } + + @Override + public Mono getBodyAsString() { + return this.bodyString; + } + + @Override + public Mono getBodyAsString(Charset charset) { + return this.bodyString; + } + } + + private static final SerializerAdapter SERIALIZER_ADAPTER = JacksonAdapter.createDefaultSerializerAdapter(); + private static final HttpResponseDecoder RESPONSE_DECODER = new HttpResponseDecoder(SERIALIZER_ADAPTER); + // + private static final HttpRequest HTTP_REQUEST = new HttpRequest(HttpMethod.GET, createUrl()); + private static final HttpHeaders RESPONSE_HEADERS = new HttpHeaders().put("hello", "world"); + private static final HttpHeaders RESPONSE_CUSTOM_HEADERS = new HttpHeaders() + .put("hello", "world") // General header + .put("customHdr", "customVal"); // Custom header + private static final int RESPONSE_STATUS_CODE = 200; + private static final Foo FOO = new Foo().setName("foo1"); + private static final byte[] FOO_BYTE_ARRAY = asJsonByteArray(FOO); + private static final byte[] STREAM_BYTE_ARRAY = new byte[1]; + private static final Page PAGE_FOO = new Page() { + @Override + public List getItems() { + List items = new ArrayList<>(); + items.add(FOO); + return items; + } + + @Override + public String getNextLink() { + return null; + } + }; + private static final byte[] PAGE_FOO_BYTE_ARRAY = asJsonByteArray(PAGE_FOO); + // MOCK RESPONSES + private static final Mono VOID_RESPONSE = Mono.just(new MockResponse(HTTP_REQUEST, + RESPONSE_STATUS_CODE, + RESPONSE_HEADERS, + null)); + private static final Mono FOO_RESPONSE = Mono.just(new MockResponse(HTTP_REQUEST, + RESPONSE_STATUS_CODE, + RESPONSE_HEADERS, + FOO_BYTE_ARRAY)); + private static final Mono STREAM_RESPONSE = Mono.just(new MockResponse(HTTP_REQUEST, + RESPONSE_STATUS_CODE, + RESPONSE_HEADERS, + STREAM_BYTE_ARRAY)); + private static final Mono FOO_PAGE_RESPONSE = Mono.just(new MockResponse(HTTP_REQUEST, + RESPONSE_STATUS_CODE, + RESPONSE_HEADERS, + PAGE_FOO_BYTE_ARRAY)); + private static final Mono FOO_CUSTOM_HEADER_RESPONSE = Mono.just(new MockResponse(HTTP_REQUEST, + RESPONSE_STATUS_CODE, + RESPONSE_CUSTOM_HEADERS, + FOO_BYTE_ARRAY)); + // ARRAY HOLDING TEST DATA + private final Input[] inputs; + + ResponseConstructorsCacheBenchMarkTestData() { + this.inputs = new Input[5]; + this.inputs[0] = new Input(RESPONSE_DECODER, + FooService.class, + "getVoidResponse", + VOID_RESPONSE, + null); + this.inputs[1] = new Input(RESPONSE_DECODER, + FooService.class, + "getFooSimpleResponse", + FOO_RESPONSE, + FOO); + this.inputs[2] = new Input(RESPONSE_DECODER, + FooService.class, + "getStreamResponse", + STREAM_RESPONSE, + null); + this.inputs[3] = new Input(RESPONSE_DECODER, + FooService.class, + "getResponseBaseFoo", + FOO_CUSTOM_HEADER_RESPONSE, + FOO); + this.inputs[4] = new Input(RESPONSE_DECODER, + FooService.class, + "getPagedResponseBaseFoo", + FOO_PAGE_RESPONSE, + PAGE_FOO); + } + + Input[] inputs() { + return this.inputs; + } + + private static URL createUrl() { + try { + return new URL("http://localhost"); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + private static byte[] asJsonByteArray(Object object) { + try { + String content = SERIALIZER_ADAPTER.serialize(object, SerializerEncoding.JSON); + return content.getBytes(StandardCharsets.UTF_8); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + class Input { + private final Type returnType; + private final HttpResponseDecoder.HttpDecodedResponse decodedResponse; + private final Object bodyAsObject; + + Input(HttpResponseDecoder decoder, + Class serviceClass, + String methodName, + Mono httpResponse, + Object bodyAsObject) { + this.returnType = findMethod(serviceClass, methodName).getGenericReturnType(); + this.decodedResponse = decoder.decode(httpResponse, () -> returnType).block(); + this.bodyAsObject = bodyAsObject; + } + + Type returnType() { + return this.returnType; + } + + HttpResponseDecoder.HttpDecodedResponse decodedResponse() { + return this.decodedResponse; + } + + Object bodyAsObject() { + return this.decodedResponse; + } + + private Method findMethod(Class cls, String methodName) { + Optional optMethod = Arrays.stream(cls.getDeclaredMethods()) + .filter(m -> m.getName().equalsIgnoreCase(methodName)) + .findFirst(); + if (optMethod.isPresent()) { + return optMethod.get(); + } else { + throw new RuntimeException("Method with name '" + methodName + "' not found."); + } + } + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheLambdaMetaFactory.java b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheLambdaMetaFactory.java new file mode 100644 index 000000000000..38b8aaa08b8c --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsCacheLambdaMetaFactory.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.implementation; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.implementation.serializer.HttpResponseDecoder; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +import java.lang.invoke.LambdaMetafactory; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.lang.reflect.Constructor; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * A concurrent cache of {@link Response} constructors. + */ +final class ResponseConstructorsCacheLambdaMetaFactory { + private final ClientLogger logger = new ClientLogger(ResponseConstructorsCache.class); + private final Map, ResponseConstructor> cache = new ConcurrentHashMap<>(); + private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); + + /** + * Identify the suitable constructor for the given response class. + * + * @param responseClass the response class + * @return identified constructor, null if there is no match + */ + ResponseConstructor get(Class> responseClass) { + return this.cache.computeIfAbsent(responseClass, this::locateResponseConstructor); + } + + /** + * Identify the most specific constructor for the given response class. + * + * The most specific constructor is looked up following order: + * 1. (httpRequest, statusCode, headers, body, decodedHeaders) + * 2. (httpRequest, statusCode, headers, body) + * 3. (httpRequest, statusCode, headers) + * + * Developer Note: This method logic can be easily replaced with Java.Stream + * and associated operators but we're using basic sort and loop constructs + * here as this method is in hot path and Stream route is consuming a fair + * amount of resources. + * + * @param responseClass the response class + * @return identified constructor, null if there is no match + */ + private ResponseConstructor locateResponseConstructor(Class responseClass) { + Constructor[] constructors = responseClass.getDeclaredConstructors(); + // Sort constructors in the "descending order" of parameter count. + Arrays.sort(constructors, Comparator.comparing(Constructor::getParameterCount, (a, b) -> b - a)); + for (Constructor constructor : constructors) { + final int paramCount = constructor.getParameterCount(); + if (paramCount >= 3 && paramCount <= 5) { + try { + if (paramCount == 3) { + MethodHandle ctrMethodHandle = LOOKUP.unreflectConstructor(constructor); + return new ResponseConstructor(3, LambdaMetafactory.metafactory(LOOKUP, + "apply", + ResponseFunc3.METHOD_TYPE, + ResponseFunc3.SIGNATURE, + ctrMethodHandle, + ctrMethodHandle.type()).getTarget().invoke()); + } else if (paramCount == 4) { + MethodHandle ctrMethodHandle = LOOKUP.unreflectConstructor(constructor); + return new ResponseConstructor(4, LambdaMetafactory.metafactory(LOOKUP, + "apply", + ResponseFunc4.METHOD_TYPE, + ResponseFunc4.SIGNATURE, + ctrMethodHandle, + ctrMethodHandle.type()).getTarget().invoke()); + } else { + // paramCount == 5 + MethodHandle ctrMethodHandle = LOOKUP.unreflectConstructor(constructor); + return new ResponseConstructor(5, LambdaMetafactory.metafactory(LOOKUP, + "apply", + ResponseFunc5.METHOD_TYPE, + ResponseFunc5.SIGNATURE, + ctrMethodHandle, + ctrMethodHandle.type()) + .getTarget().invoke()); + } + } catch (Throwable t) { + throw logger.logExceptionAsError(new RuntimeException(t)); + } + } + } + return null; + } + + /** + * Type that represent a {@link Response} constructor and can be used to invoke + * the same constructor. + */ + static final class ResponseConstructor { + private final int parameterCount; + private final Object responseFunc; + + /** + * Creates ResponseConstructor. + * + * @param parameterCount the constructor parameter count + * @param responseFunc the functional interface which delegate its abstract method + * invocation to the invocation of a {@link Response} constructor + */ + private ResponseConstructor(int parameterCount, Object responseFunc) { + this.parameterCount = parameterCount; + this.responseFunc = responseFunc; + } + + /** + * Invoke the {@link Response} constructor this type represents. + * + * @param decodedResponse the decoded http response + * @param bodyAsObject the http response content + * @return an instance of a {@link Response} implementation + */ + @SuppressWarnings("unchecked") + Mono> invoke(final HttpResponseDecoder.HttpDecodedResponse decodedResponse, + final Object bodyAsObject) { + final HttpResponse httpResponse = decodedResponse.getSourceResponse(); + final HttpRequest httpRequest = httpResponse.getRequest(); + final int responseStatusCode = httpResponse.getStatusCode(); + final HttpHeaders responseHeaders = httpResponse.getHeaders(); + switch (this.parameterCount) { + case 3: + try { + return Mono.just((Response) ((ResponseFunc3) this.responseFunc).apply(httpRequest, + responseStatusCode, + responseHeaders)); + } catch (Throwable t) { + throw Exceptions.propagate(t); + } + case 4: + try { + return Mono.just((Response) ((ResponseFunc4) this.responseFunc).apply(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject)); + } catch (Throwable t) { + throw Exceptions.propagate(t); + } + case 5: + return decodedResponse.getDecodedHeaders() + .map((Function>) decodedHeaders -> { + try { + return (Response) ((ResponseFunc5) this.responseFunc).apply(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + decodedHeaders); + } catch (Throwable t) { + throw Exceptions.propagate(t); + } + }) + .switchIfEmpty(Mono.defer((Supplier>>) () -> { + try { + return Mono.just((Response) ((ResponseFunc5) this.responseFunc) + .apply(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + null)); + } catch (Throwable t) { + throw Exceptions.propagate(t); + } + })); + default: + return Mono.error(new IllegalStateException( + "Response constructor with expected parameters not found.")); + } + } + } + + @FunctionalInterface + private interface ResponseFunc3 { + MethodType SIGNATURE = MethodType.methodType(Object.class, + HttpRequest.class, + int.class, + HttpHeaders.class); + MethodType METHOD_TYPE = MethodType.methodType(ResponseFunc3.class); + + Object apply(HttpRequest httpRequest, + int responseStatusCode, + HttpHeaders responseHeaders); + } + + @FunctionalInterface + private interface ResponseFunc4 { + MethodType SIGNATURE = MethodType.methodType(Object.class, + HttpRequest.class, + int.class, + HttpHeaders.class, + Object.class); + MethodType METHOD_TYPE = MethodType.methodType(ResponseFunc4.class); + + Object apply(HttpRequest httpRequest, + int responseStatusCode, + HttpHeaders responseHeaders, + Object body); + } + + @FunctionalInterface + private interface ResponseFunc5 { + MethodType SIGNATURE = MethodType.methodType(Object.class, + HttpRequest.class, + int.class, + HttpHeaders.class, + Object.class, + Object.class); + MethodType METHOD_TYPE = MethodType.methodType(ResponseFunc5.class); + + Object apply(HttpRequest httpRequest, + int responseStatusCode, + HttpHeaders responseHeaders, + Object body, + Object decodedHeaders); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsNoCacheReflection.java b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsNoCacheReflection.java new file mode 100644 index 000000000000..b220dce894a6 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/implementation/ResponseConstructorsNoCacheReflection.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.implementation; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.implementation.serializer.HttpResponseDecoder; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Comparator; +import java.util.function.Function; +import java.util.function.Supplier; + +class ResponseConstructorsNoCacheReflection { + private final ClientLogger logger = new ClientLogger(ResponseConstructorsCacheLambdaMetaFactory.class); + + Constructor> get(Class> responseClass) { + return locateResponseConstructor(responseClass); + } + + @SuppressWarnings("unchecked") + private Constructor> locateResponseConstructor(Class responseClass) { + Constructor[] constructors = responseClass.getDeclaredConstructors(); + // Sort constructors in the "descending order" of parameter count. + Arrays.sort(constructors, Comparator.comparing(Constructor::getParameterCount, (a, b) -> b - a)); + for (Constructor constructor : constructors) { + final int paramCount = constructor.getParameterCount(); + if (paramCount >= 3 && paramCount <= 5) { + try { + return (Constructor>) constructor; + } catch (Throwable t) { + throw logger.logExceptionAsError(new RuntimeException(t)); + } + } + } + return null; + } + + Mono> invoke(final Constructor> constructor, + final HttpResponseDecoder.HttpDecodedResponse decodedResponse, + final Object bodyAsObject) { + final HttpResponse httpResponse = decodedResponse.getSourceResponse(); + final HttpRequest httpRequest = httpResponse.getRequest(); + final int responseStatusCode = httpResponse.getStatusCode(); + final HttpHeaders responseHeaders = httpResponse.getHeaders(); + + final int paramCount = constructor.getParameterCount(); + switch (paramCount) { + case 3: + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw Exceptions.propagate(e); + } + case 4: + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw Exceptions.propagate(e); + } + case 5: + return decodedResponse.getDecodedHeaders() + .map((Function>) decodedHeaders -> { + try { + return constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + decodedHeaders); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw Exceptions.propagate(e); + } + }) + .switchIfEmpty(Mono.defer((Supplier>>) () -> { + try { + return Mono.just(constructor.newInstance(httpRequest, + responseStatusCode, + responseHeaders, + bodyAsObject, + null)); + } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { + throw Exceptions.propagate(e); + } + })); + default: + throw logger.logExceptionAsError( + new IllegalStateException("Response constructor with expected parameters not found.")); + } + } +} diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index 547a9310cb67..89bf6245e73c 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -50,9 +50,6 @@ stages: - name: azure-core-http-okhttp safeName: azurecorehttpokhttp stagingProfileId: 88192f04117501 - - name: azure-core-management - safeName: azurecoremanagement - stagingProfileId: 88192f04117501 - name: azure-core-test safeName: azurecoretest stagingProfileId: 88192f04117501 diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/README.md b/sdk/cosmos/azure-cosmos-benchmark/README.md similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/README.md rename to sdk/cosmos/azure-cosmos-benchmark/README.md diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml rename to sdk/cosmos/azure-cosmos-benchmark/pom.xml index d0f8d64edec5..95170e7e02d8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -6,14 +6,14 @@ Licensed under the MIT License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.microsoft.azure + com.azure azure-cosmos-parent - 3.3.0 + 4.0.0-preview.4 - com.microsoft.azure + com.azure azure-cosmos-benchmark - 3.3.0 + 4.0.0-preview.4 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Benchmarking tool This package contains Benchmarking tool for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -31,9 +31,9 @@ Licensed under the MIT License. - com.microsoft.azure + com.azure azure-cosmos - 3.3.0 + 4.0.0-preview.4 diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java index cc654b35fb7b..d88010c30e94 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java @@ -66,9 +66,9 @@ abstract class AsyncBenchmark { logger = LoggerFactory.getLogger(this.getClass()); Database database = DocDBUtils.getDatabase(client, cfg.getDatabaseId()); - collection = DocDBUtils.getCollection(client, database.selfLink(), cfg.getCollectionId()); - nameCollectionLink = String.format("dbs/%s/colls/%s", database.id(), collection.id()); - partitionKey = collection.getPartitionKey().paths().iterator().next().split("/")[1]; + collection = DocDBUtils.getCollection(client, database.getSelfLink(), cfg.getCollectionId()); + nameCollectionLink = String.format("dbs/%s/colls/%s", database.getId(), collection.getId()); + partitionKey = collection.getPartitionKey().getPaths().iterator().next().split("/")[1]; concurrencyControlSemaphore = new Semaphore(cfg.getConcurrency()); configuration = cfg; @@ -81,14 +81,14 @@ abstract class AsyncBenchmark { for (int i = 0; i < cfg.getNumberOfPreCreatedDocuments(); i++) { String uuid = UUID.randomUUID().toString(); Document newDoc = new Document(); - newDoc.id(uuid); + newDoc.setId(uuid); BridgeInternal.setProperty(newDoc, partitionKey, uuid); BridgeInternal.setProperty(newDoc, "dataField1", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField2", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField3", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField4", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField5", dataFieldValue); - Flux obs = client.createDocument(collection.selfLink(), newDoc, null, false) + Flux obs = client.createDocument(collection.getSelfLink(), newDoc, null, false) .map(ResourceResponse::getResource); createDocumentObservables.add(obs); } @@ -146,15 +146,15 @@ protected String getCollectionLink() { if (configuration.isUseNameLink()) { return this.nameCollectionLink; } else { - return collection.selfLink(); + return collection.getSelfLink(); } } protected String getDocumentLink(Document doc) { if (configuration.isUseNameLink()) { - return this.nameCollectionLink + "/docs/" + doc.id(); + return this.nameCollectionLink + "/docs/" + doc.getId(); } else { - return doc.selfLink(); + return doc.getSelfLink(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java index bce63c558558..67a8eade046b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncMixedBenchmark.java @@ -37,7 +37,7 @@ protected void performWorkload(BaseSubscriber documentBaseSubscriber, String idString = uuid + i; Document newDoc = new Document(); - newDoc.id(idString); + newDoc.setId(idString); BridgeInternal.setProperty(newDoc, partitionKey, idString); BridgeInternal.setProperty(newDoc, "dataField1", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField2", dataFieldValue); @@ -50,17 +50,17 @@ protected void performWorkload(BaseSubscriber documentBaseSubscriber, FeedOptions options = new FeedOptions(); options.maxItemCount(10); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select top 100 * from c order by c._ts"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options) - .map(frp -> frp.results().get(0)); + .map(frp -> frp.getResults().get(0)); } else { int index = r.nextInt(1000); RequestOptions options = new RequestOptions(); - options.setPartitionKey(new PartitionKey(docsToRead.get(index).id())); + options.setPartitionKey(new PartitionKey(docsToRead.get(index).getId())); obs = client.readDocument(getDocumentLink(docsToRead.get(index)), options).map(ResourceResponse::getResource); } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java index ecb875087261..c4516f88c904 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java @@ -42,8 +42,8 @@ protected void performWorkload(BaseSubscriber> baseSubscr if (configuration.getOperationType() == Configuration.Operation.QueryCross) { int index = r.nextInt(1000); - options.enableCrossPartitionQuery(true); - String sqlQuery = "Select * from c where c._rid = \"" + docsToRead.get(index).resourceId() + "\""; + options.setEnableCrossPartitionQuery(true); + String sqlQuery = "Select * from c where c._rid = \"" + docsToRead.get(index).getResourceId() + "\""; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else if (configuration.getOperationType() == Configuration.Operation.QuerySingle) { @@ -55,29 +55,29 @@ protected void performWorkload(BaseSubscriber> baseSubscr } else if (configuration.getOperationType() == Configuration.Operation.QueryParallel) { options.maxItemCount(10); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select * from c"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else if (configuration.getOperationType() == Configuration.Operation.QueryOrderby) { options.maxItemCount(10); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select * from c order by c._ts"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else if (configuration.getOperationType() == Configuration.Operation.QueryAggregate) { options.maxItemCount(10); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select value max(c._ts) from c"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else if (configuration.getOperationType() == Configuration.Operation.QueryAggregateTopOrderby) { - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select top 1 value count(c) from c order by c._ts"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else if (configuration.getOperationType() == Configuration.Operation.QueryTopOrderby) { - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); String sqlQuery = "Select top 1000 * from c order by c._ts"; obs = client.queryDocuments(getCollectionLink(), sqlQuery, options); } else { diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQuerySinglePartitionMultiple.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQuerySinglePartitionMultiple.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQuerySinglePartitionMultiple.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQuerySinglePartitionMultiple.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java index bcb10266abcf..06e1287e91e1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncReadBenchmark.java @@ -54,7 +54,7 @@ protected void hookOnError(Throwable throwable) { protected void performWorkload(BaseSubscriber> baseSubscriber, long i) throws InterruptedException { int index = (int) (i % docsToRead.size()); RequestOptions options = new RequestOptions(); - options.setPartitionKey(new PartitionKey(docsToRead.get(index).id())); + options.setPartitionKey(new PartitionKey(docsToRead.get(index).getId())); Flux> obs = client.readDocument(getDocumentLink(docsToRead.get(index)), options); diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java index 3cd19ccb7623..79409b2a46f4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncWriteBenchmark.java @@ -62,7 +62,7 @@ protected void performWorkload(BaseSubscriber> baseSu String idString = uuid + i; Document newDoc = new Document(); - newDoc.id(idString); + newDoc.setId(idString); BridgeInternal.setProperty(newDoc, partitionKey, idString); BridgeInternal.setProperty(newDoc, "dataField1", dataFieldValue); BridgeInternal.setProperty(newDoc, "dataField2", dataFieldValue); diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java index 1ab63af0d5cf..4c609aed9c6a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Configuration.java @@ -220,8 +220,8 @@ int getDocumentDataFieldSize() { ConnectionPolicy getConnectionPolicy() { ConnectionPolicy policy = new ConnectionPolicy(); - policy.connectionMode(connectionMode); - policy.maxPoolSize(maxConnectionPoolSize); + policy.setConnectionMode(connectionMode); + policy.setMaxPoolSize(maxConnectionPoolSize); return policy; } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java index a2304938a446..f6d51980a8df 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/DocDBUtils.java @@ -22,10 +22,10 @@ static Database getDatabase(AsyncDocumentClient client, String databaseId) { new SqlParameterList(new SqlParameter("@id", databaseId))), null) .single().block(); - if (feedResponsePages.results().isEmpty()) { + if (feedResponsePages.getResults().isEmpty()) { throw new RuntimeException("cannot find datatbase " + databaseId); } - return feedResponsePages.results().get(0); + return feedResponsePages.getResults().get(0); } static DocumentCollection getCollection(AsyncDocumentClient client, String databaseLink, @@ -37,9 +37,9 @@ static DocumentCollection getCollection(AsyncDocumentClient client, String datab null) .single().block(); - if (feedResponsePages.results().isEmpty()) { + if (feedResponsePages.getResults().isEmpty()) { throw new RuntimeException("cannot find collection " + collectionId); } - return feedResponsePages.results().get(0); + return feedResponsePages.getResults().get(0); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java rename to sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java index ee85ba33a4d4..1c7a7a570dc9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java @@ -158,7 +158,7 @@ private Flux writeDocument(Integer i) { String idString = Utils.randomUUID().toString(); String randomVal = Utils.randomUUID().toString(); Document document = new Document(); - document.id(idString); + document.setId(idString); BridgeInternal.setProperty(document, partitionKey, idString); BridgeInternal.setProperty(document, QUERY_FIELD_NAME, randomVal); BridgeInternal.setProperty(document, "dataField1", randomVal); @@ -217,11 +217,11 @@ private SqlQuerySpec generateRandomQuery() { */ private Flux xPartitionQuery(SqlQuerySpec query) { FeedOptions options = new FeedOptions(); - options.maxDegreeOfParallelism(-1); - options.enableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(-1); + options.setEnableCrossPartitionQuery(true); return client.queryDocuments(getCollectionLink(), query, options) - .flatMap(p -> Flux.fromIterable(p.results())); + .flatMap(p -> Flux.fromIterable(p.getResults())); } /** @@ -239,7 +239,7 @@ private Flux singlePartitionQuery(Document d) { QUERY_FIELD_NAME, d.getString(QUERY_FIELD_NAME))); return client.queryDocuments(getCollectionLink(), sqlQuerySpec, options) - .flatMap(p -> Flux.fromIterable(p.results())); + .flatMap(p -> Flux.fromIterable(p.getResults())); } /** @@ -348,7 +348,7 @@ static InWhereClause asInWhereClause(String fieldName, List documentLi StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(fieldName); stringBuilder.append(" IN ("); - List params = parameters.stream().map(SqlParameter::name).collect(Collectors.toList()); + List params = parameters.stream().map(SqlParameter::getName).collect(Collectors.toList()); stringBuilder.append(String.join(", ", params)); stringBuilder.append(")"); diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties b/sdk/cosmos/azure-cosmos-benchmark/src/main/resources/log4j.properties similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties rename to sdk/cosmos/azure-cosmos-benchmark/src/main/resources/log4j.properties diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java rename to sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java index 556d58405d18..b237158df609 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/QueryBuilderTest.java @@ -14,7 +14,7 @@ public class QueryBuilderTest { @Test(groups = {"unit"}) public void basic() { ReadMyWriteWorkflow.QueryBuilder queryBuilder = new ReadMyWriteWorkflow.QueryBuilder(); - assertThat(queryBuilder.toSqlQuerySpec().queryText()) + assertThat(queryBuilder.toSqlQuerySpec().getQueryText()) .isEqualTo("SELECT * FROM root"); } @@ -22,7 +22,7 @@ public void basic() { public void top() { ReadMyWriteWorkflow.QueryBuilder queryBuilder = new ReadMyWriteWorkflow.QueryBuilder(); queryBuilder.top(50); - assertThat(queryBuilder.toSqlQuerySpec().queryText()) + assertThat(queryBuilder.toSqlQuerySpec().getQueryText()) .isEqualTo("SELECT TOP 50 * FROM root"); } @@ -30,7 +30,7 @@ public void top() { public void orderBy() { ReadMyWriteWorkflow.QueryBuilder queryBuilder = new ReadMyWriteWorkflow.QueryBuilder(); queryBuilder.orderBy("prop"); - assertThat(queryBuilder.toSqlQuerySpec().queryText()) + assertThat(queryBuilder.toSqlQuerySpec().getQueryText()) .isEqualTo("SELECT * FROM root ORDER BY root.prop"); } @@ -42,9 +42,9 @@ public void whereInClause() { new SqlParameter("@param2", 2)); queryBuilder.whereClause(new ReadMyWriteWorkflow.QueryBuilder.WhereClause.InWhereClause("colName", parameters)); - assertThat(queryBuilder.toSqlQuerySpec().queryText()) + assertThat(queryBuilder.toSqlQuerySpec().getQueryText()) .isEqualTo("SELECT * FROM root WHERE root.colName IN (@param1, @param2)"); - assertThat(queryBuilder.toSqlQuerySpec().parameters()).containsExactlyElementsOf(parameters); + assertThat(queryBuilder.toSqlQuerySpec().getParameters()).containsExactlyElementsOf(parameters); } @Test(groups = {"unit"}) @@ -57,8 +57,8 @@ public void topOrderByWhereClause() { new SqlParameter("@param2", 2)); queryBuilder.whereClause(new ReadMyWriteWorkflow.QueryBuilder.WhereClause.InWhereClause("colName", parameters)); - assertThat(queryBuilder.toSqlQuerySpec().queryText()) + assertThat(queryBuilder.toSqlQuerySpec().getQueryText()) .isEqualTo("SELECT TOP 5 * FROM root WHERE root.colName IN (@param1, @param2) ORDER BY root.prop"); - assertThat(queryBuilder.toSqlQuerySpec().parameters()).containsExactlyElementsOf(parameters); + assertThat(queryBuilder.toSqlQuerySpec().getParameters()).containsExactlyElementsOf(parameters); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java rename to sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java index 4cc7b35e01b0..a782fe85d7e7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/ReadMyWritesConsistencyTest.java @@ -14,7 +14,6 @@ import com.azure.data.cosmos.internal.DocumentCollection; import com.azure.data.cosmos.internal.RequestOptions; import com.azure.data.cosmos.internal.TestConfigurations; -import com.azure.data.cosmos.internal.directconnectivity.Protocol; import com.beust.jcommander.JCommander; import com.google.common.base.CaseFormat; import com.google.common.base.Strings; @@ -81,7 +80,7 @@ public void beforeClass() { options.setOfferThroughput(initialCollectionThroughput); AsyncDocumentClient housekeepingClient = Utils.housekeepingClient(); database = Utils.createDatabaseForTest(housekeepingClient); - collection = housekeepingClient.createCollection("dbs/" + database.id(), + collection = housekeepingClient.createCollection("dbs/" + database.getId(), getCollectionDefinitionWithRangeRangeIndex(), options).single().block().getResource(); housekeepingClient.close(); @@ -117,8 +116,8 @@ public void readMyWrites(boolean useNameLink) throws Exception { String cmd = Strings.lenientFormat(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, desiredConsistency), concurrency, numberOfOperationsAsString, @@ -163,26 +162,26 @@ DocumentCollection getCollectionDefinitionWithRangeRangeIndex() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); BridgeInternal.setProperty(stringIndex, "precision", -1); indexes.add(stringIndex); Index numberIndex = Index.Range(DataType.NUMBER); - BridgeInternal.setProperty(numberIndex, "precision", -1); + BridgeInternal.setProperty(numberIndex, "getPrecision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); DocumentCollection collectionDefinition = new DocumentCollection(); collectionDefinition.setIndexingPolicy(indexingPolicy); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; @@ -196,8 +195,8 @@ private void scheduleScaleUp(int delayStartInSeconds, int newThroughput) { // for bulk insert and later queries. return housekeepingClient.queryOffers( String.format("SELECT * FROM r WHERE r.offerResourceId = '%s'", - collection.resourceId()) - , null).flatMap(page -> Flux.fromIterable(page.results())) + collection.getResourceId()) + , null).flatMap(page -> Flux.fromIterable(page.getResults())) .take(1).flatMap(offer -> { logger.info("going to scale up collection, newThroughput {}", newThroughput); offer.setThroughput(newThroughput); diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java rename to sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java index 486e0003fa03..dca4e5770eaa 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/Utils.java @@ -19,9 +19,9 @@ public class Utils { public static AsyncDocumentClient housekeepingClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); RetryOptions options = new RetryOptions(); - options.maxRetryAttemptsOnThrottledRequests(100); - options.maxRetryWaitTimeInSeconds(60); - connectionPolicy.retryOptions(options); + options.setMaxRetryAttemptsOnThrottledRequests(100); + options.setMaxRetryWaitTimeInSeconds(60); + connectionPolicy.setRetryOptions(options); return new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -29,7 +29,7 @@ public static AsyncDocumentClient housekeepingClient() { } public static String getCollectionLink(Database db, DocumentCollection collection) { - return "dbs/" + db.id() + "/colls/" + collection; + return "dbs/" + db.getId() + "/colls/" + collection; } public static Database createDatabaseForTest(AsyncDocumentClient client) { @@ -44,7 +44,7 @@ public static void safeCleanDatabases(AsyncDocumentClient client) { public static void safeClean(AsyncDocumentClient client, Database database) { if (database != null) { - safeClean(client, database.id()); + safeClean(client, database.getId()); } } @@ -96,4 +96,4 @@ public Flux> deleteDatabase(String id) { return client.deleteDatabase("dbs/" + id, null); } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java rename to sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java index 322ba57d7d15..42a02f312963 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/data/cosmos/benchmark/WorkflowTest.java @@ -44,8 +44,8 @@ public void readMyWritesCLI() throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id()); + database.getId(), + collection.getId()); Main.main(StringUtils.split(cmd)); } @@ -60,8 +60,8 @@ public void readMyWrites(boolean useNameLink) throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), numberOfOperations) + (useNameLink ? " -useNameLink" : ""); @@ -100,8 +100,8 @@ public void writeLatencyCLI() throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id()); + database.getId(), + collection.getId()); Main.main(StringUtils.split(cmd)); } @@ -116,8 +116,8 @@ public void writeLatency(boolean useNameLink) throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), numberOfOperations) + (useNameLink ? " -useNameLink" : ""); @@ -157,8 +157,8 @@ public void writeThroughput(boolean useNameLink) throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), numberOfOperations) + (useNameLink ? " -useNameLink" : ""); @@ -198,8 +198,8 @@ public void readLatency(boolean useNameLink) throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), numberOfOperations) + (useNameLink ? " -useNameLink" : ""); @@ -239,8 +239,8 @@ public void readThroughput(boolean useNameLink) throws Exception { String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, - database.id(), - collection.id(), + database.getId(), + collection.getId(), numberOfOperations) + (useNameLink ? " -useNameLink" : ""); @@ -275,7 +275,7 @@ public void beforeClass() { options.setOfferThroughput(10000); AsyncDocumentClient housekeepingClient = Utils.housekeepingClient(); database = Utils.createDatabaseForTest(housekeepingClient); - collection = housekeepingClient.createCollection("dbs/"+ database.id(), + collection = housekeepingClient.createCollection("dbs/"+ database.getId(), getCollectionDefinitionWithRangeRangeIndex(), options) .single().block().getResource(); @@ -303,11 +303,11 @@ DocumentCollection getCollectionDefinitionWithRangeRangeIndex() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); BridgeInternal.setProperty(stringIndex, "precision", -1); @@ -316,15 +316,15 @@ DocumentCollection getCollectionDefinitionWithRangeRangeIndex() { Index numberIndex = Index.Range(DataType.NUMBER); BridgeInternal.setProperty(numberIndex, "precision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); DocumentCollection collectionDefinition = new DocumentCollection(); collectionDefinition.setIndexingPolicy(indexingPolicy); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml b/sdk/cosmos/azure-cosmos-examples/pom.xml similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml rename to sdk/cosmos/azure-cosmos-examples/pom.xml index 31fc7f1ab690..f3b04de8f961 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml +++ b/sdk/cosmos/azure-cosmos-examples/pom.xml @@ -6,14 +6,14 @@ Licensed under the MIT License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.microsoft.azure + com.azure azure-cosmos-parent - 3.3.0 + 4.0.0-preview.4 - com.microsoft.azure + com.azure azure-cosmos-examples - 3.3.0 + 4.0.0-preview.4 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Examples This package contains examples for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -87,9 +87,9 @@ Licensed under the MIT License.
- com.microsoft.azure + com.azure azure-cosmos - 3.3.0 + 4.0.0-preview.4 diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/AccountSettings.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/AccountSettings.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/AccountSettings.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/AccountSettings.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java similarity index 76% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java index 50b9c4dde9bb..59caf9d44f45 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/BasicDemo.java @@ -2,14 +2,14 @@ // Licensed under the MIT License. package com.azure.data.cosmos.examples; -import com.azure.data.cosmos.CosmosClient; +import com.azure.data.cosmos.CosmosAsyncClient; +import com.azure.data.cosmos.CosmosAsyncContainer; +import com.azure.data.cosmos.CosmosAsyncDatabase; +import com.azure.data.cosmos.CosmosAsyncItem; +import com.azure.data.cosmos.CosmosAsyncItemResponse; import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItem; import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemResponse; import com.azure.data.cosmos.FeedOptions; import com.azure.data.cosmos.FeedResponse; import reactor.core.publisher.Flux; @@ -21,9 +21,9 @@ public class BasicDemo { private static final String DATABASE_NAME = "test_db"; private static final String CONTAINER_NAME = "test_container"; - private CosmosClient client; - private CosmosDatabase database; - private CosmosContainer container; + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; public static void main(String[] args) { BasicDemo demo = new BasicDemo(); @@ -32,10 +32,10 @@ public static void main(String[] args) { private void start(){ // Get client - client = CosmosClient.builder() - .endpoint(AccountSettings.HOST) - .key(AccountSettings.MASTER_KEY) - .build(); + client = CosmosAsyncClient.builder() + .setEndpoint(AccountSettings.HOST) + .setKey(AccountSettings.MASTER_KEY) + .buildAsyncClient(); //CREATE a database and a container createDbAndContainerBlocking(); @@ -43,14 +43,14 @@ private void start(){ //Get a proxy reference to container container = client.getDatabase(DATABASE_NAME).getContainer(CONTAINER_NAME); - CosmosContainer container = client.getDatabase(DATABASE_NAME).getContainer(CONTAINER_NAME); + CosmosAsyncContainer container = client.getDatabase(DATABASE_NAME).getContainer(CONTAINER_NAME); TestObject testObject = new TestObject("item_new_id_1", "test", "test description", "US"); TestObject testObject2 = new TestObject("item_new_id_2", "test2", "test description2", "CA"); //CREATE an Item async - Mono itemResponseMono = container.createItem(testObject); + Mono itemResponseMono = container.createItem(testObject); //CREATE another Item async - Mono itemResponseMono1 = container.createItem(testObject2); + Mono itemResponseMono1 = container.createItem(testObject2); //Wait for completion try { @@ -77,14 +77,14 @@ private void start(){ private void createAndReplaceItem() { TestObject replaceObject = new TestObject("item_new_id_3", "test3", "test description3", "JP"); - CosmosItem cosmosItem = null; + CosmosAsyncItem cosmosItem = null; //CREATE item sync try { cosmosItem = container.createItem(replaceObject) .doOnError(throwable -> log("CREATE 3", throwable)) .publishOn(Schedulers.elastic()) .block() - .item(); + .getItem(); }catch (RuntimeException e){ log("Couldn't create items due to above exceptions"); } @@ -98,9 +98,9 @@ private void createAndReplaceItem() { private void createDbAndContainerBlocking() { client.createDatabaseIfNotExists(DATABASE_NAME) - .doOnSuccess(cosmosDatabaseResponse -> log("Database: " + cosmosDatabaseResponse.database().id())) - .flatMap(dbResponse -> dbResponse.database().createContainerIfNotExists(new CosmosContainerProperties(CONTAINER_NAME, "/country"))) - .doOnSuccess(cosmosContainerResponse -> log("Container: " + cosmosContainerResponse.container().id())) + .doOnSuccess(cosmosDatabaseResponse -> log("Database: " + cosmosDatabaseResponse.getDatabase().getId())) + .flatMap(dbResponse -> dbResponse.getDatabase().createContainerIfNotExists(new CosmosContainerProperties(CONTAINER_NAME, "/country"))) + .doOnSuccess(cosmosContainerResponse -> log("Container: " + cosmosContainerResponse.getContainer().getId())) .doOnError(throwable -> log(throwable.getMessage())) .publishOn(Schedulers.elastic()) .block(); @@ -111,8 +111,8 @@ private void queryItems(){ log("+ Querying the collection "); String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + options.setEnableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(2); Flux> queryFlux = container.queryItems(query, options); queryFlux.publishOn(Schedulers.elastic()).subscribe(cosmosItemFeedResponse -> {}, @@ -123,7 +123,7 @@ private void queryItems(){ .toIterable() .forEach(cosmosItemFeedResponse -> { - log(cosmosItemFeedResponse.results()); + log(cosmosItemFeedResponse.getResults()); }); } @@ -132,7 +132,7 @@ private void queryWithContinuationToken(){ log("+ Query with paging using continuation token"); String query = "SELECT * from root r "; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(true); options.maxItemCount(1); String continuation = null; @@ -141,8 +141,8 @@ private void queryWithContinuationToken(){ Flux> queryFlux = container.queryItems(query, options); FeedResponse page = queryFlux.blockFirst(); assert page != null; - log(page.results()); - continuation = page.continuationToken(); + log(page.getResults()); + continuation = page.getContinuationToken(); }while(continuation!= null); } @@ -152,10 +152,12 @@ private void log(Object object) { } private void log(String msg, Throwable throwable){ - log(msg + ": " + ((CosmosClientException)throwable).statusCode()); + if (throwable instanceof CosmosClientException) { + log(msg + ": " + ((CosmosClientException) throwable).getStatusCode()); + } } - class TestObject { + static class TestObject { String id; String name; String description; @@ -200,4 +202,4 @@ public void setDescription(String description) { this.description = description; } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java similarity index 68% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java index e7e7067b186d..be85d69cb193 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleChangeFeedProcessor.java @@ -2,18 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.examples.ChangeFeed; -import com.azure.data.cosmos.ChangeFeedProcessor; -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.SerializationFormattingPolicy; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.apache.commons.lang3.RandomStringUtils; import java.time.Duration; @@ -37,16 +27,16 @@ public static void main (String[]args) { try { System.out.println("-->CREATE DocumentClient"); - CosmosClient client = getCosmosClient(); + CosmosAsyncClient client = getCosmosClient(); System.out.println("-->CREATE sample's database: " + DATABASE_NAME); - CosmosDatabase cosmosDatabase = createNewDatabase(client, DATABASE_NAME); + CosmosAsyncDatabase cosmosDatabase = createNewDatabase(client, DATABASE_NAME); System.out.println("-->CREATE container for documents: " + COLLECTION_NAME); - CosmosContainer feedContainer = createNewCollection(client, DATABASE_NAME, COLLECTION_NAME); + CosmosAsyncContainer feedContainer = createNewCollection(client, DATABASE_NAME, COLLECTION_NAME); System.out.println("-->CREATE container for lease: " + COLLECTION_NAME + "-leases"); - CosmosContainer leaseContainer = createNewLeaseCollection(client, DATABASE_NAME, COLLECTION_NAME + "-leases"); + CosmosAsyncContainer leaseContainer = createNewLeaseCollection(client, DATABASE_NAME, COLLECTION_NAME + "-leases"); changeFeedProcessorInstance = getChangeFeedProcessor("SampleHost_1", feedContainer, leaseContainer); @@ -82,13 +72,13 @@ public static void main (String[]args) { System.exit(0); } - public static ChangeFeedProcessor getChangeFeedProcessor(String hostName, CosmosContainer feedContainer, CosmosContainer leaseContainer) { + public static ChangeFeedProcessor getChangeFeedProcessor(String hostName, CosmosAsyncContainer feedContainer, CosmosAsyncContainer leaseContainer) { return ChangeFeedProcessor.Builder() - .hostName(hostName) - .feedContainer(feedContainer) - .leaseContainer(leaseContainer) - .handleChanges(docs -> { - System.out.println("--->handleChanges() START"); + .setHostName(hostName) + .setFeedContainer(feedContainer) + .setLeaseContainer(leaseContainer) + .setHandleChanges(docs -> { + System.out.println("--->setHandleChanges() START"); for (CosmosItemProperties document : docs) { System.out.println("---->DOCUMENT RECEIVED: " + document.toJson(SerializationFormattingPolicy.INDENTED)); @@ -99,28 +89,28 @@ public static ChangeFeedProcessor getChangeFeedProcessor(String hostName, Cosmos .build(); } - public static CosmosClient getCosmosClient() { + public static CosmosAsyncClient getCosmosClient() { - return CosmosClient.builder() - .endpoint(SampleConfigurations.HOST) - .key(SampleConfigurations.MASTER_KEY) - .connectionPolicy(ConnectionPolicy.defaultPolicy()) - .consistencyLevel(ConsistencyLevel.EVENTUAL) - .build(); + return CosmosAsyncClient.builder() + .setEndpoint(SampleConfigurations.HOST) + .setKey(SampleConfigurations.MASTER_KEY) + .setConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) + .setConsistencyLevel(ConsistencyLevel.EVENTUAL) + .buildAsyncClient(); } - public static CosmosDatabase createNewDatabase(CosmosClient client, String databaseName) { - return client.createDatabaseIfNotExists(databaseName).block().database(); + public static CosmosAsyncDatabase createNewDatabase(CosmosAsyncClient client, String databaseName) { + return client.createDatabaseIfNotExists(databaseName).block().getDatabase(); } - public static void deleteDatabase(CosmosDatabase cosmosDatabase) { + public static void deleteDatabase(CosmosAsyncDatabase cosmosDatabase) { cosmosDatabase.delete().block(); } - public static CosmosContainer createNewCollection(CosmosClient client, String databaseName, String collectionName) { - CosmosDatabase databaseLink = client.getDatabase(databaseName); - CosmosContainer collectionLink = databaseLink.getContainer(collectionName); - CosmosContainerResponse containerResponse = null; + public static CosmosAsyncContainer createNewCollection(CosmosAsyncClient client, String databaseName, String collectionName) { + CosmosAsyncDatabase databaseLink = client.getDatabase(databaseName); + CosmosAsyncContainer collectionLink = databaseLink.getContainer(collectionName); + CosmosAsyncContainerResponse containerResponse = null; try { containerResponse = collectionLink.read().block(); @@ -132,7 +122,7 @@ public static CosmosContainer createNewCollection(CosmosClient client, String da if (ex.getCause() instanceof CosmosClientException) { CosmosClientException cosmosClientException = (CosmosClientException) ex.getCause(); - if (cosmosClientException.statusCode() != 404) { + if (cosmosClientException.getStatusCode() != 404) { throw ex; } } else { @@ -150,13 +140,13 @@ public static CosmosContainer createNewCollection(CosmosClient client, String da throw new RuntimeException(String.format("Failed to create collection %s in database %s.", collectionName, databaseName)); } - return containerResponse.container(); + return containerResponse.getContainer(); } - public static CosmosContainer createNewLeaseCollection(CosmosClient client, String databaseName, String leaseCollectionName) { - CosmosDatabase databaseLink = client.getDatabase(databaseName); - CosmosContainer leaseCollectionLink = databaseLink.getContainer(leaseCollectionName); - CosmosContainerResponse leaseContainerResponse = null; + public static CosmosAsyncContainer createNewLeaseCollection(CosmosAsyncClient client, String databaseName, String leaseCollectionName) { + CosmosAsyncDatabase databaseLink = client.getDatabase(databaseName); + CosmosAsyncContainer leaseCollectionLink = databaseLink.getContainer(leaseCollectionName); + CosmosAsyncContainerResponse leaseContainerResponse = null; try { leaseContainerResponse = leaseCollectionLink.read().block(); @@ -174,7 +164,7 @@ public static CosmosContainer createNewLeaseCollection(CosmosClient client, Stri if (ex.getCause() instanceof CosmosClientException) { CosmosClientException cosmosClientException = (CosmosClientException) ex.getCause(); - if (cosmosClientException.statusCode() != 404) { + if (cosmosClientException.getStatusCode() != 404) { throw ex; } } else { @@ -191,17 +181,17 @@ public static CosmosContainer createNewLeaseCollection(CosmosClient client, Stri throw new RuntimeException(String.format("Failed to create collection %s in database %s.", leaseCollectionName, databaseName)); } - return leaseContainerResponse.container(); + return leaseContainerResponse.getContainer(); } - public static void createNewDocuments(CosmosContainer containerClient, int count, Duration delay) { + public static void createNewDocuments(CosmosAsyncContainer containerClient, int count, Duration delay) { String suffix = RandomStringUtils.randomAlphabetic(10); for (int i = 0; i <= count; i++) { CosmosItemProperties document = new CosmosItemProperties(); - document.id(String.format("0%d-%s", i, suffix)); + document.setId(String.format("0%d-%s", i, suffix)); containerClient.createItem(document).subscribe(doc -> { - System.out.println("---->DOCUMENT WRITE: " + doc.properties().toJson(SerializationFormattingPolicy.INDENTED)); + System.out.println("---->DOCUMENT WRITE: " + doc.getProperties().toJson(SerializationFormattingPolicy.INDENTED)); }); long remainingWork = delay.toMillis(); diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleConfigurations.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleConfigurations.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleConfigurations.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/ChangeFeed/SampleConfigurations.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java similarity index 74% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java index 2f8af65fc63d..36b69713d784 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/examples/HelloWorldDemo.java @@ -13,43 +13,43 @@ public static void main(String[] args) { } void runDemo() { - // Create a new CosmosClient via the builder + // Create a new CosmosAsyncClient via the builder // It only requires endpoint and key, but other useful settings are available - CosmosClient client = CosmosClient.builder() - .endpoint("") - .key("") - .build(); + CosmosAsyncClient client = CosmosAsyncClient.builder() + .setEndpoint("") + .setKey("") + .buildAsyncClient(); // Get a reference to the container // This will create (or read) a database and its container. - CosmosContainer container = client.createDatabaseIfNotExists("contoso-travel") + CosmosAsyncContainer container = client.createDatabaseIfNotExists("contoso-travel") // TIP: Our APIs are Reactor Core based, so try to chain your calls - .flatMap(response -> response.database() + .flatMap(response -> response.getDatabase() .createContainerIfNotExists("passengers", "/id")) - .flatMap(response -> Mono.just(response.container())) + .flatMap(response -> Mono.just(response.getContainer())) .block(); // Blocking for demo purposes (avoid doing this in production unless you must) // Create an item container.createItem(new Passenger("carla.davis@outlook.com", "Carla Davis", "SEA", "IND")) .flatMap(response -> { - System.out.println("Created item: " + response.properties().toJson()); + System.out.println("Created item: " + response.getProperties().toJson()); // Read that item 👓 - return response.item().read(); + return response.getItem().read(); }) .flatMap(response -> { - System.out.println("Read item: " + response.properties().toJson()); + System.out.println("Read item: " + response.getProperties().toJson()); // Replace that item 🔁 try { - Passenger p = response.properties().getObject(Passenger.class); + Passenger p = response.getProperties().getObject(Passenger.class); p.setDestination("SFO"); - return response.item().replace(p); + return response.getItem().replace(p); } catch (IOException e) { System.err.println(e); return Mono.error(e); } }) // delete that item 💣 - .flatMap(response -> response.item().delete()) + .flatMap(response -> response.getItem().delete()) .block(); // Blocking for demo purposes (avoid doing this in production unless you must) } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/ConfigurationManager.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/ConfigurationManager.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/ConfigurationManager.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/ConfigurationManager.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java index fd64d2cf0a51..92f7f19ccc00 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/Helpers.java @@ -28,11 +28,11 @@ static public Mono createDatabaseIfNotExists(AsyncDocumentClient clien e -> { if (e instanceof CosmosClientException) { CosmosClientException dce = (CosmosClientException) e; - if (dce.statusCode() == 404) { + if (dce.getStatusCode() == 404) { // if doesn't exist create it Database d = new Database(); - d.id(databaseName); + d.setId(databaseName); return client.createDatabase(d, null); } @@ -49,11 +49,11 @@ static public Mono createCollectionIfNotExists(AsyncDocument e -> { if (e instanceof CosmosClientException) { CosmosClientException dce = (CosmosClientException) e; - if (dce.statusCode() == 404) { + if (dce.getStatusCode() == 404) { // if doesn't exist create it DocumentCollection collection = new DocumentCollection(); - collection.id(collectionName); + collection.setId(collectionName); return client.createCollection(createDatabaseUri(databaseName), collection, null); } @@ -65,12 +65,12 @@ static public Mono createCollectionIfNotExists(AsyncDocument } static public Mono createCollectionIfNotExists(AsyncDocumentClient client, String databaseName, DocumentCollection collection) { - return client.readCollection(createDocumentCollectionUri(databaseName, collection.id()), null) + return client.readCollection(createDocumentCollectionUri(databaseName, collection.getId()), null) .onErrorResume( e -> { if (e instanceof CosmosClientException) { CosmosClientException dce = (CosmosClientException) e; - if (dce.statusCode() == 404) { + if (dce.getStatusCode() == 404) { // if doesn't exist create it return client.createCollection(createDatabaseUri(databaseName), collection, null); diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java index b8dd4b83e84f..4615dc7e2f10 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/ConflictWorker.java @@ -83,7 +83,7 @@ private DocumentCollection createCollectionIfNotExists(AsyncDocumentClient creat private DocumentCollection getCollectionDefForManual(String id) { DocumentCollection collection = new DocumentCollection(); - collection.id(id); + collection.setId(id); ConflictResolutionPolicy policy = ConflictResolutionPolicy.createCustomPolicy(); collection.setConflictResolutionPolicy(policy); return collection; @@ -91,7 +91,7 @@ private DocumentCollection getCollectionDefForManual(String id) { private DocumentCollection getCollectionDefForLastWinWrites(String id, String conflictResolutionPath) { DocumentCollection collection = new DocumentCollection(); - collection.id(id); + collection.setId(id); ConflictResolutionPolicy policy = ConflictResolutionPolicy.createLastWriterWinsPolicy(conflictResolutionPath); collection.setConflictResolutionPolicy(policy); return collection; @@ -99,7 +99,7 @@ private DocumentCollection getCollectionDefForLastWinWrites(String id, String co private DocumentCollection getCollectionDefForCustom(String id, String storedProc) { DocumentCollection collection = new DocumentCollection(); - collection.id(id); + collection.setId(id); ConflictResolutionPolicy policy = ConflictResolutionPolicy.createCustomPolicy(storedProc); collection.setConflictResolutionPolicy(policy); return collection; @@ -123,7 +123,7 @@ public void initialize() throws Exception { String.format("dbs/%s/colls/%s/sprocs/%s", this.databaseName, this.udpCollectionName, "resolver"))); StoredProcedure lwwSproc = new StoredProcedure(); - lwwSproc.id("resolver"); + lwwSproc.setId("resolver"); lwwSproc.setBody(IOUtils.toString( getClass().getClassLoader().getResourceAsStream("resolver-storedproc.txt"), "UTF-8")); @@ -177,7 +177,7 @@ public void runInsertConflictOnManual() throws Exception { ArrayList> insertTask = new ArrayList<>(); Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); int index = 0; for (AsyncDocumentClient client : this.clients) { @@ -202,7 +202,7 @@ public void runInsertConflictOnManual() throws Exception { public void runUpdateConflictOnManual() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.manualCollectionUri, conflictDocument, 0) @@ -238,7 +238,7 @@ public void runUpdateConflictOnManual() throws Exception { public void runDeleteConflictOnManual() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.manualCollectionUri, conflictDocument, 0) .singleOrEmpty().block(); @@ -279,7 +279,7 @@ public void runInsertConflictOnLWW() throws Exception { ArrayList> insertTask = new ArrayList<>(); Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); int index = 0; for (AsyncDocumentClient client : this.clients) { @@ -304,7 +304,7 @@ public void runInsertConflictOnLWW() throws Exception { public void runUpdateConflictOnLWW() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.lwwCollectionUri, conflictDocument, 0) .singleOrEmpty().block(); @@ -339,7 +339,7 @@ public void runUpdateConflictOnLWW() throws Exception { public void runDeleteConflictOnLWW() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.lwwCollectionUri, conflictDocument, 0) .singleOrEmpty().block(); @@ -382,7 +382,7 @@ public void runInsertConflictOnUdp() throws Exception { ArrayList> insertTask = new ArrayList<>(); Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); int index = 0; for (AsyncDocumentClient client : this.clients) { @@ -407,7 +407,7 @@ public void runInsertConflictOnUdp() throws Exception { public void runUpdateConflictOnUdp() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.udpCollectionUri, conflictDocument, 0) .singleOrEmpty().block(); @@ -441,7 +441,7 @@ public void runUpdateConflictOnUdp() throws Exception { public void runDeleteConflictOnUdp() throws Exception { do { Document conflictDocument = new Document(); - conflictDocument.id(UUID.randomUUID().toString()); + conflictDocument.setId(UUID.randomUUID().toString()); conflictDocument = this.tryInsertDocument(clients.get(0), this.udpCollectionUri, conflictDocument, 0) .singleOrEmpty().block(); @@ -494,7 +494,7 @@ private Flux tryInsertDocument(AsyncDocumentClient client, String coll private boolean hasDocumentClientException(Throwable e, int statusCode) { if (e instanceof CosmosClientException) { CosmosClientException dce = (CosmosClientException) e; - return dce.statusCode() == statusCode; + return dce.getStatusCode() == statusCode; } return false; @@ -515,7 +515,7 @@ private boolean hasDocumentClientExceptionCause(Throwable e, int statusCode) { while (e != null) { if (e instanceof CosmosClientException) { CosmosClientException dce = (CosmosClientException) e; - return dce.statusCode() == statusCode; + return dce.getStatusCode() == statusCode; } e = e.getCause(); @@ -530,11 +530,11 @@ private Flux tryUpdateDocument(AsyncDocumentClient client, String coll RequestOptions options = new RequestOptions(); options.setAccessCondition(new AccessCondition()); - options.getAccessCondition().type(AccessConditionType.IF_MATCH); - options.getAccessCondition().condition(document.etag()); + options.getAccessCondition().setType(AccessConditionType.IF_MATCH); + options.getAccessCondition().setCondition(document.getETag()); - return client.replaceDocument(document.selfLink(), document, null).onErrorResume(e -> { + return client.replaceDocument(document.getSelfLink(), document, null).onErrorResume(e -> { // pre condition failed if (hasDocumentClientException(e, 412)) { @@ -552,11 +552,11 @@ private Flux tryDeleteDocument(AsyncDocumentClient client, String coll RequestOptions options = new RequestOptions(); options.setAccessCondition(new AccessCondition()); - options.getAccessCondition().type(AccessConditionType.IF_MATCH); - options.getAccessCondition().condition(document.etag()); + options.getAccessCondition().setType(AccessConditionType.IF_MATCH); + options.getAccessCondition().setCondition(document.getETag()); - return client.deleteDocument(document.selfLink(), options).onErrorResume(e -> { + return client.deleteDocument(document.getSelfLink(), options).onErrorResume(e -> { // pre condition failed if (hasDocumentClientException(e, 412)) { @@ -593,21 +593,21 @@ private boolean validateManualConflict(AsyncDocumentClient client, Document conf FeedResponse response = client.readConflicts(this.manualCollectionUri, null) .take(1).single().block(); - for (Conflict conflict : response.results()) { + for (Conflict conflict : response.getResults()) { if (!isDelete(conflict)) { Document conflictDocumentContent = conflict.getResource(Document.class); - if (equals(conflictDocument.id(), conflictDocumentContent.id())) { - if (equals(conflictDocument.resourceId(), conflictDocumentContent.resourceId()) && - equals(conflictDocument.etag(), conflictDocumentContent.etag())) { + if (equals(conflictDocument.getId(), conflictDocumentContent.getId())) { + if (equals(conflictDocument.getResourceId(), conflictDocumentContent.getResourceId()) && + equals(conflictDocument.getETag(), conflictDocumentContent.getETag())) { logger.info("Document from Region {} lost conflict @ {}", - conflictDocument.id(), + conflictDocument.getId(), conflictDocument.getInt("regionId"), client.getReadEndpoint()); return true; } else { try { //Checking whether this is the winner. - Document winnerDocument = client.readDocument(conflictDocument.selfLink(), null) + Document winnerDocument = client.readDocument(conflictDocument.getSelfLink(), null) .single().block().getResource(); logger.info("Document from region {} won the conflict @ {}", conflictDocument.getInt("regionId"), @@ -627,7 +627,7 @@ private boolean validateManualConflict(AsyncDocumentClient client, Document conf } } } else { - if (equals(conflict.getSourceResourceId(), conflictDocument.resourceId())) { + if (equals(conflict.getSourceResourceId(), conflictDocument.getResourceId())) { logger.info("DELETE conflict found @ {}", client.getReadEndpoint()); return false; @@ -636,7 +636,7 @@ private boolean validateManualConflict(AsyncDocumentClient client, Document conf } logger.error("Document {} is not found in conflict feed @ {}, retrying", - conflictDocument.id(), + conflictDocument.getId(), client.getReadEndpoint()); TimeUnit.MILLISECONDS.sleep(500); @@ -648,23 +648,23 @@ private void deleteConflict(Document conflictDocument) { FeedResponse conflicts = delClient.readConflicts(this.manualCollectionUri, null).take(1).single().block(); - for (Conflict conflict : conflicts.results()) { + for (Conflict conflict : conflicts.getResults()) { if (!isDelete(conflict)) { Document conflictContent = conflict.getResource(Document.class); - if (equals(conflictContent.resourceId(), conflictDocument.resourceId()) - && equals(conflictContent.etag(), conflictDocument.etag())) { + if (equals(conflictContent.getResourceId(), conflictDocument.getResourceId()) + && equals(conflictContent.getETag(), conflictDocument.getETag())) { logger.info("Deleting manual conflict {} from region {}", conflict.getSourceResourceId(), conflictContent.getInt("regionId")); - delClient.deleteConflict(conflict.selfLink(), null) + delClient.deleteConflict(conflict.getSelfLink(), null) .single().block(); } - } else if (equals(conflict.getSourceResourceId(), conflictDocument.resourceId())) { + } else if (equals(conflict.getSourceResourceId(), conflictDocument.getResourceId())) { logger.info("Deleting manual conflict {} from region {}", conflict.getSourceResourceId(), conflictDocument.getInt("regionId")); - delClient.deleteConflict(conflict.selfLink(), null) + delClient.deleteConflict(conflict.getSelfLink(), null) .single().block(); } } @@ -685,18 +685,18 @@ private void validateLWW(AsyncDocumentClient client, List conflictDocu FeedResponse response = client.readConflicts(this.lwwCollectionUri, null) .take(1).single().block(); - if (response.results().size() != 0) { - logger.error("Found {} conflicts in the lww collection", response.results().size()); + if (response.getResults().size() != 0) { + logger.error("Found {} conflicts in the lww collection", response.getResults().size()); return; } if (hasDeleteConflict) { do { try { - client.readDocument(conflictDocument.get(0).selfLink(), null).single().block(); + client.readDocument(conflictDocument.get(0).getSelfLink(), null).single().block(); logger.error("DELETE conflict for document {} didnt win @ {}", - conflictDocument.get(0).id(), + conflictDocument.get(0).getId(), client.getReadEndpoint()); TimeUnit.MILLISECONDS.sleep(500); @@ -712,7 +712,7 @@ private void validateLWW(AsyncDocumentClient client, List conflictDocu return; } else { logger.error("DELETE conflict for document {} didnt win @ {}", - conflictDocument.get(0).id(), + conflictDocument.get(0).getId(), client.getReadEndpoint()); TimeUnit.MILLISECONDS.sleep(500); @@ -735,7 +735,7 @@ private void validateLWW(AsyncDocumentClient client, List conflictDocu while (true) { try { - Document existingDocument = client.readDocument(winnerDocument.selfLink(), null) + Document existingDocument = client.readDocument(winnerDocument.getSelfLink(), null) .single().block().getResource(); if (existingDocument.getInt("regionId") == winnerDocument.getInt("regionId")) { @@ -775,8 +775,8 @@ private String documentNameLink(String collectionId, String documentId) { private void validateUDPAsync(AsyncDocumentClient client, List conflictDocument, boolean hasDeleteConflict) throws Exception { FeedResponse response = client.readConflicts(this.udpCollectionUri, null).take(1).single().block(); - if (response.results().size() != 0) { - logger.error("Found {} conflicts in the udp collection", response.results().size()); + if (response.getResults().size() != 0) { + logger.error("Found {} conflicts in the udp collection", response.getResults().size()); return; } @@ -784,11 +784,11 @@ private void validateUDPAsync(AsyncDocumentClient client, List conflic do { try { client.readDocument( - documentNameLink(udpCollectionName, conflictDocument.get(0).id()), null) + documentNameLink(udpCollectionName, conflictDocument.get(0).getId()), null) .single().block(); logger.error("DELETE conflict for document {} didnt win @ {}", - conflictDocument.get(0).id(), + conflictDocument.get(0).getId(), client.getReadEndpoint()); TimeUnit.MILLISECONDS.sleep(500); @@ -799,7 +799,7 @@ private void validateUDPAsync(AsyncDocumentClient client, List conflic return; } else { logger.error("DELETE conflict for document {} didnt win @ {}", - conflictDocument.get(0).id(), + conflictDocument.get(0).getId(), client.getReadEndpoint()); TimeUnit.MILLISECONDS.sleep(500); @@ -824,7 +824,7 @@ private void validateUDPAsync(AsyncDocumentClient client, List conflic try { Document existingDocument = client.readDocument( - documentNameLink(udpCollectionName, winnerDocument.id()), null) + documentNameLink(udpCollectionName, winnerDocument.getId()), null) .single().block().getResource(); if (existingDocument.getInt("regionId") == winnerDocument.getInt( diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Main.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Main.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Main.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Main.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java index 91e224dd5ffe..34b971fdfd8f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/MultiMasterScenario.java @@ -51,8 +51,8 @@ public MultiMasterScenario() { for (String region : regions) { ConnectionPolicy policy = new ConnectionPolicy(); - policy.usingMultipleWriteLocations(true); - policy.preferredLocations(Collections.singletonList(region)); + policy.setUsingMultipleWriteLocations(true); + policy.setPreferredLocations(Collections.singletonList(region)); AsyncDocumentClient client = new AsyncDocumentClient.Builder() diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java rename to sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java index 5d91d924366e..850a207bcbb0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java +++ b/sdk/cosmos/azure-cosmos-examples/src/main/java/com/azure/data/cosmos/rx/examples/multimaster/samples/Worker.java @@ -50,7 +50,7 @@ public Mono runLoopAsync(int documentsToInsert) { long startTick = System.currentTimeMillis(); Document d = new Document(); - d.id(UUID.randomUUID().toString()); + d.setId(UUID.randomUUID().toString()); this.client.createDocument(this.documentCollectionUri, d, null, false) .subscribeOn(schedulerForBlockingWork).single().block(); @@ -85,13 +85,13 @@ public Mono readAllAsync(int expectedNumberOfDocuments) { do { FeedOptions options = new FeedOptions(); - options.requestContinuation(response != null ? response.continuationToken() : null); + options.requestContinuation(response != null ? response.getContinuationToken() : null); response = this.client.readDocuments(this.documentCollectionUri, options).take(1) .subscribeOn(schedulerForBlockingWork).single().block(); - totalItemRead += response.results().size(); - } while (response.continuationToken() != null); + totalItemRead += response.getResults().size(); + } while (response.getContinuationToken() != null); if (totalItemRead < expectedNumberOfDocuments) { logger.info("Total item read {} from {} is less than {}, retrying reads", @@ -122,22 +122,22 @@ void deleteAll() { do { FeedOptions options = new FeedOptions(); - options.requestContinuation(response != null ? response.continuationToken() : null); + options.requestContinuation(response != null ? response.getContinuationToken() : null); response = this.client.readDocuments(this.documentCollectionUri, options).take(1) .subscribeOn(schedulerForBlockingWork).single().block(); - documents.addAll(response.results()); - } while (response.continuationToken() != null); + documents.addAll(response.getResults()); + } while (response.getContinuationToken() != null); for (Document document : documents) { try { - this.client.deleteDocument(document.selfLink(), null) + this.client.deleteDocument(document.getSelfLink(), null) .subscribeOn(schedulerForBlockingWork).single().block(); } catch (RuntimeException exEx) { CosmosClientException dce = getDocumentClientExceptionCause(exEx); - if (dce.statusCode() != 404) { + if (dce.getStatusCode() != 404) { logger.info("Error occurred while deleting {} from {}", dce, client.getWriteEndpoint()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/log4j.properties b/sdk/cosmos/azure-cosmos-examples/src/main/resources/log4j.properties similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/log4j.properties rename to sdk/cosmos/azure-cosmos-examples/src/main/resources/log4j.properties diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/multi-master-sample-config.properties b/sdk/cosmos/azure-cosmos-examples/src/main/resources/multi-master-sample-config.properties similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/multi-master-sample-config.properties rename to sdk/cosmos/azure-cosmos-examples/src/main/resources/multi-master-sample-config.properties diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/resolver-storedproc.txt b/sdk/cosmos/azure-cosmos-examples/src/main/resources/resolver-storedproc.txt similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/main/resources/resolver-storedproc.txt rename to sdk/cosmos/azure-cosmos-examples/src/main/resources/resolver-storedproc.txt diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java index 0c45a360f2b0..00c9079b7ad8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/DocumentClientTest.java @@ -36,7 +36,7 @@ public final String getTestName() { @BeforeMethod(alwaysRun = true) public final void setTestName(Method method) { - String connectionMode = this.clientBuilder.getConnectionPolicy().connectionMode() == ConnectionMode.DIRECT + String connectionMode = this.clientBuilder.getConnectionPolicy().getConnectionMode() == ConnectionMode.DIRECT ? "Direct " + this.clientBuilder.getConfigs().getProtocol() : "Gateway"; diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java index bb6c46878c44..d84194fb5c58 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java @@ -73,7 +73,7 @@ public class CollectionCRUDAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -89,11 +89,11 @@ public void setUp() { @BeforeMethod(groups = "samples", timeOut = TIMEOUT) public void before() { collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); } @@ -232,7 +232,7 @@ public void createCollection_toBlocking_CollectionAlreadyExists_Fails() { .block(); // Blocks assertThat("Should not reach here", false); } catch (Exception e) { - assertThat("Collection already exists.", ((CosmosClientException) e.getCause()).statusCode(), + assertThat("Collection already exists.", ((CosmosClientException) e.getCause()).getStatusCode(), equalTo(409)); } } @@ -324,7 +324,7 @@ public void collectionCreateAndQuery() throws Exception { // Query the created collection using async api Flux> queryCollectionObservable = client.queryCollections( - getDatabaseLink(), String.format("SELECT * FROM r where r.id = '%s'", collection.id()), + getDatabaseLink(), String.format("SELECT * FROM r where r.id = '%s'", collection.getId()), null); final CountDownLatch countDownLatch = new CountDownLatch(1); @@ -335,13 +335,13 @@ public void collectionCreateAndQuery() throws Exception { // First element of the list should have only 1 result FeedResponse collectionFeedResponse = collectionFeedResponseList.get(0); - assertThat(collectionFeedResponse.results().size(), equalTo(1)); + assertThat(collectionFeedResponse.getResults().size(), equalTo(1)); - // This collection should have the same id as the one we created - DocumentCollection foundCollection = collectionFeedResponse.results().get(0); - assertThat(foundCollection.id(), equalTo(collection.id())); + // This collection should have the same getId as the one we created + DocumentCollection foundCollection = collectionFeedResponse.getResults().get(0); + assertThat(foundCollection.getId(), equalTo(collection.getId())); - System.out.println(collectionFeedResponse.activityId()); + System.out.println(collectionFeedResponse.getActivityId()); countDownLatch.countDown(); }, error -> { System.err.println("an error occurred while querying the collection: actual cause: " + error.getMessage()); @@ -353,39 +353,39 @@ public void collectionCreateAndQuery() throws Exception { } private String getDatabaseLink() { - return "dbs/" + createdDatabase.id(); + return "dbs/" + createdDatabase.getId(); } private String getCollectionLink(DocumentCollection collection) { - return "dbs/" + createdDatabase.id() + "/colls/" + collection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + collection.getId(); } private DocumentCollection getMultiPartitionCollectionDefinition() { DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); // Set the partitionKeyDefinition for a partitioned collection. // Here, we are setting the partitionKey of the Collection to be /city PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); List paths = new ArrayList<>(); paths.add("/city"); - partitionKeyDefinition.paths(paths); + partitionKeyDefinition.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDefinition); // Set indexing policy to be range range for string and number IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); - BridgeInternal.setProperty(stringIndex, "precision", -1); + BridgeInternal.setProperty(stringIndex, "getPrecision", -1); indexes.add(stringIndex); Index numberIndex = Index.Range(DataType.NUMBER); - BridgeInternal.setProperty(numberIndex, "precision", -1); + BridgeInternal.setProperty(numberIndex, "getPrecision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); collectionDefinition.setIndexingPolicy(indexingPolicy); diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java index 4901b8aa7f03..e20be5ac7b18 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/ConflictAPITest.java @@ -53,7 +53,7 @@ public class ConflictAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -64,11 +64,11 @@ public void setUp() { this.client = this.clientBuilder().build(); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); // CREATE database @@ -76,7 +76,7 @@ public void setUp() { // CREATE collection createdCollection = client - .createCollection("/dbs/" + createdDatabase.id(), collectionDefinition, null) + .createCollection("/dbs/" + createdDatabase.getId(), collectionDefinition, null) .single().block().getResource(); int numberOfDocuments = 20; @@ -116,11 +116,11 @@ public void readConflicts_toBlocking_toIterator() { int numberOfResults = 0; while (it.hasNext()) { FeedResponse page = it.next(); - System.out.println("items: " + page.results()); - String pageSizeAsString = page.responseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); - assertThat("header item count must be present", pageSizeAsString, notNullValue()); + System.out.println("items: " + page.getResults()); + String pageSizeAsString = page.getResponseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); + assertThat("header getItem count must be present", pageSizeAsString, notNullValue()); int pageSize = Integer.valueOf(pageSizeAsString); - assertThat("Result size must match header item count", page.results(), hasSize(pageSize)); + assertThat("Result size must match header getItem count", page.getResults(), hasSize(pageSize)); numberOfResults += pageSize; } assertThat("number of total results", numberOfResults, equalTo(expectedNumberOfConflicts)); @@ -148,13 +148,13 @@ public void transformObservableToCompletableFuture() throws Exception { int totalNumberOfRetrievedConflicts = 0; for (FeedResponse page : pageList) { - totalNumberOfRetrievedConflicts += page.results().size(); + totalNumberOfRetrievedConflicts += page.getResults().size(); } assertThat(0, equalTo(totalNumberOfRetrievedConflicts)); } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java index 150099170d95..300f0c090cdb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DatabaseCRUDAsyncAPITest.java @@ -57,7 +57,7 @@ public class DatabaseCRUDAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -70,9 +70,9 @@ public void setUp() { private Database getDatabaseDefinition() { Database databaseDefinition = new Database(); - databaseDefinition.id(Utils.generateDatabaseId()); + databaseDefinition.setId(Utils.generateDatabaseId()); - databaseIds.add(databaseDefinition.id()); + databaseIds.add(databaseDefinition.getId()); return databaseDefinition; } @@ -180,7 +180,7 @@ public void createDatabase_toBlocking_DatabaseAlreadyExists_Fails() { .block(); // Blocks to get the result assertThat("Should not reach here", false); } catch (Exception e) { - assertThat("Database already exists.", ((CosmosClientException) e.getCause()).statusCode(), + assertThat("Database already exists.", ((CosmosClientException) e.getCause()).getStatusCode(), equalTo(409)); } } @@ -208,8 +208,8 @@ public void createAndReadDatabase() throws Exception { // CREATE a database Database database = client.createDatabase(getDatabaseDefinition(), null).single().block().getResource(); - // READ the created database using async api - Flux> readDatabaseObservable = client.readDatabase("dbs/" + database.id(), + // READ the created getDatabase using async api + Flux> readDatabaseObservable = client.readDatabase("dbs/" + database.getId(), null); final CountDownLatch completionLatch = new CountDownLatch(1); @@ -238,7 +238,7 @@ public void createAndDeleteDatabase() throws Exception { // DELETE the created database using async api Flux> deleteDatabaseObservable = client - .deleteDatabase("dbs/" + database.id(), null); + .deleteDatabase("dbs/" + database.getId(), null); final CountDownLatch completionLatch = new CountDownLatch(1); @@ -267,7 +267,7 @@ public void databaseCreateAndQuery() throws Exception { // Query the created database using async api Flux> queryDatabaseObservable = client - .queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseDefinition.id()), null); + .queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseDefinition.getId()), null); final CountDownLatch completionLatch = new CountDownLatch(1); @@ -277,13 +277,13 @@ public void databaseCreateAndQuery() throws Exception { // First element of the list should have only 1 result FeedResponse databaseFeedResponse = databaseFeedResponseList.get(0); - assertThat(databaseFeedResponse.results().size(), equalTo(1)); + assertThat(databaseFeedResponse.getResults().size(), equalTo(1)); - // This database should have the same id as the one we created - Database foundDatabase = databaseFeedResponse.results().get(0); - assertThat(foundDatabase.id(), equalTo(databaseDefinition.id())); + // This getDatabase should have the same getId as the one we created + Database foundDatabase = databaseFeedResponse.getResults().get(0); + assertThat(foundDatabase.getId(), equalTo(databaseDefinition.getId())); - System.out.println(databaseFeedResponse.activityId()); + System.out.println(databaseFeedResponse.getActivityId()); completionLatch.countDown(); }, error -> { System.err.println("an error occurred while querying the database: actual cause: " + error.getMessage()); diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java index 930d02dc0a22..11bea5cee487 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentCRUDAsyncAPITest.java @@ -82,7 +82,7 @@ public class DocumentCRUDAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -93,12 +93,12 @@ public void setUp() { this.client = this.clientBuilder().build(); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); ArrayList partitionKeyPaths = new ArrayList(); partitionKeyPaths.add(PARTITION_KEY_PATH); - partitionKeyDefinition.paths(partitionKeyPaths); + partitionKeyDefinition.setPaths(partitionKeyPaths); collectionDefinition.setPartitionKey(partitionKeyDefinition); // CREATE database @@ -106,7 +106,7 @@ public void setUp() { // CREATE collection createdCollection = client - .createCollection("dbs/" + createdDatabase.id(), collectionDefinition, null) + .createCollection("dbs/" + createdDatabase.getId(), collectionDefinition, null) .single().block().getResource(); } @@ -147,7 +147,7 @@ public void createDocument_Async() throws Exception { */ @Test(groups = "samples", timeOut = TIMEOUT) public void createDocument_Async_withoutLambda() throws Exception { - Document doc = new Document(String.format("{ 'id': 'doc%s', 'counter': '%d'}", UUID.randomUUID().toString(), 1)); + Document doc = new Document(String.format("{ 'getId': 'doc%s', 'counter': '%d'}", UUID.randomUUID().toString(), 1)); Flux> createDocumentObservable = client .createDocument(getCollectionLink(), doc, null, true); @@ -200,7 +200,7 @@ public void createDocument_toBlocking() { @Test(groups = "samples", timeOut = TIMEOUT) public void createDocumentWithProgrammableDocumentDefinition() throws Exception { Document documentDefinition = new Document(); - documentDefinition.id("test-document"); + documentDefinition.setId("test-document"); BridgeInternal.setProperty(documentDefinition, "counter", 1); // CREATE a document @@ -220,7 +220,7 @@ public void createDocumentWithProgrammableDocumentDefinition() throws Exception Document readDocument = documentResourceResponse.getResource(); // The read document must be the same as the written document - assertThat(readDocument.id(), equalTo("test-document")); + assertThat(readDocument.getId(), equalTo("test-document")); assertThat(readDocument.getInt("counter"), equalTo(1)); System.out.println(documentResourceResponse.getActivityId()); completionLatch.countDown(); @@ -292,7 +292,7 @@ public void createDocument_toBlocking_DocumentAlreadyExists_Fails() { .block(); // Blocks and gets the result Assert.fail("Document Already Exists. Document Creation must fail"); } catch (Exception e) { - assertThat("Document already exists.", ((CosmosClientException) e.getCause()).statusCode(), + assertThat("Document already exists.", ((CosmosClientException) e.getCause()).getStatusCode(), equalTo(409)); } } @@ -324,7 +324,7 @@ public void createDocument_Async_DocumentAlreadyExists_Fails() throws Exception Thread.sleep(2000); assertThat(errorList, hasSize(1)); assertThat(errorList.get(0), is(instanceOf(CosmosClientException.class))); - assertThat(((CosmosClientException) errorList.get(0)).statusCode(), equalTo(409)); + assertThat(((CosmosClientException) errorList.get(0)).getStatusCode(), equalTo(409)); } /** @@ -339,7 +339,7 @@ public void documentReplace_Async() throws Exception { // Try to replace the existing document Document replacingDocument = new Document( - String.format("{ 'id': 'doc%s', 'counter': '%d', 'new-prop' : '2'}", createdDocument.id(), 1)); + String.format("{ 'id': 'doc%s', 'counter': '%d', 'new-prop' : '2'}", createdDocument.getId(), 1)); Flux> replaceDocumentObservable = client .replaceDocument(getDocumentLink(createdDocument), replacingDocument, null); @@ -367,7 +367,7 @@ public void documentUpsert_Async() throws Exception { // Upsert the existing document Document upsertingDocument = new Document( - String.format("{ 'id': 'doc%s', 'counter': '%d', 'new-prop' : '2'}", doc.id(), 1)); + String.format("{ 'id': 'doc%s', 'counter': '%d', 'new-prop' : '2'}", doc.getId(), 1)); Flux> upsertDocumentObservable = client .upsertDocument(getCollectionLink(), upsertingDocument, null, false); @@ -414,10 +414,10 @@ public void documentDelete_Async() throws Exception { // Assert document is deleted FeedOptions queryOptions = new FeedOptions(); - queryOptions.enableCrossPartitionQuery(true); + queryOptions.setEnableCrossPartitionQuery(true); List listOfDocuments = client - .queryDocuments(getCollectionLink(), String.format("SELECT * FROM r where r.id = '%s'", createdDocument.id()), queryOptions) - .map(FeedResponse::results) // Map page to its list of documents + .queryDocuments(getCollectionLink(), String.format("SELECT * FROM r where r.id = '%s'", createdDocument.getId()), queryOptions) + .map(FeedResponse::getResults) // Map page to its list of documents .concatMap(Flux::fromIterable) // Flatten the observable .collectList() // Transform to a observable .single() // Gets the Mono> @@ -490,7 +490,7 @@ public void customSerialization() throws Exception { options.setPartitionKey(new PartitionKey(testObject.mypk)); Document readDocument = client - .readDocument(createdDocument.selfLink(), options) + .readDocument(createdDocument.getSelfLink(), options) .single() .block() .getResource(); @@ -516,10 +516,10 @@ public void transformObservableToCompletableFuture() throws Exception { } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } private String getDocumentLink(Document createdDocument) { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id() + "/docs/" + createdDocument.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId() + "/docs/" + createdDocument.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java index 6f478e033a76..5d812547d30a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/DocumentQueryAsyncAPITest.java @@ -77,7 +77,7 @@ public class DocumentQueryAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -88,11 +88,11 @@ public void setUp() { this.client = this.clientBuilder().build(); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); // CREATE database @@ -101,7 +101,7 @@ public void setUp() { // CREATE collection createdCollection = client - .createCollection("dbs/" + createdDatabase.id(), collectionDefinition, null) + .createCollection("dbs/" + createdDatabase.getId(), collectionDefinition, null) .single().block().getResource(); numberOfDocuments = 20; @@ -128,7 +128,7 @@ public void queryDocuments_Async() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> documentQueryObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options); @@ -145,7 +145,7 @@ public void queryDocuments_Async() throws Exception { } for (@SuppressWarnings("unused") - Document d : page.results()) { + Document d : page.getResults()) { resultsCountDown.countDown(); } }); @@ -174,7 +174,7 @@ public void queryDocuments_Async_withoutLambda() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> documentQueryObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options); @@ -195,7 +195,7 @@ public void accept(FeedResponse t) { } catch (InterruptedException e) { } - for (Document d : t.results()) { + for (Document d : t.getResults()) { resultsCountDown.countDown(); } } @@ -223,11 +223,11 @@ public void queryDocuments_findTotalRequestCharge() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux totalChargeObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options) - .map(FeedResponse::requestCharge) // Map the page to its request charge + .map(FeedResponse::getRequestCharge) // Map the page to its request charge .reduce(Double::sum).flux(); // Sum up all the request charges final CountDownLatch successfulCompletionLatch = new CountDownLatch(1); @@ -248,7 +248,7 @@ public void queryDocuments_unsubscribeAfterFirstPage() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> requestChargeObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options); @@ -285,7 +285,7 @@ public void queryDocuments_filterFetchedResults() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Predicate isPrimeNumber = new Predicate() { @@ -305,10 +305,10 @@ public boolean test(Document doc) { List resultList = Collections.synchronizedList(new ArrayList()); client.queryDocuments(getCollectionLink(), "SELECT * FROM root", options) - .map(FeedResponse::results) // Map the page to the list of documents + .map(FeedResponse::getResults) // Map the page to the list of documents .concatMap(Flux::fromIterable) // Flatten the Flux> to Flux .filter(isPrimeNumber) // Filter documents using isPrimeNumber predicate - .subscribe(doc -> resultList.add(doc)); // Collect the results + .subscribe(doc -> resultList.add(doc)); // Collect the getResults Thread.sleep(4000); @@ -345,7 +345,7 @@ public void queryDocuments_toBlocking_toIterator() { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> documentQueryObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options); @@ -360,13 +360,13 @@ public void queryDocuments_toBlocking_toIterator() { FeedResponse page = it.next(); pageCounter++; - String pageSizeAsString = page.responseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); - assertThat("header item count must be present", pageSizeAsString, notNullValue()); + String pageSizeAsString = page.getResponseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); + assertThat("header getItem count must be present", pageSizeAsString, notNullValue()); int pageSize = Integer.valueOf(pageSizeAsString); - assertThat("Result size must match header item count", page.results(), hasSize(pageSize)); + assertThat("Result size must match header getItem count", page.getResults(), hasSize(pageSize)); numberOfResults += pageSize; } - assertThat("number of total results", numberOfResults, equalTo(numberOfDocuments)); + assertThat("number of total getResults", numberOfResults, equalTo(numberOfDocuments)); assertThat("number of result pages", pageCounter, equalTo((numberOfDocuments + requestPageSize - 1) / requestPageSize)); } @@ -378,7 +378,7 @@ public void queryDocuments_toBlocking_toIterator() { public void qrderBy_Async() throws Exception { // CREATE a partitioned collection String collectionId = UUID.randomUUID().toString(); - DocumentCollection multiPartitionCollection = createMultiPartitionCollection("dbs/" + createdDatabase.id(), + DocumentCollection multiPartitionCollection = createMultiPartitionCollection("dbs/" + createdDatabase.getId(), collectionId, "/key"); // Insert documents @@ -387,30 +387,30 @@ public void qrderBy_Async() throws Exception { Document doc = new Document(String.format("{\"id\":\"documentId%d\",\"key\":\"%s\",\"prop\":%d}", i, RandomStringUtils.randomAlphabetic(2), i)); - client.createDocument("dbs/" + createdDatabase.id() + "/colls/" + multiPartitionCollection.id(), + client.createDocument("dbs/" + createdDatabase.getId() + "/colls/" + multiPartitionCollection.getId(), doc, null, true).single().block(); } // Query for the documents order by the prop field SqlQuerySpec query = new SqlQuerySpec("SELECT r.id FROM r ORDER BY r.prop", new SqlParameterList()); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(5); // Max degree of parallelism determines the number of partitions that // the SDK establishes simultaneous connections to. - options.maxDegreeOfParallelism(2); + options.setMaxDegreeOfParallelism(2); - // Get the observable order by query documents + // Get the observable getOrder by query documents Flux> documentQueryObservable = client.queryDocuments( - "dbs/" + createdDatabase.id() + "/colls/" + multiPartitionCollection.id(), query, options); + "dbs/" + createdDatabase.getId() + "/colls/" + multiPartitionCollection.getId(), query, options); List resultList = Collections.synchronizedList(new ArrayList<>()); - documentQueryObservable.map(FeedResponse::results) + documentQueryObservable.map(FeedResponse::getResults) // Map the logical page to the list of documents in the page .concatMap(Flux::fromIterable) // Flatten the list of documents - .map(Resource::id) // Map to the document Id + .map(Resource::getId) // Map to the document Id .subscribe(resultList::add); // Add each document Id to the resultList Thread.sleep(4000); @@ -432,7 +432,7 @@ public void transformObservableToCompletableFuture() throws Exception { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> documentQueryObservable = client .queryDocuments(getCollectionLink(), "SELECT * FROM root", options); @@ -447,13 +447,13 @@ public void transformObservableToCompletableFuture() throws Exception { int totalNumberOfRetrievedDocuments = 0; for (FeedResponse page : pageList) { - totalNumberOfRetrievedDocuments += page.results().size(); + totalNumberOfRetrievedDocuments += page.getResults().size(); } assertThat(numberOfDocuments, equalTo(totalNumberOfRetrievedDocuments)); } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } private DocumentCollection createMultiPartitionCollection(String databaseLink, String collectionId, @@ -461,12 +461,12 @@ private DocumentCollection createMultiPartitionCollection(String databaseLink, S PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add(partitionKeyPath); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); RequestOptions options = new RequestOptions(); options.setOfferThroughput(10100); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(collectionId); + collectionDefinition.setId(collectionId); collectionDefinition.setPartitionKey(partitionKeyDef); DocumentCollection createdCollection = client.createCollection(databaseLink, collectionDefinition, options) .single().block().getResource(); diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java index b93b2cd68f96..0f5fd7eabfc8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/InMemoryGroupbyTest.java @@ -40,7 +40,7 @@ public class InMemoryGroupbyTest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = 2 * TIMEOUT) public void setUp() throws Exception { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -54,16 +54,16 @@ public void setUp() throws Exception { createdDatabase = Utils.createDatabaseForTest(client); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); // CREATE collection createdCollection = client - .createCollection("dbs/" + createdDatabase.id(), collectionDefinition, null) + .createCollection("dbs/" + createdDatabase.getId(), collectionDefinition, null) .single().block().getResource(); int numberOfPayers = 10; @@ -106,14 +106,14 @@ public void groupByInMemory() { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux documentsObservable = client .queryDocuments(getCollectionLink(), new SqlQuerySpec("SELECT * FROM root r WHERE r.site_id=@site_id", new SqlParameterList(new SqlParameter("@site_id", "ABC"))), options) - .flatMap(page -> Flux.fromIterable(page.results())); + .flatMap(page -> Flux.fromIterable(page.getResults())); final LocalDateTime now = LocalDateTime.now(); @@ -138,14 +138,14 @@ public void groupByInMemory_MoreDetail() { int requestPageSize = 3; FeedOptions options = new FeedOptions(); options.maxItemCount(requestPageSize); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux documentsObservable = client .queryDocuments(getCollectionLink(), new SqlQuerySpec("SELECT * FROM root r WHERE r.site_id=@site_id", new SqlParameterList(new SqlParameter("@site_id", "ABC"))), options) - .flatMap(page -> Flux.fromIterable(page.results())); + .flatMap(page -> Flux.fromIterable(page.getResults())); final LocalDateTime now = LocalDateTime.now(); @@ -166,6 +166,6 @@ public void groupByInMemory_MoreDetail() { } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java index c6800e6e4026..4a1781a02991 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/OfferCRUDAsyncAPITest.java @@ -43,7 +43,7 @@ public class OfferCRUDAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -78,7 +78,7 @@ public void updateOffer() throws Exception { multiPartitionRequestOptions.setOfferThroughput(initialThroughput); // CREATE the collection - DocumentCollection createdCollection = client.createCollection("dbs/" + createdDatabase.id(), + DocumentCollection createdCollection = client.createCollection("dbs/" + createdDatabase.getId(), getMultiPartitionCollectionDefinition(), multiPartitionRequestOptions).single().block() .getResource(); @@ -86,16 +86,16 @@ public void updateOffer() throws Exception { // Find offer associated with this collection client.queryOffers( - String.format("SELECT * FROM r where r.offerResourceId = '%s'", createdCollection.resourceId()), + String.format("SELECT * FROM r where r.offerResourceId = '%s'", createdCollection.getResourceId()), null).flatMap(offerFeedResponse -> { - List offerList = offerFeedResponse.results(); + List offerList = offerFeedResponse.getResults(); // NUMBER of offers returned should be 1 assertThat(offerList.size(), equalTo(1)); // This offer must correspond to the collection we created Offer offer = offerList.get(0); int currentThroughput = offer.getThroughput(); - assertThat(offer.getString("offerResourceId"), equalTo(createdCollection.resourceId())); + assertThat(offer.getString("offerResourceId"), equalTo(createdCollection.getResourceId())); assertThat(currentThroughput, equalTo(initialThroughput)); System.out.println("initial throughput: " + currentThroughput); @@ -108,15 +108,15 @@ public void updateOffer() throws Exception { Offer offer = offerResourceResponse.getResource(); int currentThroughput = offer.getThroughput(); - // The current throughput of the offer must be equal to the new throughput value - assertThat(offer.getString("offerResourceId"), equalTo(createdCollection.resourceId())); + // The current throughput of the offer must be equal to the new throughput getValue + assertThat(offer.getString("offerResourceId"), equalTo(createdCollection.getResourceId())); assertThat(currentThroughput, equalTo(newThroughput)); System.out.println("updated throughput: " + currentThroughput); successfulCompletionLatch.countDown(); }, error -> { System.err - .println("an error occurred while updating the offer: actual cause: " + error.getMessage()); + .println("an getError occurred while updating the offer: actual cause: " + error.getMessage()); }); successfulCompletionLatch.await(); @@ -124,21 +124,21 @@ public void updateOffer() throws Exception { private DocumentCollection getMultiPartitionCollectionDefinition() { DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); // Set the partitionKeyDefinition for a partitioned collection // Here, we are setting the partitionKey of the Collection to be /city PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); List paths = new ArrayList<>(); paths.add("/city"); - partitionKeyDefinition.paths(paths); + partitionKeyDefinition.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDefinition); // Set indexing policy to be range range for string and number IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); BridgeInternal.setProperty(stringIndex, "precision", -1); @@ -147,11 +147,11 @@ private DocumentCollection getMultiPartitionCollectionDefinition() { Index numberIndex = Index.Range(DataType.NUMBER); BridgeInternal.setProperty(numberIndex, "precision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); collectionDefinition.setIndexingPolicy(indexingPolicy); return collectionDefinition; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java index d3eccaa1af00..101b5d229334 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/StoredProcedureAsyncAPITest.java @@ -49,7 +49,7 @@ public class StoredProcedureAsyncAPITest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -62,7 +62,7 @@ public void setUp() { createdDatabase = Utils.createDatabaseForTest(client); createdCollection = client - .createCollection("dbs/" + createdDatabase.id(), getMultiPartitionCollectionDefinition(), null) + .createCollection("dbs/" + createdDatabase.getId(), getMultiPartitionCollectionDefinition(), null) .single().block().getResource(); } @@ -213,21 +213,21 @@ class SamplePojo { private static DocumentCollection getMultiPartitionCollectionDefinition() { DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); // Set the partitionKeyDefinition for a partitioned collection // Here, we are setting the partitionKey of the Collection to be /city PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); List paths = new ArrayList(); paths.add("/city"); - partitionKeyDefinition.paths(paths); + partitionKeyDefinition.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDefinition); // Set indexing policy to be range range for string and number IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); List indexes = new ArrayList(); Index stringIndex = Index.Range(DataType.STRING); BridgeInternal.setProperty(stringIndex, "precision", -1); @@ -236,7 +236,7 @@ private static DocumentCollection getMultiPartitionCollectionDefinition() { Index numberIndex = Index.Range(DataType.NUMBER); BridgeInternal.setProperty(numberIndex, "precision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); collectionDefinition.setIndexingPolicy(indexingPolicy); @@ -245,10 +245,10 @@ private static DocumentCollection getMultiPartitionCollectionDefinition() { } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } private String getSprocLink(StoredProcedure sproc) { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id() + "/sprocs/" + sproc.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId() + "/sprocs/" + sproc.getId(); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TestConfigurations.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TestConfigurations.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TestConfigurations.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TestConfigurations.java diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java index 7228a803102f..66e2b6bb3485 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/TokenResolverTest.java @@ -59,7 +59,7 @@ public class TokenResolverTest extends DocumentClientTest { @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -70,60 +70,60 @@ public void setUp() { this.client = this.clientBuilder().build(); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); - // CREATE database + // CREATE getDatabase createdDatabase = Utils.createDatabaseForTest(client); // CREATE collection createdCollection = client - .createCollection("dbs/" + createdDatabase.id(), collectionDefinition, null) + .createCollection("dbs/" + createdDatabase.getId(), collectionDefinition, null) .single().block().getResource(); for (int i = 0; i < 10; i++) { // CREATE a document Document documentDefinition = new Document(); - documentDefinition.id(UUID.randomUUID().toString()); - Document createdDocument = client.createDocument(createdCollection.selfLink(), documentDefinition, null, true).blockFirst().getResource(); + documentDefinition.setId(UUID.randomUUID().toString()); + Document createdDocument = client.createDocument(createdCollection.getSelfLink(), documentDefinition, null, true).blockFirst().getResource(); // CREATE a User who is meant to only read this document User readUserDefinition = new User(); - readUserDefinition.id(UUID.randomUUID().toString()); - User createdReadUser = client.createUser(createdDatabase.selfLink(), readUserDefinition, null).blockFirst().getResource(); + readUserDefinition.setId(UUID.randomUUID().toString()); + User createdReadUser = client.createUser(createdDatabase.getSelfLink(), readUserDefinition, null).blockFirst().getResource(); - // CREATE a read only permission for the above document + // CREATE a read only getPermission for the above document Permission readOnlyPermissionDefinition = new Permission(); - readOnlyPermissionDefinition.id(UUID.randomUUID().toString()); - readOnlyPermissionDefinition.setResourceLink(createdDocument.selfLink()); + readOnlyPermissionDefinition.setId(UUID.randomUUID().toString()); + readOnlyPermissionDefinition.setResourceLink(createdDocument.getSelfLink()); readOnlyPermissionDefinition.setPermissionMode(PermissionMode.READ); - // Assign the permission to the above user - Permission readOnlyCreatedPermission = client.createPermission(createdReadUser.selfLink(), readOnlyPermissionDefinition, null).blockFirst().getResource(); - userToReadOnlyResourceTokenMap.put(createdReadUser.id(), readOnlyCreatedPermission.getToken()); + // Assign the getPermission to the above getUser + Permission readOnlyCreatedPermission = client.createPermission(createdReadUser.getSelfLink(), readOnlyPermissionDefinition, null).blockFirst().getResource(); + userToReadOnlyResourceTokenMap.put(createdReadUser.getId(), readOnlyCreatedPermission.getToken()); - documentToReadUserMap.put(createdDocument.selfLink(), createdReadUser.id()); + documentToReadUserMap.put(createdDocument.getSelfLink(), createdReadUser.getId()); // CREATE a User who can both read and write this document User readWriteUserDefinition = new User(); - readWriteUserDefinition.id(UUID.randomUUID().toString()); - User createdReadWriteUser = client.createUser(createdDatabase.selfLink(), readWriteUserDefinition, null).blockFirst().getResource(); + readWriteUserDefinition.setId(UUID.randomUUID().toString()); + User createdReadWriteUser = client.createUser(createdDatabase.getSelfLink(), readWriteUserDefinition, null).blockFirst().getResource(); // CREATE a read/write permission for the above document Permission readWritePermissionDefinition = new Permission(); - readWritePermissionDefinition.id(UUID.randomUUID().toString()); - readWritePermissionDefinition.setResourceLink(createdDocument.selfLink()); + readWritePermissionDefinition.setId(UUID.randomUUID().toString()); + readWritePermissionDefinition.setResourceLink(createdDocument.getSelfLink()); readWritePermissionDefinition.setPermissionMode(PermissionMode.ALL); - // Assign the permission to the above user - Permission readWriteCreatedPermission = client.createPermission(createdReadWriteUser.selfLink(), readWritePermissionDefinition, null).blockFirst().getResource(); - userToReadWriteResourceTokenMap.put(createdReadWriteUser.id(), readWriteCreatedPermission.getToken()); + // Assign the getPermission to the above getUser + Permission readWriteCreatedPermission = client.createPermission(createdReadWriteUser.getSelfLink(), readWritePermissionDefinition, null).blockFirst().getResource(); + userToReadWriteResourceTokenMap.put(createdReadWriteUser.getId(), readWriteCreatedPermission.getToken()); - documentToReadWriteUserMap.put(createdDocument.selfLink(), createdReadWriteUser.id()); + documentToReadWriteUserMap.put(createdDocument.getSelfLink(), createdReadWriteUser.getId()); } } @@ -135,7 +135,7 @@ public void readDocumentThroughTokenResolver() throws Exception { AsyncDocumentClient asyncClientWithTokenResolver = null; try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); asyncClientWithTokenResolver = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -173,7 +173,7 @@ public void deleteDocumentThroughTokenResolver() throws Exception { AsyncDocumentClient asyncClientWithTokenResolver = null; try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); asyncClientWithTokenResolver = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -215,7 +215,7 @@ public void blockListUserThroughTokenResolver() throws Exception { try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); asyncClientWithTokenResolver = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -231,7 +231,7 @@ public void blockListUserThroughTokenResolver() throws Exception { .build(); options.setProperties(properties); - Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), options); + Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), options); List capturedErrors = Collections .synchronizedList(new ArrayList<>()); readObservable.subscribe(response -> {}, throwable -> capturedErrors.add(throwable)); @@ -248,13 +248,13 @@ public void blockListUserThroughTokenResolver() throws Exception { .put(USER_ID, validUserId) .build(); options.setProperties(properties); - readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), options); + readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), options); List capturedResponse = Collections .synchronizedList(new ArrayList<>()); readObservable.subscribe(resourceResponse -> capturedResponse.add(resourceResponse.getResource()), error -> error.printStackTrace()); Thread.sleep(4000); assertThat(capturedErrors, hasSize(1)); - assertThat(capturedResponse.get(0).id(), equalTo(createdCollection.id())); + assertThat(capturedResponse.get(0).getId(), equalTo(createdCollection.getId())); } finally { Utils.safeClose(asyncClientWithTokenResolver); } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java index 3e4c533ecfda..c683106766d5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/UniqueIndexAsyncAPITest.java @@ -43,16 +43,16 @@ public class UniqueIndexAsyncAPITest extends DocumentClientTest { @Test(groups = "samples", timeOut = TIMEOUT) public void uniqueIndex() { DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); UniqueKeyPolicy uniqueKeyPolicy = new UniqueKeyPolicy(); UniqueKey uniqueKey = new UniqueKey(); - uniqueKey.paths(ImmutableList.of("/name", "/field")); + uniqueKey.setPaths(ImmutableList.of("/name", "/field")); uniqueKeyPolicy.uniqueKeys(Lists.newArrayList(uniqueKey)); collectionDefinition.setUniqueKeyPolicy(uniqueKeyPolicy); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collectionDefinition.setPartitionKey(partitionKeyDef); DocumentCollection collection = client.createCollection(getDatabaseLink(), collectionDefinition, null).single().block().getResource(); @@ -77,13 +77,13 @@ public void uniqueIndex() { assertThat(subscriber.errorCount(), Matchers.equalTo(1)); // error code for failure is conflict - assertThat(((CosmosClientException) subscriber.getEvents().get(1).get(0)).statusCode(), equalTo(409)); + assertThat(((CosmosClientException) subscriber.getEvents().get(1).get(0)).getStatusCode(), equalTo(409)); } @BeforeClass(groups = "samples", timeOut = TIMEOUT) public void setUp() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy().connectionMode(ConnectionMode.DIRECT); + ConnectionPolicy connectionPolicy = new ConnectionPolicy().setConnectionMode(ConnectionMode.DIRECT); this.clientBuilder() .withServiceEndpoint(TestConfigurations.HOST) @@ -94,9 +94,9 @@ public void setUp() { this.client = this.clientBuilder().build(); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); - // CREATE database + // CREATE getDatabase createdDatabase = Utils.createDatabaseForTest(client); } @@ -107,10 +107,10 @@ public void shutdown() { } private String getCollectionLink(DocumentCollection collection) { - return "dbs/" + createdDatabase.id() + "/colls/" + collection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + collection.getId(); } private String getDatabaseLink() { - return "dbs/" + createdDatabase.id(); + return "dbs/" + createdDatabase.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java rename to sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java index 85eddfb5a1b6..8da14c82cecd 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java +++ b/sdk/cosmos/azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/Utils.java @@ -22,9 +22,9 @@ public class Utils { @AfterSuite(groups = "samples") public void cleanupStaleDatabase() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); RetryOptions options = new RetryOptions(); - connectionPolicy.retryOptions(options); + connectionPolicy.setRetryOptions(options); AsyncDocumentClient client = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -34,7 +34,7 @@ public void cleanupStaleDatabase() { } public static String getCollectionLink(Database db, DocumentCollection collection) { - return "dbs/" + db.id() + "/colls/" + collection; + return "dbs/" + db.getId() + "/colls/" + collection; } public static Database createDatabaseForTest(AsyncDocumentClient client) { @@ -49,7 +49,7 @@ private static void safeCleanDatabases(AsyncDocumentClient client) { public static void safeClean(AsyncDocumentClient client, Database database) { if (database != null) { - safeClean(client, database.id()); + safeClean(client, database.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/src/test/resources/log4j.properties b/sdk/cosmos/azure-cosmos-examples/src/test/resources/log4j.properties similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos-examples/src/test/resources/log4j.properties rename to sdk/cosmos/azure-cosmos-examples/src/test/resources/log4j.properties diff --git a/sdk/cosmos/microsoft-azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/pom.xml rename to sdk/cosmos/azure-cosmos/pom.xml index d845ecd66627..fd745436b149 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -5,14 +5,14 @@ Licensed under the MIT License. 4.0.0 - com.microsoft.azure + com.azure azure-cosmos-parent - 3.3.0 + 4.0.0-preview.4 - com.microsoft.azure + com.azure azure-cosmos - 3.3.0 + 4.0.0-preview.4 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension rx support) for Azure Cosmos DB SQL API jar @@ -30,6 +30,13 @@ Licensed under the MIT License. + + + com.azure + azure-core + 1.0.0-preview.4 + + com.fasterxml.jackson.core jackson-databind diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java index 3d4fddf18af0..d4760a0d128b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/AccessCondition.java @@ -16,7 +16,7 @@ public final class AccessCondition { * * @return the condition type. */ - public AccessConditionType type() { + public AccessConditionType getType() { return this.type; } @@ -26,7 +26,7 @@ public AccessConditionType type() { * @param type the condition type to use. * @return the Access Condition */ - public AccessCondition type(AccessConditionType type) { + public AccessCondition setType(AccessConditionType type) { this.type = type; return this; } @@ -37,7 +37,7 @@ public AccessCondition type(AccessConditionType type) { * * @return the condition. */ - public String condition() { + public String getCondition() { return this.condition; } @@ -48,7 +48,7 @@ public String condition() { * @param condition the condition to use. * @return the Access Condition */ - public AccessCondition condition(String condition) { + public AccessCondition setCondition(String condition) { this.condition = condition; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/AccessConditionType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/AccessConditionType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/AccessConditionType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/AccessConditionType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/BadRequestException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/BadRequestException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/BadRequestException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/BadRequestException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java index 7147e743e23d..c66c57539f81 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/BridgeInternal.java @@ -53,7 +53,7 @@ public static Document documentFromObject(Object document, ObjectMapper mapper) } public static void monitorTelemetry(MeterRegistry registry) { - CosmosClient.monitorTelemetry(registry); + CosmosAsyncClient.setMonitorTelemetry(registry); } public static ResourceResponse toResourceResponse(RxDocumentServiceResponse response, @@ -101,14 +101,14 @@ public static Map getFeedHeaders(ChangeFeedOptions options) { Map headers = new HashMap<>(); - if (options.maxItemCount() != null) { - headers.put(HttpConstants.HttpHeaders.PAGE_SIZE, options.maxItemCount().toString()); + if (options.getMaxItemCount() != null) { + headers.put(HttpConstants.HttpHeaders.PAGE_SIZE, options.getMaxItemCount().toString()); } String ifNoneMatchValue = null; - if (options.requestContinuation() != null) { - ifNoneMatchValue = options.requestContinuation(); - } else if (!options.startFromBeginning()) { + if (options.getRequestContinuation() != null) { + ifNoneMatchValue = options.getRequestContinuation(); + } else if (!options.getStartFromBeginning()) { ifNoneMatchValue = "*"; } // On REST level, change feed is using IF_NONE_MATCH/ETag instead of @@ -138,31 +138,31 @@ public static Map getFeedHeaders(FeedOptions options) { } if (options != null) { - if (options.sessionToken() != null) { - headers.put(HttpConstants.HttpHeaders.SESSION_TOKEN, options.sessionToken()); + if (options.getSessionToken() != null) { + headers.put(HttpConstants.HttpHeaders.SESSION_TOKEN, options.getSessionToken()); } - if (options.enableScanInQuery() != null) { - headers.put(HttpConstants.HttpHeaders.ENABLE_SCAN_IN_QUERY, options.enableScanInQuery().toString()); + if (options.getEnableScanInQuery() != null) { + headers.put(HttpConstants.HttpHeaders.ENABLE_SCAN_IN_QUERY, options.getEnableScanInQuery().toString()); } - if (options.emitVerboseTracesInQuery() != null) { + if (options.getEmitVerboseTracesInQuery() != null) { headers.put(HttpConstants.HttpHeaders.EMIT_VERBOSE_TRACES_IN_QUERY, - options.emitVerboseTracesInQuery().toString()); + options.getEmitVerboseTracesInQuery().toString()); } - if (options.enableCrossPartitionQuery() != null) { + if (options.getEnableCrossPartitionQuery() != null) { headers.put(HttpConstants.HttpHeaders.ENABLE_CROSS_PARTITION_QUERY, - options.enableCrossPartitionQuery().toString()); + options.getEnableCrossPartitionQuery().toString()); } - if (options.maxDegreeOfParallelism() != 0) { + if (options.getMaxDegreeOfParallelism() != 0) { headers.put(HttpConstants.HttpHeaders.PARALLELIZE_CROSS_PARTITION_QUERY, Boolean.TRUE.toString()); } - if (options.responseContinuationTokenLimitInKb() > 0) { + if (options.setResponseContinuationTokenLimitInKb() > 0) { headers.put(HttpConstants.HttpHeaders.RESPONSE_CONTINUATION_TOKEN_LIMIT_IN_KB, - Strings.toString(options.responseContinuationTokenLimitInKb())); + Strings.toString(options.setResponseContinuationTokenLimitInKb())); } if (options.populateQueryMetrics()) { @@ -220,15 +220,15 @@ public static E setPartitionKeyRangeId(E e, St } public static boolean isEnableMultipleWriteLocations(DatabaseAccount account) { - return account.enableMultipleWriteLocations(); + return account.getEnableMultipleWriteLocations(); } public static boolean getUseMultipleWriteLocations(ConnectionPolicy policy) { - return policy.usingMultipleWriteLocations(); + return policy.getUsingMultipleWriteLocations(); } public static void setUseMultipleWriteLocations(ConnectionPolicy policy, boolean value) { - policy.usingMultipleWriteLocations(value); + policy.setUsingMultipleWriteLocations(value); } public static URI getRequestUri(CosmosClientException cosmosClientException) { @@ -262,11 +262,11 @@ public static ConsistencyPolicy getConsistencyPolicy(DatabaseAccount databaseAcc } public static String getAltLink(Resource resource) { - return resource.altLink(); + return resource.getAltLink(); } public static void setAltLink(Resource resource, String altLink) { - resource.altLink(altLink); + resource.setAltLink(altLink); } public static void setMaxReplicaSetSize(ReplicationPolicy replicationPolicy, int value) { @@ -328,7 +328,7 @@ public static Object getValue(JsonNode value) { } public static CosmosClientException setCosmosResponseDiagnostics(CosmosClientException cosmosClientException, CosmosResponseDiagnostics cosmosResponseDiagnostics) { - return cosmosClientException.cosmosResponseDiagnostics(cosmosResponseDiagnostics); + return cosmosClientException.setCosmosResponseDiagnostics(cosmosResponseDiagnostics); } public static CosmosClientException createCosmosClientException(int statusCode) { @@ -337,8 +337,8 @@ public static CosmosClientException createCosmosClientException(int statusCode) public static CosmosClientException createCosmosClientException(int statusCode, String errorMessage) { CosmosClientException cosmosClientException = new CosmosClientException(statusCode, errorMessage, null, null); - cosmosClientException.error(new CosmosError()); - cosmosClientException.error().set(Constants.Properties.MESSAGE, errorMessage); + cosmosClientException.setError(new CosmosError()); + cosmosClientException.getError().set(Constants.Properties.MESSAGE, errorMessage); return cosmosClientException; } @@ -353,7 +353,7 @@ public static CosmosClientException createCosmosClientException(int statusCode, public static CosmosClientException createCosmosClientException(String resourceAddress, int statusCode, CosmosError cosmosErrorResource, Map responseHeaders) { CosmosClientException cosmosClientException = new CosmosClientException(statusCode, cosmosErrorResource == null ? null : cosmosErrorResource.getMessage(), responseHeaders, null); cosmosClientException.resourceAddress = resourceAddress; - cosmosClientException.error(cosmosErrorResource); + cosmosClientException.setError(cosmosErrorResource); return cosmosClientException; } @@ -371,13 +371,13 @@ public static CosmosClientBuilder injectConfigs(CosmosClientBuilder cosmosClient return cosmosClientBuilder.configs(configs); } - public static String extractContainerSelfLink(CosmosContainer container) { + public static String extractContainerSelfLink(CosmosAsyncContainer container) { return container.getLink(); } - public static String extractResourceSelfLink(Resource resource) { return resource.selfLink(); } + public static String extractResourceSelfLink(Resource resource) { return resource.getSelfLink(); } - public static void setResourceSelfLink(Resource resource, String selfLink) { resource.selfLink(selfLink); } + public static void setResourceSelfLink(Resource resource, String selfLink) { resource.setSelfLink(selfLink); } public static void populatePropertyBagJsonSerializable(JsonSerializable jsonSerializable) { jsonSerializable.populatePropertyBag(); } @@ -386,7 +386,7 @@ public static void setMapper(JsonSerializable jsonSerializable, ObjectMapper om) } public static void setTimestamp(Resource resource, OffsetDateTime date) { - resource.timestamp(date); + resource.setTimestamp(date); } public static CosmosResponseDiagnostics createCosmosResponseDiagnostics() { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java index fa7a0587cf76..c957404fecb6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedOptions.java @@ -46,7 +46,7 @@ public ChangeFeedOptions(ChangeFeedOptions options) { * @return a string indicating the partition key range ID * @see PartitionKeyRange */ - String partitionKeyRangeId() { + String getPartitionKeyRangeId() { return partitionKeyRangeId; } @@ -62,7 +62,7 @@ String partitionKeyRangeId() { * @see PartitionKeyRange * @return the ChangeFeedOptions. */ - ChangeFeedOptions partitionKeyRangeId(String partitionKeyRangeId) { + ChangeFeedOptions setPartitionKeyRangeId(String partitionKeyRangeId) { this.partitionKeyRangeId = partitionKeyRangeId; return this; } @@ -74,7 +74,7 @@ ChangeFeedOptions partitionKeyRangeId(String partitionKeyRangeId) { * @return a boolean value indicating change feed should start from beginning or * not */ - public boolean startFromBeginning() { + public boolean getStartFromBeginning() { return startFromBeginning; } @@ -86,7 +86,7 @@ public boolean startFromBeginning() { * from beginning or not * @return the ChangeFeedOptions. */ - public ChangeFeedOptions startFromBeginning(boolean startFromBeginning) { + public ChangeFeedOptions setStartFromBeginning(boolean startFromBeginning) { this.startFromBeginning = startFromBeginning; return this; } @@ -97,7 +97,7 @@ public ChangeFeedOptions startFromBeginning(boolean startFromBeginning) { * @return a zoned date time to start looking for changes after, if set or null * otherwise */ - public OffsetDateTime startDateTime() { + public OffsetDateTime getStartDateTime() { return startDateTime; } @@ -108,7 +108,7 @@ public OffsetDateTime startDateTime() { * @param startDateTime a zoned date time to start looking for changes after. * @return the ChangeFeedOptions. */ - public ChangeFeedOptions startDateTime(OffsetDateTime startDateTime) { + public ChangeFeedOptions setStartDateTime(OffsetDateTime startDateTime) { this.startDateTime = startDateTime; return this; } @@ -119,7 +119,7 @@ public ChangeFeedOptions startDateTime(OffsetDateTime startDateTime) { * * @return the max number of items. */ - public Integer maxItemCount() { + public Integer getMaxItemCount() { return this.maxItemCount; } @@ -130,7 +130,7 @@ public Integer maxItemCount() { * @param maxItemCount the max number of items. * @return the FeedOptionsBase. */ - public ChangeFeedOptions maxItemCount(Integer maxItemCount) { + public ChangeFeedOptions setMaxItemCount(Integer maxItemCount) { this.maxItemCount = maxItemCount; return this; } @@ -140,7 +140,7 @@ public ChangeFeedOptions maxItemCount(Integer maxItemCount) { * * @return the request continuation. */ - public String requestContinuation() { + public String getRequestContinuation() { return this.requestContinuation; } @@ -151,7 +151,7 @@ public String requestContinuation() { * the request continuation. * @return the FeedOptionsBase. */ - public ChangeFeedOptions requestContinuation(String requestContinuation) { + public ChangeFeedOptions setRequestContinuation(String requestContinuation) { this.requestContinuation = requestContinuation; return this; } @@ -162,7 +162,7 @@ public ChangeFeedOptions requestContinuation(String requestContinuation) { * * @return the partition key. */ - public PartitionKey partitionKey() { + public PartitionKey getPartitionKey() { return this.partitionkey; } @@ -174,7 +174,7 @@ public PartitionKey partitionKey() { * the partition key value. * @return the FeedOptionsBase. */ - public ChangeFeedOptions partitionKey(PartitionKey partitionkey) { + public ChangeFeedOptions setPartitionKey(PartitionKey partitionkey) { this.partitionkey = partitionkey; return this; } @@ -184,7 +184,7 @@ public ChangeFeedOptions partitionKey(PartitionKey partitionkey) { * * @return Map of request options properties */ - public Map properties() { + public Map getProperties() { return properties; } @@ -194,7 +194,7 @@ public Map properties() { * @param properties the properties. * @return the FeedOptionsBase. */ - public ChangeFeedOptions properties(Map properties) { + public ChangeFeedOptions setProperties(Map properties) { this.properties = properties; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java similarity index 76% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java index 127691616ba5..7b19939dd9ed 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessor.java @@ -26,13 +26,13 @@ *

* {@code * ChangeFeedProcessor changeFeedProcessor = ChangeFeedProcessor.Builder() - * .hostName(hostName) - * .feedContainer(feedContainer) - * .leaseContainer(leaseContainer) - * .handleChanges(docs -> { + * .setHostName(setHostName) + * .setFeedContainer(setFeedContainer) + * .setLeaseContainer(setLeaseContainer) + * .setHandleChanges(docs -> { * // Implementation for handling and processing CosmosItemProperties list goes here * }) - * .build(); + * .buildAsyncClient(); * } */ public interface ChangeFeedProcessor { @@ -52,19 +52,19 @@ public interface ChangeFeedProcessor { Mono stop(); /** - * Helper static method to build {@link ChangeFeedProcessor} instances + * Helper static method to buildAsyncClient {@link ChangeFeedProcessor} instances * as logical representation of the Azure Cosmos DB database service. *

* {@code * * ChangeFeedProcessor.Builder() - * .hostName("SampleHost") - * .feedContainer(feedContainer) - * .leaseContainer(leaseContainer) - * .handleChanges(docs -> { + * .setHostName("SampleHost") + * .setFeedContainer(setFeedContainer) + * .setLeaseContainer(setLeaseContainer) + * .setHandleChanges(docs -> { * // Implementation for handling and processing CosmosItemProperties list goes here * }) - * .build(); + * .buildAsyncClient(); * } * * @return a builder definition instance. @@ -83,15 +83,15 @@ interface BuilderDefinition { * @param hostName the name to be used for the host. When using multiple hosts, each host must have a unique name. * @return current Builder. */ - BuilderDefinition hostName(String hostName); + BuilderDefinition setHostName(String hostName); /** - * Sets and existing {@link CosmosContainer} to be used to read from the monitored collection. + * Sets and existing {@link CosmosAsyncContainer} to be used to read from the monitored collection. * - * @param feedContainer the instance of {@link CosmosContainer} to be used. + * @param feedContainer the instance of {@link CosmosAsyncContainer} to be used. * @return current Builder. */ - BuilderDefinition feedContainer(CosmosContainer feedContainer); + BuilderDefinition setFeedContainer(CosmosAsyncContainer feedContainer); /** * Sets the {@link ChangeFeedProcessorOptions} to be used. @@ -107,7 +107,7 @@ interface BuilderDefinition { * @param changeFeedProcessorOptions the change feed processor options to use. * @return current Builder. */ - BuilderDefinition options(ChangeFeedProcessorOptions changeFeedProcessorOptions); + BuilderDefinition setOptions(ChangeFeedProcessorOptions changeFeedProcessorOptions); /** * Sets a consumer function which will be called to process changes. @@ -115,15 +115,15 @@ interface BuilderDefinition { * @param consumer the consumer of {@link ChangeFeedObserver} to call for handling the feeds. * @return current Builder. */ - BuilderDefinition handleChanges(Consumer> consumer); + BuilderDefinition setHandleChanges(Consumer> consumer); /** - * Sets an existing {@link CosmosContainer} to be used to read from the leases collection. + * Sets an existing {@link CosmosAsyncContainer} to be used to read from the leases collection. * - * @param leaseContainer the instance of {@link CosmosContainer} to use. + * @param leaseContainer the instance of {@link CosmosAsyncContainer} to use. * @return current Builder. */ - BuilderDefinition leaseContainer(CosmosContainer leaseContainer); + BuilderDefinition setLeaseContainer(CosmosAsyncContainer leaseContainer); /** * Builds a new instance of the {@link ChangeFeedProcessor} with the specified configuration asynchronously. diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java index 6d2686bba32f..fcca233c881d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ChangeFeedProcessorOptions.java @@ -43,7 +43,7 @@ public ChangeFeedProcessorOptions() { * * @return the renew interval for all leases for partitions. */ - public Duration leaseRenewInterval() { + public Duration getLeaseRenewInterval() { return this.leaseRenewInterval; } @@ -53,7 +53,7 @@ public Duration leaseRenewInterval() { * @param leaseRenewInterval the renew interval for all leases for partitions currently held by {@link ChangeFeedProcessor} instance. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions leaseRenewInterval(Duration leaseRenewInterval) { + public ChangeFeedProcessorOptions setLeaseRenewInterval(Duration leaseRenewInterval) { this.leaseRenewInterval = leaseRenewInterval; return this; } @@ -63,7 +63,7 @@ public ChangeFeedProcessorOptions leaseRenewInterval(Duration leaseRenewInterval * * @return the interval to kick off a task to compute if partitions are distributed evenly among known host instances. */ - public Duration leaseAcquireInterval() { + public Duration getLeaseAcquireInterval() { return this.leaseAcquireInterval; } @@ -72,7 +72,7 @@ public Duration leaseAcquireInterval() { * @param leaseAcquireInterval he interval to kick off a task to compute if partitions are distributed evenly among known host instances. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions leaseAcquireInterval(Duration leaseAcquireInterval) { + public ChangeFeedProcessorOptions setLeaseAcquireInterval(Duration leaseAcquireInterval) { this.leaseAcquireInterval = leaseAcquireInterval; return this; } @@ -86,7 +86,7 @@ public ChangeFeedProcessorOptions leaseAcquireInterval(Duration leaseAcquireInte * * @return the interval for which the lease is taken on a lease representing a partition. */ - public Duration leaseExpirationInterval() { + public Duration getLeaseExpirationInterval() { return this.leaseExpirationInterval; } @@ -100,7 +100,7 @@ public Duration leaseExpirationInterval() { * @param leaseExpirationInterval the interval for which the lease is taken on a lease representing a partition. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions leaseExpirationInterval(Duration leaseExpirationInterval) { + public ChangeFeedProcessorOptions setLeaseExpirationInterval(Duration leaseExpirationInterval) { this.leaseExpirationInterval = leaseExpirationInterval; return this; } @@ -110,7 +110,7 @@ public ChangeFeedProcessorOptions leaseExpirationInterval(Duration leaseExpirati * * @return the delay in between polling a partition for new changes on the feed. */ - public Duration feedPollDelay() { + public Duration getFeedPollDelay() { return this.feedPollDelay; } @@ -120,7 +120,7 @@ public Duration feedPollDelay() { * @param feedPollDelay the delay in between polling a partition for new changes on the feed, after all current changes are drained. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions feedPollDelay(Duration feedPollDelay) { + public ChangeFeedProcessorOptions setFeedPollDelay(Duration feedPollDelay) { this.feedPollDelay = feedPollDelay; return this; } @@ -133,7 +133,7 @@ public ChangeFeedProcessorOptions feedPollDelay(Duration feedPollDelay) { * * @return a prefix to be used as part of the lease ID. */ - public String leasePrefix() { + public String getLeasePrefix() { return this.leasePrefix; } @@ -143,7 +143,7 @@ public String leasePrefix() { * @param leasePrefix a prefix to be used as part of the lease ID. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions leasePrefix(String leasePrefix) { + public ChangeFeedProcessorOptions setLeasePrefix(String leasePrefix) { this.leasePrefix = leasePrefix; return this; } @@ -153,7 +153,7 @@ public ChangeFeedProcessorOptions leasePrefix(String leasePrefix) { * * @return the maximum number of items to be returned in the enumeration operation in the Azure Cosmos DB service. */ - public int maxItemCount() { + public int getMaxItemCount() { return this.maxItemCount; } @@ -163,7 +163,7 @@ public int maxItemCount() { * @param maxItemCount the maximum number of items to be returned in the enumeration operation. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions maxItemCount(int maxItemCount) { + public ChangeFeedProcessorOptions setMaxItemCount(int maxItemCount) { this.maxItemCount = maxItemCount; return this; } @@ -176,7 +176,7 @@ public ChangeFeedProcessorOptions maxItemCount(int maxItemCount) { * * @return the start request continuation token to start looking for changes after. */ - public String startContinuation() { + public String getStartContinuation() { return this.startContinuation; } @@ -189,7 +189,7 @@ public String startContinuation() { * @param startContinuation the start request continuation token to start looking for changes after. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions startContinuation(String startContinuation) { + public ChangeFeedProcessorOptions setStartContinuation(String startContinuation) { this.startContinuation= startContinuation; return this; } @@ -204,7 +204,7 @@ public ChangeFeedProcessorOptions startContinuation(String startContinuation) { * * @return the time (exclusive) to start looking for changes after. */ - public OffsetDateTime startTime() { + public OffsetDateTime getStartTime() { return this.startTime; } @@ -219,7 +219,7 @@ public OffsetDateTime startTime() { * @param startTime the time (exclusive) to start looking for changes after. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions startTime(OffsetDateTime startTime) { + public ChangeFeedProcessorOptions setStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -235,7 +235,7 @@ public ChangeFeedProcessorOptions startTime(OffsetDateTime startTime) { * * @return a value indicating whether change feed in the Azure Cosmos DB service should start from. */ - public boolean startFromBeginning() { + public boolean getStartFromBeginning() { return this.startFromBeginning; } @@ -250,7 +250,7 @@ public boolean startFromBeginning() { * @param startFromBeginning Indicates to start from beginning if true * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions startFromBeginning(boolean startFromBeginning) { + public ChangeFeedProcessorOptions setStartFromBeginning(boolean startFromBeginning) { this.startFromBeginning = startFromBeginning; return this; } @@ -263,7 +263,7 @@ public ChangeFeedProcessorOptions startFromBeginning(boolean startFromBeginning) * * @return the minimum scale count for the host. */ - public int minScaleCount() { + public int getMinScaleCount() { return this.minScaleCount; } @@ -276,7 +276,7 @@ public int minScaleCount() { * @param minScaleCount the minimum partition count for the host. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions minScaleCount(int minScaleCount) { + public ChangeFeedProcessorOptions setMinScaleCount(int minScaleCount) { this.minScaleCount = minScaleCount; return this; } @@ -289,7 +289,7 @@ public ChangeFeedProcessorOptions minScaleCount(int minScaleCount) { * * @return the maximum number of partitions the host can serve. */ - public int maxScaleCount() { + public int getMaxScaleCount() { return this.maxScaleCount; } @@ -299,7 +299,7 @@ public int maxScaleCount() { * @param maxScaleCount the maximum number of partitions the host can serve. * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions maxScaleCount(int maxScaleCount) { + public ChangeFeedProcessorOptions setMaxScaleCount(int maxScaleCount) { this.maxScaleCount = maxScaleCount; return this; } @@ -310,7 +310,7 @@ public ChangeFeedProcessorOptions maxScaleCount(int maxScaleCount) { * * @return a value indicating whether on start of the host all existing leases should be deleted and the host should start from scratch. */ - public boolean discardExistingLeases() { + public boolean getDiscardExistingLeases() { return this.discardExistingLeases; } @@ -321,7 +321,7 @@ public boolean discardExistingLeases() { * @param discardExistingLeases Indicates whether to discard all existing leases if true * @return the current ChangeFeedProcessorOptions instance. */ - public ChangeFeedProcessorOptions discardExistingLeases(boolean discardExistingLeases) { + public ChangeFeedProcessorOptions setDiscardExistingLeases(boolean discardExistingLeases) { this.discardExistingLeases = discardExistingLeases; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ClientSideRequestStatistics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ClientSideRequestStatistics.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ClientSideRequestStatistics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ClientSideRequestStatistics.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java similarity index 52% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java index ce7273c3cacf..400c157f77cf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CommonsBridgeInternal.java @@ -5,46 +5,46 @@ public class CommonsBridgeInternal { public static boolean isV2(PartitionKeyDefinition pkd) { - return pkd.version() != null && PartitionKeyDefinitionVersion.V2.val == pkd.version().val; + return pkd.getVersion() != null && PartitionKeyDefinitionVersion.V2.val == pkd.getVersion().val; } public static void setV2(PartitionKeyDefinition pkd) { - pkd.version(PartitionKeyDefinitionVersion.V2); + pkd.setVersion(PartitionKeyDefinitionVersion.V2); } /** - * Gets the partitionKeyRangeId. + * Gets the getPartitionKeyRangeId. * - * @return the partitionKeyRangeId. + * @return the getPartitionKeyRangeId. */ public static String partitionKeyRangeIdInternal(FeedOptions options) { - return options.partitionKeyRangeIdInternal(); + return options.getPartitionKeyRangeIdInternal(); } /** - * Gets the partitionKeyRangeId. + * Gets the getPartitionKeyRangeId. * - * @return the partitionKeyRangeId. + * @return the getPartitionKeyRangeId. */ public static String partitionKeyRangeIdInternal(ChangeFeedOptions options) { - return options.partitionKeyRangeId(); + return options.getPartitionKeyRangeId(); } /** - * Sets the partitionKeyRangeId. + * Sets the getPartitionKeyRangeId. * - * @return the partitionKeyRangeId. + * @return the getPartitionKeyRangeId. */ public static FeedOptions partitionKeyRangeIdInternal(FeedOptions options, String partitionKeyRangeId) { - return options.partitionKeyRangeIdInternal(partitionKeyRangeId); + return options.setPartitionKeyRangeIdInternal(partitionKeyRangeId); } /** - * Sets the partitionKeyRangeId. + * Sets the getPartitionKeyRangeId. * - * @return the partitionKeyRangeId. + * @return the getPartitionKeyRangeId. */ public static ChangeFeedOptions partitionKeyRangeIdInternal(ChangeFeedOptions options, String partitionKeyRangeId) { - return options.partitionKeyRangeId(partitionKeyRangeId); + return options.setPartitionKeyRangeId(partitionKeyRangeId); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java index 3cc94f9fc300..a8b0731e3dc2 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePath.java @@ -34,7 +34,7 @@ public CompositePath(String jsonString) { * * @return the path. */ - public String path() { + public String getPath() { return super.getString(Constants.Properties.PATH); } @@ -44,7 +44,7 @@ public String path() { * @param path the path. * @return the CompositePath. */ - public CompositePath path(String path) { + public CompositePath setPath(String path) { super.set(Constants.Properties.PATH, path); return this; } @@ -57,13 +57,13 @@ public CompositePath path(String path) { * * @return the sort order. */ - public CompositePathSortOrder order() { + public CompositePathSortOrder getOrder() { String strValue = super.getString(Constants.Properties.ORDER); if (!StringUtils.isEmpty(strValue)) { try { return CompositePathSortOrder.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.ORDER))); } catch (IllegalArgumentException e) { - this.getLogger().warn("INVALID indexingMode value {}.", super.getString(Constants.Properties.ORDER)); + this.getLogger().warn("INVALID getIndexingMode getValue {}.", super.getString(Constants.Properties.ORDER)); return CompositePathSortOrder.ASCENDING; } } @@ -79,7 +79,7 @@ public CompositePathSortOrder order() { * @param order the sort order. * @return the CompositePath. */ - public CompositePath order(CompositePathSortOrder order) { + public CompositePath setOrder(CompositePathSortOrder order) { super.set(Constants.Properties.ORDER, order.toString()); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePathSortOrder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePathSortOrder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePathSortOrder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CompositePathSortOrder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionMode.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionMode.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionMode.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java index 215acb251077..bfb4894d468e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConflictResolutionPolicy.java @@ -17,10 +17,10 @@ * A collection with custom conflict resolution with no user-registered stored procedure. *

{@code
  * DocumentCollection collectionSpec = new DocumentCollection();
- * collectionSpec.id("Multi-master collection");
+ * collectionSpec.getId("Multi-master collection");
  *
  * ConflictResolutionPolicy policy = ConflictResolutionPolicy.createCustomPolicy();
- * collectionSpec.conflictResolutionPolicy(policy);
+ * collectionSpec.getConflictResolutionPolicy(policy);
  *
  * DocumentCollection collection = client.createCollection(databaseLink, collectionSpec, null)
  *         .toBlocking().single().getResource();
@@ -31,10 +31,10 @@
  * A collection with custom conflict resolution with a user-registered stored procedure.
  * 
{@code
  * DocumentCollection collectionSpec = new DocumentCollection();
- * collectionSpec.id("Multi-master collection");
+ * collectionSpec.getId("Multi-master collection");
  *
  * ConflictResolutionPolicy policy = ConflictResolutionPolicy.createCustomPolicy(conflictResolutionSprocName);
- * collectionSpec.conflictResolutionPolicy(policy);
+ * collectionSpec.getConflictResolutionPolicy(policy);
  *
  * DocumentCollection collection = client.createCollection(databaseLink, collectionSpec, null)
  *         .toBlocking().single().getResource();
@@ -46,10 +46,10 @@
  * A collection with custom conflict resolution with a user-registered stored procedure.
  * 
{@code
  * DocumentCollection collectionSpec = new DocumentCollection();
- * collectionSpec.id("Multi-master collection");
+ * collectionSpec.getId("Multi-master collection");
  *
  * ConflictResolutionPolicy policy = ConflictResolutionPolicy.createLastWriterWinsPolicy("/path/for/conflict/resolution");
- * collectionSpec.conflictResolutionPolicy(policy);
+ * collectionSpec.getConflictResolutionPolicy(policy);
  *
  * DocumentCollection collection = client.createCollection(databaseLink, collectionSpec, null)
  *         .toBlocking().single().getResource();
@@ -64,12 +64,13 @@ public class ConflictResolutionPolicy extends JsonSerializable {
      *
      * In case of a conflict occurring on a document, the document with the higher integer value in the default path
      * {@link Resource#timestamp()}, i.e., "/_ts" will be used.
+     * {@link Resource#getTimestamp()}, i.e., "/_ts" will be used.
      *
      * @return ConflictResolutionPolicy.
      */
     public static ConflictResolutionPolicy createLastWriterWinsPolicy() {
         ConflictResolutionPolicy policy = new ConflictResolutionPolicy();
-        policy.mode(ConflictResolutionMode.LAST_WRITER_WINS);
+        policy.setMode(ConflictResolutionMode.LAST_WRITER_WINS);
         return policy;
     }
 
@@ -87,9 +88,9 @@ public static ConflictResolutionPolicy createLastWriterWinsPolicy() {
      */
     public static ConflictResolutionPolicy createLastWriterWinsPolicy(String conflictResolutionPath) {
         ConflictResolutionPolicy policy = new ConflictResolutionPolicy();
-        policy.mode(ConflictResolutionMode.LAST_WRITER_WINS);
+        policy.setMode(ConflictResolutionMode.LAST_WRITER_WINS);
         if (conflictResolutionPath != null) {
-            policy.conflictResolutionPath(conflictResolutionPath);
+            policy.setConflictResolutionPath(conflictResolutionPath);
         }
         return policy;
     }
@@ -110,9 +111,9 @@ public static ConflictResolutionPolicy createLastWriterWinsPolicy(String conflic
      */
     public static ConflictResolutionPolicy createCustomPolicy(String conflictResolutionSprocName) {
         ConflictResolutionPolicy policy = new ConflictResolutionPolicy();
-        policy.mode(ConflictResolutionMode.CUSTOM);
+        policy.setMode(ConflictResolutionMode.CUSTOM);
         if (conflictResolutionSprocName != null) {
-            policy.conflictResolutionProcedure(conflictResolutionSprocName);
+            policy.setConflictResolutionProcedure(conflictResolutionSprocName);
         }
         return policy;
     }
@@ -127,7 +128,7 @@ public static ConflictResolutionPolicy createCustomPolicy(String conflictResolut
      */
     public static ConflictResolutionPolicy createCustomPolicy() {
         ConflictResolutionPolicy policy = new ConflictResolutionPolicy();
-        policy.mode(ConflictResolutionMode.CUSTOM);
+        policy.setMode(ConflictResolutionMode.CUSTOM);
         return policy;
     }
 
@@ -146,7 +147,7 @@ public ConflictResolutionPolicy(String jsonString) {
      *
      * @return ConflictResolutionMode.
      */
-    public ConflictResolutionMode mode() {
+    public ConflictResolutionMode getMode() {
 
         String strValue = super.getString(Constants.Properties.MODE);
 
@@ -154,7 +155,7 @@ public ConflictResolutionMode mode() {
             try {
                 return ConflictResolutionMode.valueOf(Strings.fromCamelCaseToUpperCase(super.getString(Constants.Properties.MODE)));
             } catch (IllegalArgumentException e) {
-                this.getLogger().warn("INVALID ConflictResolutionMode value {}.", super.getString(Constants.Properties.MODE));
+                this.getLogger().warn("INVALID ConflictResolutionMode getValue {}.", super.getString(Constants.Properties.MODE));
                 return ConflictResolutionMode.INVALID;
             }
         }
@@ -168,7 +169,7 @@ public ConflictResolutionMode mode() {
      *
      * @param mode One of the values of the {@link ConflictResolutionMode} enum.
      */
-    ConflictResolutionPolicy mode(ConflictResolutionMode mode) {
+    ConflictResolutionPolicy setMode(ConflictResolutionMode mode) {
         super.set(Constants.Properties.MODE, mode.toString());
         return this;
     }
@@ -184,7 +185,7 @@ ConflictResolutionPolicy mode(ConflictResolutionMode mode) {
      * @return The path to check values for last-writer wins conflict resolution.
      * That path is a rooted path of the property in the document, such as "/name/first".
      */
-    public String conflictResolutionPath() {
+    public String getConflictResolutionPath() {
         return super.getString(Constants.Properties.CONFLICT_RESOLUTION_PATH);
     }
 
@@ -199,7 +200,7 @@ public String conflictResolutionPath() {
      * @param value The path to check values for last-writer wins conflict resolution.
      *              That path is a rooted path of the property in the document, such as "/name/first".
      */
-    ConflictResolutionPolicy conflictResolutionPath(String value) {
+    ConflictResolutionPolicy setConflictResolutionPath(String value) {
         super.set(Constants.Properties.CONFLICT_RESOLUTION_PATH, value);
         return this;
     }
@@ -217,11 +218,11 @@ ConflictResolutionPolicy conflictResolutionPath(String value) {
      **
      * @return the stored procedure to perform conflict resolution.]
      */
-    public String conflictResolutionProcedure() {
+    public String getConflictResolutionProcedure() {
         return super.getString(Constants.Properties.CONFLICT_RESOLUTION_PROCEDURE);
     }
 
-    ConflictResolutionPolicy conflictResolutionProcedure(String value) {
+    ConflictResolutionPolicy setConflictResolutionProcedure(String value) {
         super.set(Constants.Properties.CONFLICT_RESOLUTION_PROCEDURE, value);
         return this;
     }
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionMode.java
similarity index 100%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionMode.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionMode.java
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java
similarity index 88%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java
index 328a3453d1b6..e33cc2df291e 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConnectionPolicy.java
@@ -53,7 +53,7 @@ public ConnectionPolicy() {
      *
      * @return the default connection policy.
      */
-    public static ConnectionPolicy defaultPolicy() {
+    public static ConnectionPolicy getDefaultPolicy() {
         if (ConnectionPolicy.default_policy == null) {
             ConnectionPolicy.default_policy = new ConnectionPolicy();
         }
@@ -66,7 +66,7 @@ public static ConnectionPolicy defaultPolicy() {
      *
      * @return the request timeout in milliseconds.
      */
-    public int requestTimeoutInMillis() {
+    public int getRequestTimeoutInMillis() {
         return this.requestTimeoutInMillis;
     }
 
@@ -77,7 +77,7 @@ public int requestTimeoutInMillis() {
      * @param requestTimeoutInMillis the request timeout in milliseconds.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy requestTimeoutInMillis(int requestTimeoutInMillis) {
+    public ConnectionPolicy setRequestTimeoutInMillis(int requestTimeoutInMillis) {
         this.requestTimeoutInMillis = requestTimeoutInMillis;
         return this;
     }
@@ -87,7 +87,7 @@ public ConnectionPolicy requestTimeoutInMillis(int requestTimeoutInMillis) {
      *
      * @return the connection mode.
      */
-    public ConnectionMode connectionMode() {
+    public ConnectionMode getConnectionMode() {
         return this.connectionMode;
     }
 
@@ -97,7 +97,7 @@ public ConnectionMode connectionMode() {
      * @param connectionMode the connection mode.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy connectionMode(ConnectionMode connectionMode) {
+    public ConnectionPolicy setConnectionMode(ConnectionMode connectionMode) {
         this.connectionMode = connectionMode;
         return this;
     }
@@ -107,7 +107,7 @@ public ConnectionPolicy connectionMode(ConnectionMode connectionMode) {
      *
      * @return connection pool size.
      */
-    public int maxPoolSize() {
+    public int getMaxPoolSize() {
         return this.maxPoolSize;
     }
 
@@ -118,7 +118,7 @@ public int maxPoolSize() {
      * @param maxPoolSize The value of the connection pool size.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy maxPoolSize(int maxPoolSize) {
+    public ConnectionPolicy setMaxPoolSize(int maxPoolSize) {
         this.maxPoolSize = maxPoolSize;
         return this;
     }
@@ -129,7 +129,7 @@ public ConnectionPolicy maxPoolSize(int maxPoolSize) {
      *
      * @return Idle connection timeout.
      */
-    public int idleConnectionTimeoutInMillis() {
+    public int getIdleConnectionTimeoutInMillis() {
         return this.idleConnectionTimeoutInMillis;
     }
 
@@ -140,7 +140,7 @@ public int idleConnectionTimeoutInMillis() {
      * @param idleConnectionTimeoutInMillis the timeout for an idle connection in seconds.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy idleConnectionTimeoutInMillis(int idleConnectionTimeoutInMillis) {
+    public ConnectionPolicy setIdleConnectionTimeoutInMillis(int idleConnectionTimeoutInMillis) {
         this.idleConnectionTimeoutInMillis = idleConnectionTimeoutInMillis;
         return this;
     }
@@ -150,7 +150,7 @@ public ConnectionPolicy idleConnectionTimeoutInMillis(int idleConnectionTimeoutI
      *
      * @return the value of user-agent suffix.
      */
-    public String userAgentSuffix() {
+    public String getUserAgentSuffix() {
         return this.userAgentSuffix;
     }
 
@@ -161,7 +161,7 @@ public String userAgentSuffix() {
      *                        used for monitoring purposes.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy userAgentSuffix(String userAgentSuffix) {
+    public ConnectionPolicy setUserAgentSuffix(String userAgentSuffix) {
         this.userAgentSuffix = userAgentSuffix;
         return this;
     }
@@ -171,7 +171,7 @@ public ConnectionPolicy userAgentSuffix(String userAgentSuffix) {
      *
      * @return the RetryOptions instance.
      */
-    public RetryOptions retryOptions() {
+    public RetryOptions getRetryOptions() {
         return this.retryOptions;
     }
 
@@ -186,7 +186,7 @@ public RetryOptions retryOptions() {
      * @param retryOptions the RetryOptions instance.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy retryOptions(RetryOptions retryOptions) {
+    public ConnectionPolicy setRetryOptions(RetryOptions retryOptions) {
         if (retryOptions == null) {
             throw new IllegalArgumentException("retryOptions value must not be null.");
         }
@@ -200,7 +200,7 @@ public ConnectionPolicy retryOptions(RetryOptions retryOptions) {
      *
      * @return whether endpoint discovery is enabled.
      */
-    public boolean enableEndpointDiscovery() {
+    public boolean getEnableEndpointDiscovery() {
         return this.enableEndpointDiscovery;
     }
 
@@ -216,7 +216,7 @@ public boolean enableEndpointDiscovery() {
      * @param enableEndpointDiscovery true if EndpointDiscovery is enabled.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy enableEndpointDiscovery(boolean enableEndpointDiscovery) {
+    public ConnectionPolicy setEnableEndpointDiscovery(boolean enableEndpointDiscovery) {
         this.enableEndpointDiscovery = enableEndpointDiscovery;
         return this;
     }
@@ -235,7 +235,7 @@ public ConnectionPolicy enableEndpointDiscovery(boolean enableEndpointDiscovery)
      *
      * @return flag to enable writes on any locations (regions) for geo-replicated database accounts.
      */
-    public boolean usingMultipleWriteLocations() {
+    public boolean getUsingMultipleWriteLocations() {
         return this.usingMultipleWriteLocations;
     }
 
@@ -251,7 +251,7 @@ public boolean usingMultipleWriteLocations() {
      *
      * @return flag to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service.
      */
-    public Boolean enableReadRequestsFallback() {
+    public Boolean getEnableReadRequestsFallback() {
         return this.enableReadRequestsFallback;
     }
 
@@ -270,7 +270,7 @@ public Boolean enableReadRequestsFallback() {
      * @param usingMultipleWriteLocations flag to enable writes on any locations (regions) for geo-replicated database accounts.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy usingMultipleWriteLocations(boolean usingMultipleWriteLocations) {
+    public ConnectionPolicy setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations) {
         this.usingMultipleWriteLocations = usingMultipleWriteLocations;
         return this;
     }
@@ -288,7 +288,7 @@ public ConnectionPolicy usingMultipleWriteLocations(boolean usingMultipleWriteLo
      * @param enableReadRequestsFallback flag to enable reads to go to multiple regions configured on an account of Azure Cosmos DB service.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy enableReadRequestsFallback(Boolean enableReadRequestsFallback) {
+    public ConnectionPolicy setEnableReadRequestsFallback(Boolean enableReadRequestsFallback) {
         this.enableReadRequestsFallback = enableReadRequestsFallback;
         return this;
     }
@@ -298,7 +298,7 @@ public ConnectionPolicy enableReadRequestsFallback(Boolean enableReadRequestsFal
      *
      * @return the list of preferred location.
      */
-    public List preferredLocations() {
+    public List getPreferredLocations() {
         return this.preferredLocations != null ? preferredLocations : Collections.emptyList();
     }
 
@@ -315,7 +315,7 @@ public List preferredLocations() {
      * @param preferredLocations the list of preferred locations.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy preferredLocations(List preferredLocations) {
+    public ConnectionPolicy setPreferredLocations(List preferredLocations) {
         this.preferredLocations = preferredLocations;
         return this;
     }
@@ -325,7 +325,7 @@ public ConnectionPolicy preferredLocations(List preferredLocations) {
      *
      * @return the value of proxyHost.
      */
-    public InetSocketAddress proxy() {
+    public InetSocketAddress getProxy() {
         return this.inetSocketProxyAddress;
     }
 
@@ -336,7 +336,7 @@ public InetSocketAddress proxy() {
      * @param proxyPort The proxy server port.
      * @return the ConnectionPolicy.
      */
-    public ConnectionPolicy proxy(String proxyHost, int proxyPort) {
+    public ConnectionPolicy setProxy(String proxyHost, int proxyPort) {
         this.inetSocketProxyAddress = new InetSocketAddress(proxyHost, proxyPort);
         return this;
     }
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyLevel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyLevel.java
similarity index 100%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyLevel.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyLevel.java
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java
similarity index 89%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java
index 17f12bf13097..1fa944c8e8df 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java
@@ -38,7 +38,7 @@ public ConsistencyPolicy() {
      *
      * @return the default consistency level.
      */
-    public ConsistencyLevel defaultConsistencyLevel() {
+    public ConsistencyLevel getDefaultConsistencyLevel() {
 
         ConsistencyLevel result = ConsistencyPolicy.DEFAULT_DEFAULT_CONSISTENCY_LEVEL;
         try {
@@ -57,7 +57,7 @@ public ConsistencyLevel defaultConsistencyLevel() {
      * @param level the consistency level.
      * @return the ConsistenctPolicy.
      */
-    public ConsistencyPolicy defaultConsistencyLevel(ConsistencyLevel level) {
+    public ConsistencyPolicy setDefaultConsistencyLevel(ConsistencyLevel level) {
         super.set(Constants.Properties.DEFAULT_CONSISTENCY_LEVEL, level.toString());
         return this;
     }
@@ -68,7 +68,7 @@ public ConsistencyPolicy defaultConsistencyLevel(ConsistencyLevel level) {
      *
      * @return the max staleness prefix.
      */
-    public int maxStalenessPrefix() {
+    public int getMaxStalenessPrefix() {
         Integer value = super.getInt(Constants.Properties.MAX_STALENESS_PREFIX);
         if (value == null) {
             return ConsistencyPolicy.DEFAULT_MAX_STALENESS_PREFIX;
@@ -83,7 +83,7 @@ public int maxStalenessPrefix() {
      * @param maxStalenessPrefix the max staleness prefix.
      * @return the ConsistenctPolicy.
      */
-    public ConsistencyPolicy maxStalenessPrefix(int maxStalenessPrefix) {
+    public ConsistencyPolicy setMaxStalenessPrefix(int maxStalenessPrefix) {
         super.set(Constants.Properties.MAX_STALENESS_PREFIX, maxStalenessPrefix);
         return this;
     }
@@ -93,7 +93,7 @@ public ConsistencyPolicy maxStalenessPrefix(int maxStalenessPrefix) {
      *
      * @return the max staleness prefix.
      */
-    public int maxStalenessIntervalInSeconds() {
+    public int getMaxStalenessIntervalInSeconds() {
         Integer value = super.getInt(Constants.Properties.MAX_STALENESS_INTERVAL_IN_SECONDS);
         if (value == null) {
             return ConsistencyPolicy.DEFAULT_MAX_STALENESS_INTERVAL;
@@ -107,7 +107,7 @@ public int maxStalenessIntervalInSeconds() {
      * @param maxStalenessIntervalInSeconds the max staleness interval in seconds.
      * @return the ConsistenctPolicy.
      */
-    public ConsistencyPolicy maxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds) {
+    public ConsistencyPolicy setMaxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds) {
         super.set(Constants.Properties.MAX_STALENESS_INTERVAL_IN_SECONDS, maxStalenessIntervalInSeconds);
         return this;
     }
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncClient.java
similarity index 80%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncClient.java
index 2740ead28186..fbf7859a64a6 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncClient.java
@@ -2,6 +2,7 @@
 // Licensed under the MIT License.
 package com.azure.data.cosmos;
 
+import com.azure.core.implementation.annotation.ServiceClient;
 import com.azure.data.cosmos.internal.AsyncDocumentClient;
 import com.azure.data.cosmos.internal.Configs;
 import com.azure.data.cosmos.internal.Database;
@@ -19,7 +20,10 @@
  * This asynchronous client is used to configure and execute requests
  * against the service.
  */
-public class CosmosClient implements AutoCloseable {
+@ServiceClient(
+    builder=CosmosClientBuilder.class,
+    isAsync = true)
+public class CosmosAsyncClient implements AutoCloseable {
 
     // Async document client wrapper
     private final Configs configs;
@@ -33,15 +37,15 @@ public class CosmosClient implements AutoCloseable {
     private final CosmosKeyCredential cosmosKeyCredential;
 
 
-     CosmosClient(CosmosClientBuilder builder) {
+     CosmosAsyncClient(CosmosClientBuilder builder) {
          this.configs = builder.configs();
-         this.serviceEndpoint = builder.endpoint();
-         this.keyOrResourceToken = builder.key();
-         this.connectionPolicy = builder.connectionPolicy();
-         this.desiredConsistencyLevel = builder.consistencyLevel();
-         this.permissions = builder.permissions();
-         this.tokenResolver = builder.tokenResolver();
-         this.cosmosKeyCredential = builder.cosmosKeyCredential();
+         this.serviceEndpoint = builder.getEndpoint();
+         this.keyOrResourceToken = builder.getKey();
+         this.connectionPolicy = builder.getConnectionPolicy();
+         this.desiredConsistencyLevel = builder.getConsistencyLevel();
+         this.permissions = builder.getPermissions();
+         this.tokenResolver = builder.getTokenResolver();
+         this.cosmosKeyCredential = builder.getCosmosKeyCredential();
          this.asyncDocumentClient = new AsyncDocumentClient.Builder()
              .withServiceEndpoint(this.serviceEndpoint)
              .withMasterKeyOrResourceToken(this.keyOrResourceToken)
@@ -58,7 +62,7 @@ AsyncDocumentClient getContextClient() {
     }
 
     /**
-     * Instantiate the cosmos client builder to build cosmos client
+     * Instantiate the cosmos client builder to buildAsyncClient cosmos client
      * @return {@link CosmosClientBuilder}
      */
     public static CosmosClientBuilder builder(){
@@ -69,7 +73,7 @@ public static CosmosClientBuilder builder(){
      * Monitor Cosmos client performance and resource utilization using the specified meter registry
      * @param registry  meter registry to use for performance monitoring
      */
-    static void monitorTelemetry(MeterRegistry registry) {
+    static void setMonitorTelemetry(MeterRegistry registry) {
         RntbdMetrics.add(registry);
     }
 
@@ -150,8 +154,8 @@ CosmosKeyCredential cosmosKeyCredential() {
      * @return a {@link Mono} containing the cosmos database response with the created or existing database or
      * an error.
      */
-    public Mono createDatabaseIfNotExists(CosmosDatabaseProperties databaseSettings) {
-        return createDatabaseIfNotExistsInternal(getDatabase(databaseSettings.id()));
+    public Mono createDatabaseIfNotExists(CosmosDatabaseProperties databaseSettings) {
+        return createDatabaseIfNotExistsInternal(getDatabase(databaseSettings.getId()));
     }
 
     /**
@@ -162,16 +166,16 @@ public Mono createDatabaseIfNotExists(CosmosDatabaseProp
      * @return a {@link Mono} containing the cosmos database response with the created or existing database or
      * an error
      */
-    public Mono createDatabaseIfNotExists(String id) {
+    public Mono createDatabaseIfNotExists(String id) {
         return createDatabaseIfNotExistsInternal(getDatabase(id));
     }
 
-    private Mono createDatabaseIfNotExistsInternal(CosmosDatabase database){
+    private Mono createDatabaseIfNotExistsInternal(CosmosAsyncDatabase database){
         return database.read().onErrorResume(exception -> {
             if (exception instanceof CosmosClientException) {
                 CosmosClientException cosmosClientException = (CosmosClientException) exception;
-                if (cosmosClientException.statusCode() == HttpConstants.StatusCodes.NOTFOUND) {
-                    return createDatabase(new CosmosDatabaseProperties(database.id()), new CosmosDatabaseRequestOptions());
+                if (cosmosClientException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) {
+                    return createDatabase(new CosmosDatabaseProperties(database.getId()), new CosmosDatabaseRequestOptions());
                 }
             }
             return Mono.error(exception);
@@ -190,15 +194,15 @@ private Mono createDatabaseIfNotExistsInternal(CosmosDat
      * @param options {@link CosmosDatabaseRequestOptions}
      * @return an {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(CosmosDatabaseProperties databaseSettings,
-                                                       CosmosDatabaseRequestOptions options) {
+    public Mono createDatabase(CosmosDatabaseProperties databaseSettings,
+                                                            CosmosDatabaseRequestOptions options) {
         if (options == null) {
             options = new CosmosDatabaseRequestOptions();
         }
         Database wrappedDatabase = new Database();
-        wrappedDatabase.id(databaseSettings.id());
+        wrappedDatabase.setId(databaseSettings.getId());
         return asyncDocumentClient.createDatabase(wrappedDatabase, options.toRequestOptions()).map(databaseResourceResponse ->
-                new CosmosDatabaseResponse(databaseResourceResponse, this)).single();
+                new CosmosAsyncDatabaseResponse(databaseResourceResponse, this)).single();
     }
 
     /**
@@ -212,7 +216,7 @@ public Mono createDatabase(CosmosDatabaseProperties data
      * @param databaseSettings {@link CosmosDatabaseProperties}
      * @return an {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(CosmosDatabaseProperties databaseSettings) {
+    public Mono createDatabase(CosmosDatabaseProperties databaseSettings) {
         return createDatabase(databaseSettings, new CosmosDatabaseRequestOptions());
     }
 
@@ -227,7 +231,7 @@ public Mono createDatabase(CosmosDatabaseProperties data
      * @param id id of the database
      * @return a {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(String id) {
+    public Mono createDatabase(String id) {
         return createDatabase(new CosmosDatabaseProperties(id), new CosmosDatabaseRequestOptions());
     }
 
@@ -244,17 +248,17 @@ public Mono createDatabase(String id) {
      * @param options {@link CosmosDatabaseRequestOptions}
      * @return an {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(CosmosDatabaseProperties databaseSettings,
-                                                       int throughput,
-                                                       CosmosDatabaseRequestOptions options) {
+    public Mono createDatabase(CosmosDatabaseProperties databaseSettings,
+                                                            int throughput,
+                                                            CosmosDatabaseRequestOptions options) {
         if (options == null) {
             options = new CosmosDatabaseRequestOptions();
         }
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         Database wrappedDatabase = new Database();
-        wrappedDatabase.id(databaseSettings.id());
+        wrappedDatabase.setId(databaseSettings.getId());
         return asyncDocumentClient.createDatabase(wrappedDatabase, options.toRequestOptions()).map(databaseResourceResponse ->
-                new CosmosDatabaseResponse(databaseResourceResponse, this)).single();
+                new CosmosAsyncDatabaseResponse(databaseResourceResponse, this)).single();
     }
 
     /**
@@ -269,9 +273,9 @@ public Mono createDatabase(CosmosDatabaseProperties data
      * @param throughput the throughput for the database
      * @return an {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(CosmosDatabaseProperties databaseSettings, int throughput) {
+    public Mono createDatabase(CosmosDatabaseProperties databaseSettings, int throughput) {
         CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions();
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         return createDatabase(databaseSettings, options);
     }
 
@@ -287,9 +291,9 @@ public Mono createDatabase(CosmosDatabaseProperties data
      * @param throughput the throughput for the database
      * @return a {@link Mono} containing the single cosmos database response with the created database or an error.
      */
-    public Mono createDatabase(String id, int throughput) {
+    public Mono createDatabase(String id, int throughput) {
         CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions();
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         return createDatabase(new CosmosDatabaseProperties(id), options);
     }
 
@@ -305,8 +309,8 @@ public Mono createDatabase(String id, int throughput) {
      */
     public Flux> readAllDatabases(FeedOptions options) {
         return getDocClientWrapper().readDatabases(options)
-                                    .map(response-> BridgeInternal.createFeedResponse(CosmosDatabaseProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                                    .map(response-> BridgeInternal.createFeedResponse(CosmosDatabaseProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
@@ -352,8 +356,8 @@ public Flux> queryDatabases(String query,
     public Flux> queryDatabases(SqlQuerySpec querySpec, FeedOptions options){
         return getDocClientWrapper().queryDatabases(querySpec, options)
                                     .map(response-> BridgeInternal.createFeedResponse(
-                        CosmosDatabaseProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                        CosmosDatabaseProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     public Mono readDatabaseAccount() {
@@ -364,14 +368,14 @@ public Mono readDatabaseAccount() {
      * Gets a database object without making a service call.
      *
      * @param id name of the database
-     * @return {@link CosmosDatabase}
+     * @return {@link CosmosAsyncDatabase}
      */
-    public CosmosDatabase getDatabase(String id) {
-        return new CosmosDatabase(id, this);
+    public CosmosAsyncDatabase getDatabase(String id) {
+        return new CosmosAsyncDatabase(id, this);
     }
 
     /**
-     * Close this {@link CosmosClient} instance and cleans up the resources.
+     * Close this {@link CosmosAsyncClient} instance and cleans up the resources.
      */
     @Override
     public void close() {
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflict.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflict.java
similarity index 73%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflict.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflict.java
index 4531cf4e3480..fde73bbc78b7 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflict.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflict.java
@@ -10,9 +10,9 @@
 /**
  * Read and delete conflicts
  */
-public class CosmosConflict {
+public class CosmosAsyncConflict {
 
-    private CosmosContainer container;
+    private CosmosAsyncContainer container;
     private String id;
 
     /**
@@ -21,27 +21,27 @@ public class CosmosConflict {
      * @param id        the conflict id
      * @param container the container
      */
-    CosmosConflict(String id, CosmosContainer container) {
+    CosmosAsyncConflict(String id, CosmosAsyncContainer container) {
         this.id = id;
         this.container = container;
     }
 
     /**
-     * Get the id of the {@link CosmosConflict}
+     * Get the id of the {@link CosmosAsyncConflict}
      * 
-     * @return the id of the {@link CosmosConflict}
+     * @return the id of the {@link CosmosAsyncConflict}
      */
-    public String id() {
+    public String getId() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosConflict}
+     * Set the id of the {@link CosmosAsyncConflict}
      * 
-     * @param id the id of the {@link CosmosConflict}
-     * @return the same {@link CosmosConflict} that had the id set
+     * @param id the id of the {@link CosmosAsyncConflict}
+     * @return the same {@link CosmosAsyncConflict} that had the id set
      */
-    CosmosConflict id(String id) {
+    CosmosAsyncConflict setId(String id) {
         this.id = id;
         return this;
     }
@@ -57,13 +57,13 @@ CosmosConflict id(String id) {
      * @return a {@link Mono} containing the single resource response with the read
      *         conflict or an error.
      */
-    public Mono read(CosmosConflictRequestOptions options) {
+    public Mono read(CosmosConflictRequestOptions options) {
         if (options == null) {
             options = new CosmosConflictRequestOptions();
         }
         RequestOptions requestOptions = options.toRequestOptions();
         return this.container.getDatabase().getDocClientWrapper().readConflict(getLink(), requestOptions)
-                .map(response -> new CosmosConflictResponse(response, container)).single();
+                .map(response -> new CosmosAsyncConflictResponse(response, container)).single();
 
     }
 
@@ -78,13 +78,13 @@ public Mono read(CosmosConflictRequestOptions options) {
      * @return a {@link Mono} containing one or several feed response pages of the
      *         read conflicts or an error.
      */
-    public Mono delete(CosmosConflictRequestOptions options) {
+    public Mono delete(CosmosConflictRequestOptions options) {
         if (options == null) {
             options = new CosmosConflictRequestOptions();
         }
         RequestOptions requestOptions = options.toRequestOptions();
         return this.container.getDatabase().getDocClientWrapper().deleteConflict(getLink(), requestOptions)
-                .map(response -> new CosmosConflictResponse(response, container)).single();
+                .map(response -> new CosmosAsyncConflictResponse(response, container)).single();
     }
 
     String URIPathSegment() {
@@ -101,7 +101,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 }
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflictResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflictResponse.java
new file mode 100644
index 000000000000..9beee6b6a2be
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncConflictResponse.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.Conflict;
+import com.azure.data.cosmos.internal.ResourceResponse;
+
+public class CosmosAsyncConflictResponse extends CosmosResponse {
+    private CosmosAsyncContainer container;
+    private CosmosAsyncConflict conflictClient;
+
+    CosmosAsyncConflictResponse(ResourceResponse response, CosmosAsyncContainer container) {
+        super(response);
+        this.container = container;
+        if(response.getResource() == null){
+            super.setProperties(null);
+        }else{
+            super.setProperties(new CosmosConflictProperties(response.getResource().toJson()));
+            conflictClient = new CosmosAsyncConflict(response.getResource().getId(), container);
+        }
+    }
+
+    CosmosAsyncContainer getContainer() {
+        return container;
+    }
+
+    /**
+     * Get conflict client
+     * @return the cosmos conflict client
+     */
+    public CosmosAsyncConflict getConflict() {
+        return conflictClient;
+    }
+
+    /**
+     * Get conflict properties object representing the resource on the server
+     * @return the conflict properties
+     */
+    public CosmosConflictProperties getProperties() {
+        return this.getProperties();
+    }
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainer.java
similarity index 82%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainer.java
index a529ec140e10..526aab0a1b98 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainer.java
@@ -15,33 +15,33 @@
  * Provides methods for reading, deleting, and replacing existing Containers.
  * Provides methods for interacting with child resources (Items, Scripts, Conflicts)
  */
-public class CosmosContainer {
+public class CosmosAsyncContainer {
 
-    private CosmosDatabase database;
+    private CosmosAsyncDatabase database;
     private String id;
-    private CosmosScripts scripts;
+    private CosmosAsyncScripts scripts;
 
-    CosmosContainer(String id, CosmosDatabase database) {
+    CosmosAsyncContainer(String id, CosmosAsyncDatabase database) {
         this.id = id;
         this.database = database;
     }
 
     /**
-     * Get the id of the {@link CosmosContainer}
+     * Get the id of the {@link CosmosAsyncContainer}
      * 
-     * @return the id of the {@link CosmosContainer}
+     * @return the id of the {@link CosmosAsyncContainer}
      */
-    public String id() {
+    public String getId() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosContainer}
+     * Set the id of the {@link CosmosAsyncContainer}
      * 
-     * @param id the id of the {@link CosmosContainer}
-     * @return the same {@link CosmosContainer} that had the id set
+     * @param id the id of the {@link CosmosAsyncContainer}
+     * @return the same {@link CosmosAsyncContainer} that had the id set
      */
-    CosmosContainer id(String id) {
+    CosmosAsyncContainer setId(String id) {
         this.id = id;
         return this;
     }
@@ -56,7 +56,7 @@ CosmosContainer id(String id) {
      * @return an {@link Mono} containing the single cosmos container response with
      *         the read container or an error.
      */
-    public Mono read() {
+    public Mono read() {
         return read(new CosmosContainerRequestOptions());
     }
 
@@ -71,12 +71,12 @@ public Mono read() {
      * @return an {@link Mono} containing the single cosmos container response with
      *         the read container or an error.
      */
-    public Mono read(CosmosContainerRequestOptions options) {
+    public Mono read(CosmosContainerRequestOptions options) {
         if (options == null) {
             options = new CosmosContainerRequestOptions();
         }
         return database.getDocClientWrapper().readCollection(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosContainerResponse(response, database)).single();
+                .map(response -> new CosmosAsyncContainerResponse(response, database)).single();
     }
 
     /**
@@ -90,12 +90,12 @@ public Mono read(CosmosContainerRequestOptions options)
      * @return an {@link Mono} containing the single cosmos container response for
      *         the deleted database or an error.
      */
-    public Mono delete(CosmosContainerRequestOptions options) {
+    public Mono delete(CosmosContainerRequestOptions options) {
         if (options == null) {
             options = new CosmosContainerRequestOptions();
         }
         return database.getDocClientWrapper().deleteCollection(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosContainerResponse(response, database)).single();
+                .map(response -> new CosmosAsyncContainerResponse(response, database)).single();
     }
 
     /**
@@ -108,7 +108,7 @@ public Mono delete(CosmosContainerRequestOptions option
      * @return an {@link Mono} containing the single cosmos container response for
      *         the deleted container or an error.
      */
-    public Mono delete() {
+    public Mono delete() {
         return delete(new CosmosContainerRequestOptions());
     }
 
@@ -124,7 +124,7 @@ public Mono delete() {
      * @return an {@link Mono} containing the single cosmos container response with
      *         the replaced document container or an error.
      */
-    public Mono replace(CosmosContainerProperties containerSettings) {
+    public Mono replace(CosmosContainerProperties containerSettings) {
         return replace(containerSettings, null);
     }
 
@@ -141,18 +141,18 @@ public Mono replace(CosmosContainerProperties container
      * @return an {@link Mono} containing the single cosmos container response with
      *         the replaced document container or an error.
      */
-    public Mono replace(CosmosContainerProperties containerSettings,
-            CosmosContainerRequestOptions options) {
+    public Mono replace(CosmosContainerProperties containerSettings,
+                                                      CosmosContainerRequestOptions options) {
         validateResource(containerSettings);
         if (options == null) {
             options = new CosmosContainerRequestOptions();
         }
         return database.getDocClientWrapper()
                 .replaceCollection(containerSettings.getV2Collection(), options.toRequestOptions())
-                .map(response -> new CosmosContainerResponse(response, database)).single();
+                .map(response -> new CosmosAsyncContainerResponse(response, database)).single();
     }
 
-    /* CosmosItem operations */
+    /* CosmosAsyncItem operations */
 
     /**
      * Creates a cosmos item.
@@ -165,7 +165,7 @@ public Mono replace(CosmosContainerProperties container
      * @return an {@link Mono} containing the single resource response with the
      *         created cosmos item or an error.
      */
-    public Mono createItem(Object item) {
+    public Mono createItem(Object item) {
         return createItem(item, new CosmosItemRequestOptions());
     }
 
@@ -181,14 +181,14 @@ public Mono createItem(Object item) {
      * @return an {@link Mono} containing the single resource response with the
      *         created cosmos item or an error.
      */
-    public Mono createItem(Object item, CosmosItemRequestOptions options) {
+    public Mono createItem(Object item, CosmosItemRequestOptions options) {
         if (options == null) {
             options = new CosmosItemRequestOptions();
         }
         RequestOptions requestOptions = options.toRequestOptions();
         return database.getDocClientWrapper()
                 .createDocument(getLink(), CosmosItemProperties.fromObject(item), requestOptions, true)
-                .map(response -> new CosmosItemResponse(response, requestOptions.getPartitionKey(), this)).single();
+                .map(response -> new CosmosAsyncItemResponse(response, requestOptions.getPartitionKey(), this)).single();
     }
 
     /**
@@ -202,7 +202,7 @@ public Mono createItem(Object item, CosmosItemRequestOptions
      * @return an {@link Mono} containing the single resource response with the
      *         upserted document or an error.
      */
-    public Mono upsertItem(Object item) {
+    public Mono upsertItem(Object item) {
         return upsertItem(item, null);
     }
 
@@ -218,7 +218,7 @@ public Mono upsertItem(Object item) {
      * @return an {@link Mono} containing the single resource response with the
      *         upserted document or an error.
      */
-    public Mono upsertItem(Object item, CosmosItemRequestOptions options) {
+    public Mono upsertItem(Object item, CosmosItemRequestOptions options) {
         if (options == null) {
             options = new CosmosItemRequestOptions();
         }
@@ -226,7 +226,7 @@ public Mono upsertItem(Object item, CosmosItemRequestOptions
 
         return this.getDatabase().getDocClientWrapper()
                 .upsertDocument(this.getLink(), CosmosItemProperties.fromObject(item), options.toRequestOptions(), true)
-                .map(response -> new CosmosItemResponse(response, requestOptions.getPartitionKey(), this)).single();
+                .map(response -> new CosmosAsyncItemResponse(response, requestOptions.getPartitionKey(), this)).single();
     }
 
     /**
@@ -256,8 +256,8 @@ public Flux> readAllItems() {
      */
     public Flux> readAllItems(FeedOptions options) {
         return getDatabase().getDocClientWrapper().readDocuments(getLink(), options).map(
-                response -> BridgeInternal.createFeedResponse(CosmosItemProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                response -> BridgeInternal.createFeedResponse(CosmosItemProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
@@ -321,7 +321,7 @@ public Flux> queryItems(SqlQuerySpec querySpe
     public Flux> queryItems(SqlQuerySpec querySpec, FeedOptions options) {
         return getDatabase().getDocClientWrapper().queryDocuments(getLink(), querySpec, options)
                 .map(response -> BridgeInternal.createFeedResponseWithQueryMetrics(
-                        CosmosItemProperties.getFromV2Results(response.results()), response.responseHeaders(),
+                        CosmosItemProperties.getFromV2Results(response.getResults()), response.getResponseHeaders(),
                         response.queryMetrics()));
     }
 
@@ -339,23 +339,23 @@ public Flux> queryItems(SqlQuerySpec querySpe
     public Flux> queryChangeFeedItems(ChangeFeedOptions changeFeedOptions) {
         return getDatabase().getDocClientWrapper().queryDocumentChangeFeed(getLink(), changeFeedOptions)
                 .map(response -> new FeedResponse(
-                        CosmosItemProperties.getFromV2Results(response.results()), response.responseHeaders(), false));
+                        CosmosItemProperties.getFromV2Results(response.getResults()), response.getResponseHeaders(), false));
     }
 
     /**
-     * Gets a CosmosItem object without making a service call
+     * Gets a CosmosAsyncItem object without making a service call
      *
      * @param id           id of the item
      * @param partitionKey the partition key
      * @return a cosmos item
      */
-    public CosmosItem getItem(String id, Object partitionKey) {
-        return new CosmosItem(id, partitionKey, this);
+    public CosmosAsyncItem getItem(String id, Object partitionKey) {
+        return new CosmosAsyncItem(id, partitionKey, this);
     }
 
-    public CosmosScripts getScripts() {
+    public CosmosAsyncScripts getScripts() {
         if (this.scripts == null) {
-            this.scripts = new CosmosScripts(this);
+            this.scripts = new CosmosAsyncScripts(this);
         }
         return this.scripts;
     }
@@ -370,7 +370,7 @@ public CosmosScripts getScripts() {
     public Flux> readAllConflicts(FeedOptions options) {
         return database.getDocClientWrapper().readConflicts(getLink(), options)
                 .map(response -> BridgeInternal.createFeedResponse(
-                        CosmosConflictProperties.getFromV2Results(response.results()), response.responseHeaders()));
+                        CosmosConflictProperties.getFromV2Results(response.getResults()), response.getResponseHeaders()));
     }
 
     /**
@@ -395,17 +395,17 @@ public Flux> queryConflicts(String query)
     public Flux> queryConflicts(String query, FeedOptions options) {
         return database.getDocClientWrapper().queryConflicts(getLink(), query, options)
                 .map(response -> BridgeInternal.createFeedResponse(
-                        CosmosConflictProperties.getFromV2Results(response.results()), response.responseHeaders()));
+                        CosmosConflictProperties.getFromV2Results(response.getResults()), response.getResponseHeaders()));
     }
 
     /**
-     * Gets a CosmosConflict object without making a service call
+     * Gets a CosmosAsyncConflict object without making a service call
      * 
      * @param id id of the cosmos conflict
      * @return a cosmos conflict
      */
-    public CosmosConflict getConflict(String id) {
-        return new CosmosConflict(id, this);
+    public CosmosAsyncConflict getConflict(String id) {
+        return new CosmosAsyncConflict(id, this);
     }
 
     /**
@@ -416,13 +416,13 @@ public CosmosConflict getConflict(String id) {
     public Mono readProvisionedThroughput() {
         return this.read().flatMap(cosmosContainerResponse -> database.getDocClientWrapper()
                 .queryOffers("select * from c where c.offerResourceId = '"
-                        + cosmosContainerResponse.resourceSettings().resourceId() + "'", new FeedOptions())
+                        + cosmosContainerResponse.getProperties().getResourceId() + "'", new FeedOptions())
                 .single()).flatMap(offerFeedResponse -> {
-                    if (offerFeedResponse.results().isEmpty()) {
+                    if (offerFeedResponse.getResults().isEmpty()) {
                         return Mono.error(BridgeInternal.createCosmosClientException(HttpConstants.StatusCodes.BADREQUEST,
                                 "No offers found for the resource"));
                     }
-                    return database.getDocClientWrapper().readOffer(offerFeedResponse.results().get(0).selfLink())
+                    return database.getDocClientWrapper().readOffer(offerFeedResponse.getResults().get(0).getSelfLink())
                             .single();
                 }).map(cosmosOfferResponse -> cosmosOfferResponse.getResource().getThroughput());
     }
@@ -438,13 +438,13 @@ public Mono readProvisionedThroughput() {
     public Mono replaceProvisionedThroughput(int requestUnitsPerSecond) {
         return this.read().flatMap(cosmosContainerResponse -> database.getDocClientWrapper()
                 .queryOffers("select * from c where c.offerResourceId = '"
-                        + cosmosContainerResponse.resourceSettings().resourceId() + "'", new FeedOptions())
+                        + cosmosContainerResponse.getProperties().getResourceId() + "'", new FeedOptions())
                 .single()).flatMap(offerFeedResponse -> {
-                    if (offerFeedResponse.results().isEmpty()) {
+                    if (offerFeedResponse.getResults().isEmpty()) {
                         return Mono.error(BridgeInternal.createCosmosClientException(HttpConstants.StatusCodes.BADREQUEST,
                                 "No offers found for the resource"));
                     }
-                    Offer offer = offerFeedResponse.results().get(0);
+                    Offer offer = offerFeedResponse.getResults().get(0);
                     offer.setThroughput(requestUnitsPerSecond);
                     return database.getDocClientWrapper().replaceOffer(offer).single();
                 }).map(offerResourceResponse -> offerResourceResponse.getResource().getThroughput());
@@ -453,9 +453,9 @@ public Mono replaceProvisionedThroughput(int requestUnitsPerSecond) {
     /**
      * Gets the parent Database
      *
-     * @return the {@link CosmosDatabase}
+     * @return the {@link CosmosAsyncDatabase}
      */
-    public CosmosDatabase getDatabase() {
+    public CosmosAsyncDatabase getDatabase() {
         return database;
     }
 
@@ -473,7 +473,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainerResponse.java
similarity index 59%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainerResponse.java
index 4078532bb288..a95620d54435 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncContainerResponse.java
@@ -5,17 +5,17 @@
 import com.azure.data.cosmos.internal.DocumentCollection;
 import com.azure.data.cosmos.internal.ResourceResponse;
 
-public class CosmosContainerResponse extends CosmosResponse {
+public class CosmosAsyncContainerResponse extends CosmosResponse {
 
-    private CosmosContainer container;
+    private CosmosAsyncContainer container;
 
-    CosmosContainerResponse(ResourceResponse response, CosmosDatabase database) {
+    CosmosAsyncContainerResponse(ResourceResponse response, CosmosAsyncDatabase database) {
         super(response);
         if(response.getResource() == null){
-            super.resourceSettings(null);
+            super.setProperties(null);
         }else{
-            super.resourceSettings(new CosmosContainerProperties(response));
-            container = new CosmosContainer(resourceSettings().id(), database);
+            super.setProperties(new CosmosContainerProperties(response));
+            container = new CosmosAsyncContainer(this.getProperties().getId(), database);
         }
     }
 
@@ -24,7 +24,7 @@ public class CosmosContainerResponse extends CosmosResponse read() {
+    public Mono read() {
         return read(new CosmosDatabaseRequestOptions());
     }
 
@@ -69,12 +69,12 @@ public Mono read() {
      * @return an {@link Mono} containing the single cosmos database response with
      *         the read database or an error.
      */
-    public Mono read(CosmosDatabaseRequestOptions options) {
+    public Mono read(CosmosDatabaseRequestOptions options) {
         if (options == null) {
             options = new CosmosDatabaseRequestOptions();
         }
         return getDocClientWrapper().readDatabase(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosDatabaseResponse(response, getClient())).single();
+                .map(response -> new CosmosAsyncDatabaseResponse(response, getClient())).single();
     }
 
     /**
@@ -86,7 +86,7 @@ public Mono read(CosmosDatabaseRequestOptions options) {
      *
      * @return an {@link Mono} containing the single cosmos database response
      */
-    public Mono delete() {
+    public Mono delete() {
         return delete(new CosmosDatabaseRequestOptions());
     }
 
@@ -100,15 +100,15 @@ public Mono delete() {
      * @param options the request options
      * @return an {@link Mono} containing the single cosmos database response
      */
-    public Mono delete(CosmosDatabaseRequestOptions options) {
+    public Mono delete(CosmosDatabaseRequestOptions options) {
         if (options == null) {
             options = new CosmosDatabaseRequestOptions();
         }
         return getDocClientWrapper().deleteDatabase(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosDatabaseResponse(response, getClient())).single();
+                .map(response -> new CosmosAsyncDatabaseResponse(response, getClient())).single();
     }
 
-    /* CosmosContainer operations */
+    /* CosmosAsyncContainer operations */
 
     /**
      * Creates a document container.
@@ -121,7 +121,7 @@ public Mono delete(CosmosDatabaseRequestOptions options)
      * @return an {@link Flux} containing the single cosmos container response with
      *         the created container or an error.
      */
-    public Mono createContainer(CosmosContainerProperties containerSettings) {
+    public Mono createContainer(CosmosContainerProperties containerSettings) {
         return createContainer(containerSettings, new CosmosContainerRequestOptions());
     }
 
@@ -137,13 +137,13 @@ public Mono createContainer(CosmosContainerProperties c
      * @return an {@link Flux} containing the single cosmos container response with
      *         the created container or an error.
      */
-    public Mono createContainer(CosmosContainerProperties containerProperties, int throughput) {
+    public Mono createContainer(CosmosContainerProperties containerProperties, int throughput) {
         if (containerProperties == null) {
             throw new IllegalArgumentException("containerProperties");
         }
         validateResource(containerProperties);
         CosmosContainerRequestOptions options =  new CosmosContainerRequestOptions();
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         return createContainer(containerProperties, options);
     }
 
@@ -159,8 +159,8 @@ public Mono createContainer(CosmosContainerProperties c
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainer(CosmosContainerProperties containerProperties,
-            CosmosContainerRequestOptions options) {
+    public Mono createContainer(CosmosContainerProperties containerProperties,
+                                                              CosmosContainerRequestOptions options) {
         if (containerProperties == null) {
             throw new IllegalArgumentException("containerProperties");
         }
@@ -170,7 +170,7 @@ public Mono createContainer(CosmosContainerProperties c
         }
         return getDocClientWrapper()
                 .createCollection(this.getLink(), containerProperties.getV2Collection(), options.toRequestOptions())
-                .map(response -> new CosmosContainerResponse(response, this)).single();
+                .map(response -> new CosmosAsyncContainerResponse(response, this)).single();
     }
 
     /**
@@ -186,13 +186,13 @@ public Mono createContainer(CosmosContainerProperties c
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainer(CosmosContainerProperties containerProperties,
-                                                         int throughput,
-                                                         CosmosContainerRequestOptions options) {
+    public Mono createContainer(CosmosContainerProperties containerProperties,
+                                                              int throughput,
+                                                              CosmosContainerRequestOptions options) {
         if (options == null) {
             options = new CosmosContainerRequestOptions();
         }
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         return createContainer(containerProperties, options);
     }
 
@@ -208,7 +208,7 @@ public Mono createContainer(CosmosContainerProperties c
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainer(String id, String partitionKeyPath) {
+    public Mono createContainer(String id, String partitionKeyPath) {
         return createContainer(new CosmosContainerProperties(id, partitionKeyPath));
     }
 
@@ -225,9 +225,9 @@ public Mono createContainer(String id, String partition
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainer(String id, String partitionKeyPath, int throughput) {
+    public Mono createContainer(String id, String partitionKeyPath, int throughput) {
         CosmosContainerRequestOptions options = new CosmosContainerRequestOptions();
-        options.offerThroughput(throughput);
+        options.setOfferThroughput(throughput);
         return createContainer(new CosmosContainerProperties(id, partitionKeyPath), options);
     }
 
@@ -243,8 +243,8 @@ public Mono createContainer(String id, String partition
      * @return a {@link Mono} containing the cosmos container response with the
      *         created or existing container or an error.
      */
-    public Mono createContainerIfNotExists(CosmosContainerProperties containerProperties) {
-        CosmosContainer container = getContainer(containerProperties.id());
+    public Mono createContainerIfNotExists(CosmosContainerProperties containerProperties) {
+        CosmosAsyncContainer container = getContainer(containerProperties.getId());
         return createContainerIfNotExistsInternal(containerProperties, container, null);
     }
 
@@ -261,10 +261,10 @@ public Mono createContainerIfNotExists(CosmosContainerP
      * @return a {@link Mono} containing the cosmos container response with the
      *         created or existing container or an error.
      */
-    public Mono createContainerIfNotExists(CosmosContainerProperties containerProperties, int throughput) {
+    public Mono createContainerIfNotExists(CosmosContainerProperties containerProperties, int throughput) {
         CosmosContainerRequestOptions options = new CosmosContainerRequestOptions();
-        options.offerThroughput(throughput);
-        CosmosContainer container = getContainer(containerProperties.id());
+        options.setOfferThroughput(throughput);
+        CosmosAsyncContainer container = getContainer(containerProperties.getId());
         return createContainerIfNotExistsInternal(containerProperties, container, options);
     }
 
@@ -280,8 +280,8 @@ public Mono createContainerIfNotExists(CosmosContainerP
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainerIfNotExists(String id, String partitionKeyPath) {
-        CosmosContainer container = getContainer(id);
+    public Mono createContainerIfNotExists(String id, String partitionKeyPath) {
+        CosmosAsyncContainer container = getContainer(id);
         return createContainerIfNotExistsInternal(new CosmosContainerProperties(id, partitionKeyPath), container, null);
     }
 
@@ -298,19 +298,19 @@ public Mono createContainerIfNotExists(String id, Strin
      * @return an {@link Flux} containing the cosmos container response with the
      *         created container or an error.
      */
-    public Mono createContainerIfNotExists(String id, String partitionKeyPath, int throughput) {
+    public Mono createContainerIfNotExists(String id, String partitionKeyPath, int throughput) {
         CosmosContainerRequestOptions options = new CosmosContainerRequestOptions();
-        options.offerThroughput(throughput);
-        CosmosContainer container = getContainer(id);
+        options.setOfferThroughput(throughput);
+        CosmosAsyncContainer container = getContainer(id);
         return createContainerIfNotExistsInternal(new CosmosContainerProperties(id, partitionKeyPath), container, options);
     }
 
-    private Mono createContainerIfNotExistsInternal(
-            CosmosContainerProperties containerProperties, CosmosContainer container, CosmosContainerRequestOptions options) {
+    private Mono createContainerIfNotExistsInternal(
+        CosmosContainerProperties containerProperties, CosmosAsyncContainer container, CosmosContainerRequestOptions options) {
         return container.read(options).onErrorResume(exception -> {
             if (exception instanceof CosmosClientException) {
                 CosmosClientException cosmosClientException = (CosmosClientException) exception;
-                if (cosmosClientException.statusCode() == HttpConstants.StatusCodes.NOTFOUND) {
+                if (cosmosClientException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) {
                     return createContainer(containerProperties, options);
                 }
             }
@@ -332,7 +332,7 @@ private Mono createContainerIfNotExistsInternal(
     public Flux> readAllContainers(FeedOptions options) {
         return getDocClientWrapper().readCollections(getLink(), options)
                 .map(response -> BridgeInternal.createFeedResponse(
-                        CosmosContainerProperties.getFromV2Results(response.results()), response.responseHeaders()));
+                        CosmosContainerProperties.getFromV2Results(response.getResults()), response.getResponseHeaders()));
     }
 
     /**
@@ -410,17 +410,17 @@ public Flux> queryContainers(SqlQuerySpe
     public Flux> queryContainers(SqlQuerySpec querySpec, FeedOptions options) {
         return getDocClientWrapper().queryCollections(getLink(), querySpec, options)
                 .map(response -> BridgeInternal.createFeedResponse(
-                        CosmosContainerProperties.getFromV2Results(response.results()), response.responseHeaders()));
+                        CosmosContainerProperties.getFromV2Results(response.getResults()), response.getResponseHeaders()));
     }
 
     /**
-     * Gets a CosmosContainer object without making a service call
+     * Gets a CosmosAsyncContainer object without making a service call
      *
      * @param id id of the container
      * @return Cosmos Container
      */
-    public CosmosContainer getContainer(String id) {
-        return new CosmosContainer(id, this);
+    public CosmosAsyncContainer getContainer(String id) {
+        return new CosmosAsyncContainer(id, this);
     }
 
     /** User operations **/
@@ -435,9 +435,9 @@ public CosmosContainer getContainer(String id) {
      * @return an {@link Mono} containing the single resource response with the
      *         created cosmos user or an error.
      */
-    public Mono createUser(CosmosUserProperties settings) {
+    public Mono createUser(CosmosUserProperties settings) {
         return getDocClientWrapper().createUser(this.getLink(), settings.getV2User(), null)
-                .map(response -> new CosmosUserResponse(response, this)).single();
+                .map(response -> new CosmosAsyncUserResponse(response, this)).single();
     }
 
 
@@ -452,9 +452,9 @@ public Mono createUser(CosmosUserProperties settings) {
      * @return an {@link Mono} containing the single resource response with the
      *         upserted user or an error.
      */
-    public Mono upsertUser(CosmosUserProperties settings) {
+    public Mono upsertUser(CosmosUserProperties settings) {
         return getDocClientWrapper().upsertUser(this.getLink(), settings.getV2User(), null)
-                .map(response -> new CosmosUserResponse(response, this)).single();
+                .map(response -> new CosmosAsyncUserResponse(response, this)).single();
     }
 
     /**
@@ -484,7 +484,7 @@ public Flux> readAllUsers() {
      */
     public Flux> readAllUsers(FeedOptions options) {
         return getDocClientWrapper().readUsers(getLink(), options).map(response -> BridgeInternal.createFeedResponse(
-                CosmosUserProperties.getFromV2Results(response.results()), response.responseHeaders()));
+                CosmosUserProperties.getFromV2Results(response.getResults()), response.getResponseHeaders()));
     }
 
     /**
@@ -548,12 +548,12 @@ public Flux> queryUsers(SqlQuerySpec querySpe
     public Flux> queryUsers(SqlQuerySpec querySpec, FeedOptions options) {
         return getDocClientWrapper().queryUsers(getLink(), querySpec, options)
                 .map(response -> BridgeInternal.createFeedResponseWithQueryMetrics(
-                        CosmosUserProperties.getFromV2Results(response.results()), response.responseHeaders(),
+                        CosmosUserProperties.getFromV2Results(response.getResults()), response.getResponseHeaders(),
                         response.queryMetrics()));
     }
 
-    public CosmosUser getUser(String id) {
-        return new CosmosUser(id, this);
+    public CosmosAsyncUser getUser(String id) {
+        return new CosmosAsyncUser(id, this);
     }
 
     /**
@@ -564,13 +564,13 @@ public CosmosUser getUser(String id) {
     public Mono readProvisionedThroughput() {
         return this.read().flatMap(cosmosDatabaseResponse -> getDocClientWrapper()
                 .queryOffers("select * from c where c.offerResourceId = '"
-                        + cosmosDatabaseResponse.resourceSettings().resourceId() + "'", new FeedOptions())
+                        + cosmosDatabaseResponse.getProperties().getResourceId() + "'", new FeedOptions())
                 .single().flatMap(offerFeedResponse -> {
-                    if (offerFeedResponse.results().isEmpty()) {
+                    if (offerFeedResponse.getResults().isEmpty()) {
                         return Mono.error(BridgeInternal.createCosmosClientException(HttpConstants.StatusCodes.BADREQUEST,
                                 "No offers found for the resource"));
                     }
-                    return getDocClientWrapper().readOffer(offerFeedResponse.results().get(0).selfLink()).single();
+                    return getDocClientWrapper().readOffer(offerFeedResponse.getResults().get(0).getSelfLink()).single();
                 }).map(cosmosContainerResponse1 -> cosmosContainerResponse1.getResource().getThroughput()));
     }
 
@@ -585,19 +585,19 @@ public Mono readProvisionedThroughput() {
     public Mono replaceProvisionedThroughput(int requestUnitsPerSecond) {
         return this.read().flatMap(cosmosDatabaseResponse -> this.getDocClientWrapper()
                 .queryOffers("select * from c where c.offerResourceId = '"
-                        + cosmosDatabaseResponse.resourceSettings().resourceId() + "'", new FeedOptions())
+                        + cosmosDatabaseResponse.getProperties().getResourceId() + "'", new FeedOptions())
                 .single().flatMap(offerFeedResponse -> {
-                    if (offerFeedResponse.results().isEmpty()) {
+                    if (offerFeedResponse.getResults().isEmpty()) {
                         return Mono.error(BridgeInternal.createCosmosClientException(HttpConstants.StatusCodes.BADREQUEST,
                                 "No offers found for the resource"));
                     }
-                    Offer offer = offerFeedResponse.results().get(0);
+                    Offer offer = offerFeedResponse.getResults().get(0);
                     offer.setThroughput(requestUnitsPerSecond);
                     return this.getDocClientWrapper().replaceOffer(offer).single();
                 }).map(offerResourceResponse -> offerResourceResponse.getResource().getThroughput()));
     }
 
-    CosmosClient getClient() {
+    CosmosAsyncClient getClient() {
         return client;
     }
 
@@ -619,7 +619,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 }
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncDatabaseResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncDatabaseResponse.java
new file mode 100644
index 000000000000..053c577105ac
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncDatabaseResponse.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.Database;
+import com.azure.data.cosmos.internal.ResourceResponse;
+
+public class CosmosAsyncDatabaseResponse extends CosmosResponse{
+    private CosmosAsyncDatabase database;
+
+    CosmosAsyncDatabaseResponse(ResourceResponse response, CosmosAsyncClient client) {
+        super(response);
+        if(response.getResource() == null){
+            super.setProperties(null);
+        }else{
+            super.setProperties(new CosmosDatabaseProperties(response));
+            database = new CosmosAsyncDatabase(this.getProperties().getId(), client);
+        }
+    }
+
+    /**
+     * Gets the CosmosAsyncDatabase object
+     *
+     * @return {@link CosmosAsyncDatabase}
+     */
+    public CosmosAsyncDatabase getDatabase() {
+        return database;
+    }
+
+    /**
+     * Gets the cosmos database properties
+     *
+     * @return the cosmos database properties
+     */
+    public CosmosDatabaseProperties getProperties() {
+        return super.getProperties();
+    }
+
+    /**
+     * Gets the Max Quota.
+     *
+     * @return the getDatabase quota.
+     */
+    public long getDatabaseQuota(){
+        return resourceResponseWrapper.getDatabaseQuota();
+    }
+
+    /**
+     * Gets the current Usage.
+     *
+     * @return the current getDatabase usage.
+     */
+    public long getDatabaseUsage(){
+        return resourceResponseWrapper.getDatabaseUsage();
+    }
+
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItem.java
similarity index 78%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItem.java
index a91ca5f959e8..ecc9f1f80fa3 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItem.java
@@ -7,31 +7,31 @@
 import com.azure.data.cosmos.internal.RequestOptions;
 import reactor.core.publisher.Mono;
 
-public class CosmosItem {
+public class CosmosAsyncItem {
     private Object partitionKey;
-    private CosmosContainer container;
+    private CosmosAsyncContainer container;
     private String id;
 
-    CosmosItem(String id, Object partitionKey, CosmosContainer container) {
+    CosmosAsyncItem(String id, Object partitionKey, CosmosAsyncContainer container) {
         this.id = id;
         this.partitionKey = partitionKey;
         this.container = container;
     }
 
     /**
-     * Get the id of the {@link CosmosItem}
-     * @return the id of the {@link CosmosItem}
+     * Get the id of the {@link CosmosAsyncItem}
+     * @return the id of the {@link CosmosAsyncItem}
      */
-    public String id() {
+    public String getId() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosItem}
-     * @param id the id of the {@link CosmosItem}
-     * @return the same {@link CosmosItem} that had the id set
+     * Set the id of the {@link CosmosAsyncItem}
+     * @param id the id of the {@link CosmosAsyncItem}
+     * @return the same {@link CosmosAsyncItem} that had the id set
      */
-    CosmosItem id(String id) {
+    CosmosAsyncItem setId(String id) {
         this.id = id;
         return this;
     }
@@ -45,7 +45,7 @@ CosmosItem id(String id) {
      *
      * @return an {@link Mono} containing the cosmos item response with the read item or an error
      */
-    public Mono read() {
+    public Mono read() {
         return read(new CosmosItemRequestOptions(partitionKey));
     }
 
@@ -59,14 +59,14 @@ public Mono read() {
      * @param options the request comosItemRequestOptions
      * @return an {@link Mono} containing the cosmos item response with the read item or an error
      */
-    public Mono read(CosmosItemRequestOptions options) {
+    public Mono read(CosmosItemRequestOptions options) {
         if (options == null) {
             options = new CosmosItemRequestOptions();
         }
         RequestOptions requestOptions = options.toRequestOptions();
         return container.getDatabase().getDocClientWrapper()
                 .readDocument(getLink(), requestOptions)
-                .map(response -> new CosmosItemResponse(response, requestOptions.getPartitionKey(), container))
+                .map(response -> new CosmosAsyncItemResponse(response, requestOptions.getPartitionKey(), container))
                 .single();
     }
 
@@ -80,7 +80,7 @@ public Mono read(CosmosItemRequestOptions options) {
      * @param item the item to replace (containing the document id).
      * @return an {@link Mono} containing the  cosmos item resource response with the replaced item or an error.
      */
-    public Mono replace(Object item){
+    public Mono replace(Object item){
         return replace(item, new CosmosItemRequestOptions(partitionKey));
     }
 
@@ -95,7 +95,7 @@ public Mono replace(Object item){
      * @param options the request comosItemRequestOptions
      * @return an {@link Mono} containing the  cosmos item resource response with the replaced item or an error.
      */
-    public Mono replace(Object item, CosmosItemRequestOptions options){
+    public Mono replace(Object item, CosmosItemRequestOptions options){
         Document doc = CosmosItemProperties.fromObject(item);
         if (options == null) {
             options = new CosmosItemRequestOptions();
@@ -104,7 +104,7 @@ public Mono replace(Object item, CosmosItemRequestOptions op
         return container.getDatabase()
                 .getDocClientWrapper()
                 .replaceDocument(getLink(), doc, requestOptions)
-                .map(response -> new CosmosItemResponse(response, requestOptions.getPartitionKey(), container))
+                .map(response -> new CosmosAsyncItemResponse(response, requestOptions.getPartitionKey(), container))
                 .single();
     }
 
@@ -116,7 +116,7 @@ public Mono replace(Object item, CosmosItemRequestOptions op
      * In case of failure the {@link Mono} will error.
      * @return an {@link Mono} containing the  cosmos item resource response.
      */
-    public Mono delete() {
+    public Mono delete() {
         return delete(new CosmosItemRequestOptions(partitionKey));
     }
 
@@ -130,7 +130,7 @@ public Mono delete() {
      * @param options the request options
      * @return an {@link Mono} containing the  cosmos item resource response.
      */
-    public Mono delete(CosmosItemRequestOptions options){
+    public Mono delete(CosmosItemRequestOptions options){
         if (options == null) {
             options = new CosmosItemRequestOptions();
         }
@@ -138,11 +138,11 @@ public Mono delete(CosmosItemRequestOptions options){
         return container.getDatabase()
                         .getDocClientWrapper()
                         .deleteDocument(getLink(), requestOptions)
-                        .map(response -> new CosmosItemResponse(response, requestOptions.getPartitionKey(), container))
+                        .map(response -> new CosmosAsyncItemResponse(response, requestOptions.getPartitionKey(), container))
                         .single();
     }
     
-    void setContainer(CosmosContainer container) {
+    void setContainer(CosmosAsyncContainer container) {
         this.container = container;
     }
 
@@ -160,7 +160,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 }
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItemResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItemResponse.java
new file mode 100644
index 000000000000..0e957344aeae
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncItemResponse.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.Document;
+import com.azure.data.cosmos.internal.ResourceResponse;
+
+public class CosmosAsyncItemResponse extends CosmosResponse{
+    private CosmosAsyncItem itemClient;
+
+    CosmosAsyncItemResponse(ResourceResponse response, PartitionKey partitionKey, CosmosAsyncContainer container) {
+        super(response);
+        if(response.getResource() == null){
+            super.setProperties(null);
+        }else{
+            super.setProperties(new CosmosItemProperties(response.getResource().toJson()));
+            itemClient = new CosmosAsyncItem(response.getResource().getId(),partitionKey, container);
+        }
+    }
+
+    /**
+     * Gets the itemSettings
+     * @return the itemSettings
+     */
+    public CosmosItemProperties getProperties() {
+        return super.getProperties();
+    }
+
+    /**
+     * Gets the CosmosAsyncItem
+     * @return the cosmos item
+     */
+    public CosmosAsyncItem getItem() {
+        return itemClient;
+    }
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermission.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermission.java
similarity index 73%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermission.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermission.java
index 05e8b79fac63..2e1cf517b4d5 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermission.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermission.java
@@ -6,30 +6,30 @@
 import com.azure.data.cosmos.internal.RequestOptions;
 import reactor.core.publisher.Mono;
 
-public class CosmosPermission {
+public class CosmosAsyncPermission {
 
-    private final CosmosUser cosmosUser;
+    private final CosmosAsyncUser cosmosUser;
     private String id;
 
-    CosmosPermission(String id, CosmosUser user){
+    CosmosAsyncPermission(String id, CosmosAsyncUser user){
         this.id = id;
         this.cosmosUser = user; 
     }
 
     /**
-     * Get the id of the {@link CosmosPermission}
-     * @return the id of the {@link CosmosPermission}
+     * Get the id of the {@link CosmosAsyncPermission}
+     * @return the id of the {@link CosmosAsyncPermission}
      */
     public String id() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosPermission}
-     * @param id the id of the {@link CosmosPermission}
-     * @return the same {@link CosmosPermission} that had the id set
+     * Set the id of the {@link CosmosAsyncPermission}
+     * @param id the id of the {@link CosmosAsyncPermission}
+     * @return the same {@link CosmosAsyncPermission} that had the id set
      */
-    CosmosPermission id(String id) {
+    CosmosAsyncPermission id(String id) {
         this.id = id;
         return this;
     }
@@ -44,12 +44,12 @@ CosmosPermission id(String id) {
      * @param options        the request options.
      * @return an {@link Mono} containing the single resource response with the read permission or an error.
      */
-    public Mono read(RequestOptions options) {
+    public Mono read(RequestOptions options) {
 
         return cosmosUser.getDatabase()
                 .getDocClientWrapper()
                 .readPermission(getLink(),options)
-                .map(response -> new CosmosPermissionResponse(response, cosmosUser))
+                .map(response -> new CosmosAsyncPermissionResponse(response, cosmosUser))
                 .single();
     }
 
@@ -64,12 +64,12 @@ public Mono read(RequestOptions options) {
      * @param options    the request options.
      * @return an {@link Mono} containing the single resource response with the replaced permission or an error.
      */
-    public Mono replace(CosmosPermissionProperties permissionSettings, RequestOptions options) {
+    public Mono replace(CosmosPermissionProperties permissionSettings, RequestOptions options) {
         
         return cosmosUser.getDatabase()
                 .getDocClientWrapper()
                 .replacePermission(permissionSettings.getV2Permissions(), options)
-                .map(response -> new CosmosPermissionResponse(response, cosmosUser))
+                .map(response -> new CosmosAsyncPermissionResponse(response, cosmosUser))
                 .single();
     }
 
@@ -83,14 +83,14 @@ public Mono replace(CosmosPermissionProperties permiss
      * @param options        the request options.
      * @return an {@link Mono} containing the single resource response for the deleted permission or an error.
      */
-    public Mono delete(CosmosPermissionRequestOptions options) {
+    public Mono delete(CosmosPermissionRequestOptions options) {
         if(options == null){
             options = new CosmosPermissionRequestOptions();
         }
         return cosmosUser.getDatabase()
                 .getDocClientWrapper()
                 .deletePermission(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosPermissionResponse(response, cosmosUser))
+                .map(response -> new CosmosAsyncPermissionResponse(response, cosmosUser))
                 .single();
     }
 
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermissionResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermissionResponse.java
new file mode 100644
index 000000000000..ae9bf1292935
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncPermissionResponse.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.Permission;
+import com.azure.data.cosmos.internal.ResourceResponse;
+
+public class CosmosAsyncPermissionResponse extends CosmosResponse {
+    CosmosAsyncPermission permissionClient;
+    
+    CosmosAsyncPermissionResponse(ResourceResponse response, CosmosAsyncUser cosmosUser) {
+        super(response);
+        if(response.getResource() == null){
+            super.setProperties(null);
+        }else{
+            super.setProperties(new CosmosPermissionProperties(response.getResource().toJson()));
+            permissionClient = new CosmosAsyncPermission(response.getResource().getId(), cosmosUser);
+        }
+    }
+
+    /**
+     * Get the permission properties
+     *
+     * @return the permission properties
+     */
+    public CosmosPermissionProperties getProperties() {
+        return super.getProperties();
+    }
+
+    /**
+     * Gets the CosmosAsyncPermission
+     *
+     * @return the cosmos permission
+     */
+    public CosmosAsyncPermission getPermission() {
+        return permissionClient;
+    }
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncScripts.java
similarity index 81%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncScripts.java
index 687405a0178b..f8c61bdd1f38 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncScripts.java
@@ -8,15 +8,15 @@
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
-public class CosmosScripts {
-    private final CosmosContainer container;
-    private final CosmosDatabase database;
+public class CosmosAsyncScripts {
+    private final CosmosAsyncContainer container;
+    private final CosmosAsyncDatabase database;
 
-    CosmosScripts(CosmosContainer container) {
+    CosmosAsyncScripts(CosmosAsyncContainer container) {
         this.container = container;
         this.database = container.getDatabase();
     }
-    /* CosmosStoredProcedure operations */
+    /* CosmosAsyncStoredProcedure operations */
 
     /**
      * Creates a cosmos stored procedure.
@@ -29,7 +29,7 @@ public class CosmosScripts {
      * @param properties  the cosmos stored procedure properties.
      * @return an {@link Mono} containing the single cosmos stored procedure resource response or an error.
      */
-    public Mono createStoredProcedure(CosmosStoredProcedureProperties properties){
+    public Mono createStoredProcedure(CosmosStoredProcedureProperties properties){
         return this.createStoredProcedure(properties, new CosmosStoredProcedureRequestOptions());
     }
 
@@ -45,17 +45,17 @@ public Mono createStoredProcedure(CosmosStoredPro
      * @param options the stored procedure request options.
      * @return an {@link Mono} containing the single cosmos stored procedure resource response or an error.
      */
-    public Mono createStoredProcedure(CosmosStoredProcedureProperties properties,
-                                                                     CosmosStoredProcedureRequestOptions options){
+    public Mono createStoredProcedure(CosmosStoredProcedureProperties properties,
+                                                                          CosmosStoredProcedureRequestOptions options){
         if(options == null){
             options = new CosmosStoredProcedureRequestOptions();
         }
         StoredProcedure sProc = new StoredProcedure();
-        sProc.id(properties.id());
-        sProc.setBody(properties.body());
+        sProc.setId(properties.getId());
+        sProc.setBody(properties.getBody());
         return database.getDocClientWrapper()
                 .createStoredProcedure(container.getLink(), sProc, options.toRequestOptions())
-                .map(response -> new CosmosStoredProcedureResponse(response, this.container))
+                .map(response -> new CosmosAsyncStoredProcedureResponse(response, this.container))
                 .single();
     }
 
@@ -73,8 +73,8 @@ public Mono createStoredProcedure(CosmosStoredPro
     public Flux> readAllStoredProcedures(FeedOptions options){
         return database.getDocClientWrapper()
                 .readStoredProcedures(container.getLink(), options)
-                .map(response -> BridgeInternal.createFeedResponse(CosmosStoredProcedureProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse(CosmosStoredProcedureProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
@@ -110,17 +110,17 @@ public Flux> queryStoredProcedures
                                                                                    FeedOptions options){
         return database.getDocClientWrapper()
                 .queryStoredProcedures(container.getLink(), querySpec,options)
-                .map(response -> BridgeInternal.createFeedResponse( CosmosStoredProcedureProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse( CosmosStoredProcedureProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
-     * Gets a CosmosStoredProcedure object without making a service call
+     * Gets a CosmosAsyncStoredProcedure object without making a service call
      * @param id id of the stored procedure
      * @return a cosmos stored procedure
      */
-    public CosmosStoredProcedure getStoredProcedure(String id){
-        return new CosmosStoredProcedure(id, this.container);
+    public CosmosAsyncStoredProcedure getStoredProcedure(String id){
+        return new CosmosAsyncStoredProcedure(id, this.container);
     }
 
 
@@ -136,14 +136,14 @@ public CosmosStoredProcedure getStoredProcedure(String id){
      * @param properties       the cosmos user defined function properties
      * @return an {@link Mono} containing the single resource response with the created user defined function or an error.
      */
-    public Mono createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties){
+    public Mono createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties){
         UserDefinedFunction udf = new UserDefinedFunction();
-        udf.id(properties.id());
-        udf.setBody(properties.body());
+        udf.setId(properties.getId());
+        udf.setBody(properties.getBody());
 
         return database.getDocClientWrapper()
                 .createUserDefinedFunction(container.getLink(), udf, null)
-                .map(response -> new CosmosUserDefinedFunctionResponse(response, this.container)).single();
+                .map(response -> new CosmosAsyncUserDefinedFunctionResponse(response, this.container)).single();
     }
 
     /**
@@ -159,8 +159,8 @@ public Mono createUserDefinedFunction(CosmosU
     public Flux> readAllUserDefinedFunctions(FeedOptions options){
         return database.getDocClientWrapper()
                 .readUserDefinedFunctions(container.getLink(), options)
-                .map(response -> BridgeInternal.createFeedResponse(CosmosUserDefinedFunctionProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse(CosmosUserDefinedFunctionProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
@@ -194,17 +194,17 @@ public Flux> queryUserDefinedF
                                                                                            FeedOptions options){
         return database.getDocClientWrapper()
                 .queryUserDefinedFunctions(container.getLink(),querySpec, options)
-                .map(response -> BridgeInternal.createFeedResponse(CosmosUserDefinedFunctionProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse(CosmosUserDefinedFunctionProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
-     * Gets a CosmosUserDefinedFunction object without making a service call
+     * Gets a CosmosAsyncUserDefinedFunction object without making a service call
      * @param id id of the user defined function
      * @return a cosmos user defined function
      */
-    public CosmosUserDefinedFunction getUserDefinedFunction(String id){
-        return new CosmosUserDefinedFunction(id, this.container);
+    public CosmosAsyncUserDefinedFunction getUserDefinedFunction(String id){
+        return new CosmosAsyncUserDefinedFunction(id, this.container);
     }
 
     /* Trigger Operations */
@@ -218,12 +218,12 @@ public CosmosUserDefinedFunction getUserDefinedFunction(String id){
      * @param properties the cosmos trigger properties
      * @return an {@link Mono} containing the single resource response with the created trigger or an error.
      */
-    public Mono createTrigger(CosmosTriggerProperties properties){
+    public Mono createTrigger(CosmosTriggerProperties properties){
         Trigger trigger = new Trigger(properties.toJson());
 
         return database.getDocClientWrapper()
                 .createTrigger(container.getLink(), trigger, null)
-                .map(response -> new CosmosTriggerResponse(response, this.container))
+                .map(response -> new CosmosAsyncTriggerResponse(response, this.container))
                 .single();
     }
 
@@ -240,8 +240,8 @@ public Mono createTrigger(CosmosTriggerProperties propert
     public Flux> readAllTriggers(FeedOptions options){
         return database.getDocClientWrapper()
                 .readTriggers(container.getLink(), options)
-                .map(response -> BridgeInternal.createFeedResponse(CosmosTriggerProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse(CosmosTriggerProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
@@ -274,17 +274,17 @@ public Flux> queryTriggers(SqlQuerySpec qu
                                                                    FeedOptions options){
         return database.getDocClientWrapper()
                 .queryTriggers(container.getLink(), querySpec, options)
-                .map(response -> BridgeInternal.createFeedResponse(CosmosTriggerProperties.getFromV2Results(response.results()),
-                        response.responseHeaders()));
+                .map(response -> BridgeInternal.createFeedResponse(CosmosTriggerProperties.getFromV2Results(response.getResults()),
+                        response.getResponseHeaders()));
     }
 
     /**
-     * Gets a CosmosTrigger object without making a service call
+     * Gets a CosmosAsyncTrigger object without making a service call
      * @param id id of the cosmos trigger
      * @return a cosmos trigger
      */
-    public CosmosTrigger getTrigger(String id){
-        return new CosmosTrigger(id, this.container);
+    public CosmosAsyncTrigger getTrigger(String id){
+        return new CosmosAsyncTrigger(id, this.container);
     }
 
 }
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedure.java
similarity index 76%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedure.java
index ff43932c1bdb..e0986c586717 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedure.java
@@ -6,30 +6,30 @@
 import com.azure.data.cosmos.internal.StoredProcedure;
 import reactor.core.publisher.Mono;
 
-public class CosmosStoredProcedure {
+public class CosmosAsyncStoredProcedure {
 
-    private CosmosContainer cosmosContainer;
+    private CosmosAsyncContainer cosmosContainer;
     private String id;
 
-    CosmosStoredProcedure(String id, CosmosContainer cosmosContainer) {
+    CosmosAsyncStoredProcedure(String id, CosmosAsyncContainer cosmosContainer) {
         this.id = id;
         this.cosmosContainer = cosmosContainer;
     }
 
     /**
-     * Get the id of the {@link CosmosStoredProcedure}
-     * @return the id of the {@link CosmosStoredProcedure}
+     * Get the id of the {@link CosmosAsyncStoredProcedure}
+     * @return the id of the {@link CosmosAsyncStoredProcedure}
      */
     public String id() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosStoredProcedure}
-     * @param id the id of the {@link CosmosStoredProcedure}
-     * @return the same {@link CosmosStoredProcedure} that had the id set
+     * Set the id of the {@link CosmosAsyncStoredProcedure}
+     * @param id the id of the {@link CosmosAsyncStoredProcedure}
+     * @return the same {@link CosmosAsyncStoredProcedure} that had the id set
      */
-    CosmosStoredProcedure id(String id) {
+    CosmosAsyncStoredProcedure id(String id) {
         this.id = id;
         return this;
     }
@@ -44,7 +44,7 @@ CosmosStoredProcedure id(String id) {
      *
      * @return an {@link Mono} containing the single resource response with the read stored procedure or an error.
      */
-    public Mono read() {
+    public Mono read() {
         return read(null);
     }
 
@@ -59,12 +59,12 @@ public Mono read() {
      * @param options the request options.
      * @return an {@link Mono} containing the single resource response with the read stored procedure or an error.
      */
-    public Mono read(CosmosStoredProcedureRequestOptions options) {
+    public Mono read(CosmosStoredProcedureRequestOptions options) {
         if(options == null) {
             options = new CosmosStoredProcedureRequestOptions();
         }
         return cosmosContainer.getDatabase().getDocClientWrapper().readStoredProcedure(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosStoredProcedureResponse(response, cosmosContainer)).single();
+                .map(response -> new CosmosAsyncStoredProcedureResponse(response, cosmosContainer)).single();
     }
 
     /**
@@ -76,7 +76,7 @@ public Mono read(CosmosStoredProcedureRequestOpti
      *
      * @return an {@link Mono} containing the single resource response for the deleted stored procedure or an error.
      */
-    public Mono delete() {
+    public Mono delete() {
         return delete(null);
     }
 
@@ -90,14 +90,14 @@ public Mono delete() {
      * @param options the request options.
      * @return an {@link Mono} containing the single resource response for the deleted stored procedure or an error.
      */
-    public Mono delete(CosmosStoredProcedureRequestOptions options) {
+    public Mono delete(CosmosStoredProcedureRequestOptions options) {
         if(options == null) {
             options = new CosmosStoredProcedureRequestOptions();
         }
         return cosmosContainer.getDatabase()
                 .getDocClientWrapper()
                 .deleteStoredProcedure(getLink(), options.toRequestOptions())
-                .map(response -> new CosmosResponse(response.getResource()))
+                .map(response -> new CosmosAsyncStoredProcedureResponse(response, cosmosContainer))
                 .single();
     }
 
@@ -112,14 +112,14 @@ public Mono delete(CosmosStoredProcedureRequestOptions options)
      * @param options         the request options.
      * @return an {@link Mono} containing the single resource response with the stored procedure response or an error.
      */
-    public Mono execute(Object[] procedureParams, CosmosStoredProcedureRequestOptions options) {
+    public Mono execute(Object[] procedureParams, CosmosStoredProcedureRequestOptions options) {
         if(options == null) {
             options = new CosmosStoredProcedureRequestOptions();
         }
         return cosmosContainer.getDatabase()
                 .getDocClientWrapper()
                 .executeStoredProcedure(getLink(), options.toRequestOptions(), procedureParams)
-                .map(response -> new CosmosStoredProcedureResponse(response, cosmosContainer))
+                .map(response -> new CosmosAsyncStoredProcedureResponse(response, cosmosContainer))
                 .single();
     }
 
@@ -133,7 +133,7 @@ public Mono execute(Object[] procedureParams, Cos
      * @param storedProcedureSettings the stored procedure properties
      * @return an {@link Mono} containing the single resource response with the replaced stored procedure or an error.
      */
-    public Mono replace(CosmosStoredProcedureProperties storedProcedureSettings) {
+    public Mono replace(CosmosStoredProcedureProperties storedProcedureSettings) {
         return replace(storedProcedureSettings, null);
     }
 
@@ -148,15 +148,15 @@ public Mono replace(CosmosStoredProcedureProperti
      * @param options                 the request options.
      * @return an {@link Mono} containing the single resource response with the replaced stored procedure or an error.
      */
-    public Mono replace(CosmosStoredProcedureProperties storedProcedureSettings,
-                                                       CosmosStoredProcedureRequestOptions options) {
+    public Mono replace(CosmosStoredProcedureProperties storedProcedureSettings,
+                                                            CosmosStoredProcedureRequestOptions options) {
         if(options == null) {
             options = new CosmosStoredProcedureRequestOptions();
         }
         return cosmosContainer.getDatabase()
                 .getDocClientWrapper()
                 .replaceStoredProcedure(new StoredProcedure(storedProcedureSettings.toJson()), options.toRequestOptions())
-                .map(response -> new CosmosStoredProcedureResponse(response, cosmosContainer))
+                .map(response -> new CosmosAsyncStoredProcedureResponse(response, cosmosContainer))
                 .single();
     }
 
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedureResponse.java
similarity index 67%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedureResponse.java
index 197cae05eec2..d1fa533eda1c 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncStoredProcedureResponse.java
@@ -6,20 +6,20 @@
 import com.azure.data.cosmos.internal.StoredProcedure;
 import com.azure.data.cosmos.internal.StoredProcedureResponse;
 
-public class CosmosStoredProcedureResponse extends CosmosResponse {
+public class CosmosAsyncStoredProcedureResponse extends CosmosResponse {
 
-    private CosmosStoredProcedure storedProcedure;
+    private CosmosAsyncStoredProcedure storedProcedure;
     private StoredProcedureResponse storedProcedureResponse;
 
-    CosmosStoredProcedureResponse(ResourceResponse response, CosmosContainer cosmosContainer) {
+    CosmosAsyncStoredProcedureResponse(ResourceResponse response, CosmosAsyncContainer cosmosContainer) {
         super(response);
         if(response.getResource() != null){
-            super.resourceSettings(new CosmosStoredProcedureProperties(response));
-            storedProcedure = new CosmosStoredProcedure(resourceSettings().id(), cosmosContainer);
+            super.setProperties(new CosmosStoredProcedureProperties(response));
+            storedProcedure = new CosmosAsyncStoredProcedure(this.getProperties().getId(), cosmosContainer);
         }
     }
 
-    CosmosStoredProcedureResponse(StoredProcedureResponse response, CosmosContainer cosmosContainer) {
+    CosmosAsyncStoredProcedureResponse(StoredProcedureResponse response, CosmosAsyncContainer cosmosContainer) {
         super(response);
         this.storedProcedureResponse = response;
     }
@@ -28,15 +28,15 @@ public class CosmosStoredProcedureResponse extends CosmosResponse read() {
+    public Mono read() {
         return container.getDatabase()
                 .getDocClientWrapper()
                 .readTrigger(getLink(), null)
-                .map(response -> new CosmosTriggerResponse(response, container))
+                .map(response -> new CosmosAsyncTriggerResponse(response, container))
                 .single();
     }
 
@@ -62,11 +62,11 @@ public Mono read() {
      * @param triggerSettings the cosmos trigger properties.
      * @return an {@link Mono} containing the single resource response with the replaced cosmos trigger or an error.
      */
-    public Mono replace(CosmosTriggerProperties triggerSettings) {
+    public Mono replace(CosmosTriggerProperties triggerSettings) {
         return container.getDatabase()
                 .getDocClientWrapper()
                 .replaceTrigger(new Trigger(triggerSettings.toJson()), null)
-                .map(response -> new CosmosTriggerResponse(response, container))
+                .map(response -> new CosmosAsyncTriggerResponse(response, container))
                 .single();
     }
 
@@ -79,11 +79,11 @@ public Mono replace(CosmosTriggerProperties triggerSettin
      *
      * @return an {@link Mono} containing the single resource response for the deleted cosmos trigger or an error.
      */
-    public Mono delete() {
+    public Mono delete() {
         return container.getDatabase()
                 .getDocClientWrapper()
                 .deleteTrigger(getLink(), null)
-                .map(response -> new CosmosResponse(response.getResource()))
+                .map(response -> new CosmosAsyncTriggerResponse(response, container))
                 .single();
     }
 
@@ -101,7 +101,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncTriggerResponse.java
similarity index 57%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncTriggerResponse.java
index f08b3e3bd98d..ccecc5d131dc 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncTriggerResponse.java
@@ -5,17 +5,17 @@
 import com.azure.data.cosmos.internal.ResourceResponse;
 import com.azure.data.cosmos.internal.Trigger;
 
-public class CosmosTriggerResponse extends CosmosResponse {
+public class CosmosAsyncTriggerResponse extends CosmosResponse {
 
     private CosmosTriggerProperties cosmosTriggerProperties;
-    private CosmosTrigger cosmosTrigger;
+    private CosmosAsyncTrigger cosmosTrigger;
 
-    CosmosTriggerResponse(ResourceResponse response, CosmosContainer container) {
+    CosmosAsyncTriggerResponse(ResourceResponse response, CosmosAsyncContainer container) {
         super(response);
         if(response.getResource() != null) {
-            super.resourceSettings(new CosmosTriggerProperties(response));
+            super.setProperties(new CosmosTriggerProperties(response));
             cosmosTriggerProperties = new CosmosTriggerProperties(response);
-            cosmosTrigger = new CosmosTrigger(cosmosTriggerProperties.id(), container);
+            cosmosTrigger = new CosmosAsyncTrigger(cosmosTriggerProperties.getId(), container);
         }
     }
 
@@ -24,16 +24,16 @@ public class CosmosTriggerResponse extends CosmosResponse read() {
+    public Mono read() {
         return this.database.getDocClientWrapper()
                 .readUser(getLink(), null)
-                .map(response -> new CosmosUserResponse(response, database)).single();
+                .map(response -> new CosmosAsyncUserResponse(response, database)).single();
     }
 
     /**
@@ -51,10 +51,10 @@ public Mono read() {
      * @param userSettings the user properties to use
      * @return a {@link Mono} containing the single resource response with the replaced user or an error.
      */
-    public Mono replace(CosmosUserProperties userSettings) {
+    public Mono replace(CosmosUserProperties userSettings) {
         return this.database.getDocClientWrapper()
                 .replaceUser(userSettings.getV2User(), null)
-                .map(response -> new CosmosUserResponse(response, database)).single();
+                .map(response -> new CosmosAsyncUserResponse(response, database)).single();
     }
 
     /**
@@ -62,10 +62,10 @@ public Mono replace(CosmosUserProperties userSettings) {
      *
      * @return a {@link Mono} containing the single resource response with the deleted user or an error.
      */
-    public Mono delete() {
+    public Mono delete() {
         return this.database.getDocClientWrapper()
                 .deleteUser(getLink(), null)
-                .map(response -> new CosmosUserResponse(response, database)).single();
+                .map(response -> new CosmosAsyncUserResponse(response, database)).single();
     }
 
     /**
@@ -79,14 +79,14 @@ public Mono delete() {
      * @param options    the request options.
      * @return an {@link Mono} containing the single resource response with the created permission or an error.
      */
-    public Mono createPermission(CosmosPermissionProperties permissionSettings, CosmosPermissionRequestOptions options) {
+    public Mono createPermission(CosmosPermissionProperties permissionSettings, CosmosPermissionRequestOptions options) {
         if(options == null){
             options = new CosmosPermissionRequestOptions();
         }
         Permission permission = permissionSettings.getV2Permissions();
         return database.getDocClientWrapper()
                 .createPermission(getLink(), permission, options.toRequestOptions())
-                .map(response -> new CosmosPermissionResponse(response, this))
+                .map(response -> new CosmosAsyncPermissionResponse(response, this))
                 .single();
     }
 
@@ -101,14 +101,14 @@ public Mono createPermission(CosmosPermissionPropertie
      * @param options    the request options.
      * @return an {@link Mono} containing the single resource response with the upserted permission or an error.
      */
-    public Mono upsertPermission(CosmosPermissionProperties permissionSettings, CosmosPermissionRequestOptions options) {
+    public Mono upsertPermission(CosmosPermissionProperties permissionSettings, CosmosPermissionRequestOptions options) {
         Permission permission = permissionSettings.getV2Permissions();
         if(options == null){
             options = new CosmosPermissionRequestOptions();
         }
         return database.getDocClientWrapper()
                 .upsertPermission(getLink(), permission, options.toRequestOptions())
-                .map(response -> new CosmosPermissionResponse(response, this))
+                .map(response -> new CosmosAsyncPermissionResponse(response, this))
                 .single();
     }
 
@@ -126,8 +126,8 @@ public Mono upsertPermission(CosmosPermissionPropertie
     public Flux> readAllPermissions(FeedOptions options) {
         return getDatabase().getDocClientWrapper()
                         .readPermissions(getLink(), options)
-                        .map(response-> BridgeInternal.createFeedResponse(CosmosPermissionProperties.getFromV2Results(response.results()),
-                                response.responseHeaders()));
+                        .map(response-> BridgeInternal.createFeedResponse(CosmosPermissionProperties.getFromV2Results(response.getResults()),
+                                response.getResponseHeaders()));
     }
 
     /**
@@ -158,8 +158,8 @@ public Flux> queryPermissions(String qu
     public Flux> queryPermissions(String query, FeedOptions options) {
         return getDatabase().getDocClientWrapper()
                         .queryPermissions(getLink(), query, options)
-                        .map(response-> BridgeInternal.createFeedResponse(CosmosPermissionProperties.getFromV2Results(response.results()),
-                                response.responseHeaders()));
+                        .map(response-> BridgeInternal.createFeedResponse(CosmosPermissionProperties.getFromV2Results(response.getResults()),
+                                response.getResponseHeaders()));
     }
 
     /**
@@ -167,8 +167,8 @@ public Flux> queryPermissions(String qu
      * @param id the id
      * @return the cosmos permission
      */
-    public CosmosPermission getPermission(String id){
-        return new CosmosPermission(id, this);
+    public CosmosAsyncPermission getPermission(String id){
+        return new CosmosAsyncPermission(id, this);
     }
 
     String URIPathSegment() {
@@ -185,16 +185,16 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 
     /**
      * Gets the parent Database
      *
-     * @return the (@link CosmosDatabase)
+     * @return the (@link CosmosAsyncDatabase)
      */
-    public CosmosDatabase getDatabase() {
+    public CosmosAsyncDatabase getDatabase() {
         return database;
     }
-}
\ No newline at end of file
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunction.java
similarity index 70%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunction.java
index 8df6bbcf4df8..8b1326b06ff6 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunction.java
@@ -6,30 +6,30 @@
 import com.azure.data.cosmos.internal.UserDefinedFunction;
 import reactor.core.publisher.Mono;
 
-public class CosmosUserDefinedFunction {
+public class CosmosAsyncUserDefinedFunction {
 
-    private CosmosContainer container;
+    private CosmosAsyncContainer container;
     private String id;
 
-    CosmosUserDefinedFunction(String id, CosmosContainer container) {
+    CosmosAsyncUserDefinedFunction(String id, CosmosAsyncContainer container) {
         this.id = id;
         this.container = container;
     }
 
     /**
-     * Get the id of the {@link CosmosUserDefinedFunction}
-     * @return the id of the {@link CosmosUserDefinedFunction}
+     * Get the id of the {@link CosmosAsyncUserDefinedFunction}
+     * @return the id of the {@link CosmosAsyncUserDefinedFunction}
      */
-    public String id() {
+    public String getId() {
         return id;
     }
 
     /**
-     * Set the id of the {@link CosmosUserDefinedFunction}
-     * @param id the id of the {@link CosmosUserDefinedFunction}
-     * @return the same {@link CosmosUserDefinedFunction} that had the id set
+     * Set the id of the {@link CosmosAsyncUserDefinedFunction}
+     * @param id the id of the {@link CosmosAsyncUserDefinedFunction}
+     * @return the same {@link CosmosAsyncUserDefinedFunction} that had the id set
      */
-    CosmosUserDefinedFunction id(String id) {
+    CosmosAsyncUserDefinedFunction setId(String id) {
         this.id = id;
         return this;
     }
@@ -44,9 +44,9 @@ CosmosUserDefinedFunction id(String id) {
      *
      * @return an {@link Mono} containing the single resource response for the read user defined function or an error.
      */
-    public Mono read() {
+    public Mono read() {
         return container.getDatabase().getDocClientWrapper().readUserDefinedFunction(getLink(), null)
-                .map(response -> new CosmosUserDefinedFunctionResponse(response, container)).single();
+                .map(response -> new CosmosAsyncUserDefinedFunctionResponse(response, container)).single();
     }
 
     /**
@@ -61,12 +61,12 @@ public Mono read() {
      * @return an {@link Mono} containing the single resource response with the replaced cosmos user defined function
      * or an error.
      */
-    public Mono replace(CosmosUserDefinedFunctionProperties udfSettings) {
+    public Mono replace(CosmosUserDefinedFunctionProperties udfSettings) {
         return container.getDatabase()
                 .getDocClientWrapper()
                 .replaceUserDefinedFunction(new UserDefinedFunction(udfSettings.toJson())
                         , null)
-                .map(response -> new CosmosUserDefinedFunctionResponse(response, container))
+                .map(response -> new CosmosAsyncUserDefinedFunctionResponse(response, container))
                 .single();
     }
 
@@ -80,11 +80,11 @@ public Mono replace(CosmosUserDefinedFunction
      * @return an {@link Mono} containing the single resource response for the deleted cosmos user defined function or
      * an error.
      */
-    public Mono delete() {
+    public Mono delete() {
         return container.getDatabase()
                 .getDocClientWrapper()
                 .deleteUserDefinedFunction(this.getLink(), null)
-                .map(response -> new CosmosResponse(response.getResource()))
+                .map(response -> new CosmosAsyncUserDefinedFunctionResponse(response, container))
                 .single();
     }
 
@@ -102,7 +102,7 @@ String getLink() {
         builder.append("/");
         builder.append(URIPathSegment());
         builder.append("/");
-        builder.append(id());
+        builder.append(getId());
         return builder.toString();
     }
 }
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunctionResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunctionResponse.java
new file mode 100644
index 000000000000..72dc995db3d1
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserDefinedFunctionResponse.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.ResourceResponse;
+import com.azure.data.cosmos.internal.UserDefinedFunction;
+
+public class CosmosAsyncUserDefinedFunctionResponse extends CosmosResponse {
+
+    private CosmosUserDefinedFunctionProperties cosmosUserDefinedFunctionProperties;
+    private CosmosAsyncUserDefinedFunction cosmosUserDefinedFunction;
+
+    CosmosAsyncUserDefinedFunctionResponse(ResourceResponse response, CosmosAsyncContainer container) {
+        super(response);
+        if(response.getResource() != null) {
+            super.setProperties(new CosmosUserDefinedFunctionProperties(response));
+            cosmosUserDefinedFunctionProperties = new CosmosUserDefinedFunctionProperties(response);
+            cosmosUserDefinedFunction = new CosmosAsyncUserDefinedFunction(cosmosUserDefinedFunctionProperties.getId(), container);
+        }
+    }
+
+    /**
+     * Gets the cosmos getUser defined function getProperties
+     * @return the cosmos getUser defined function getProperties
+     */
+    public CosmosUserDefinedFunctionProperties getProperties() {
+        return cosmosUserDefinedFunctionProperties;
+    }
+
+    /**
+     * Gets the cosmos user defined function object
+     * @return the cosmos user defined function object
+     */
+    public CosmosAsyncUserDefinedFunction getUserDefinedFunction() {
+        return cosmosUserDefinedFunction;
+    }
+}
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserResponse.java
new file mode 100644
index 000000000000..f107d6d543ef
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosAsyncUserResponse.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.data.cosmos;
+
+import com.azure.data.cosmos.internal.ResourceResponse;
+import com.azure.data.cosmos.internal.User;
+
+public class CosmosAsyncUserResponse extends CosmosResponse {
+    private CosmosAsyncUser user;
+
+    CosmosAsyncUserResponse(ResourceResponse response, CosmosAsyncDatabase database) {
+        super(response);
+        if(response.getResource() == null){
+            super.setProperties(null);
+        }else{
+            super.setProperties(new CosmosUserProperties(response));
+            this.user = new CosmosAsyncUser(this.getProperties().getId(), database);
+        }
+    }
+
+    /**
+     * Get cosmos user
+     *
+     * @return {@link CosmosAsyncUser}
+     */
+    public CosmosAsyncUser getUser() {
+        return user;
+    }
+
+    /**
+     * Gets the cosmos user properties
+     *
+     * @return {@link CosmosUserProperties}
+     */
+    public CosmosUserProperties getProperties(){
+        return super.getProperties();
+    }
+}
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java
similarity index 57%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java
index a1725f6dcb98..fb1a552167e1 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosBridgeInternal.java
@@ -16,27 +16,27 @@ public static DocumentCollection toDocumentCollection(CosmosContainerProperties
         return new DocumentCollection(cosmosContainerProperties.toJson());
     }
 
-    public static AsyncDocumentClient getAsyncDocumentClient(CosmosClient client) {
+    public static AsyncDocumentClient getAsyncDocumentClient(CosmosAsyncClient client) {
         return client.getDocClientWrapper();
     }
 
-    public static CosmosDatabase getCosmosDatabaseWithNewClient(CosmosDatabase cosmosDatabase, CosmosClient client) {
-        return new CosmosDatabase(cosmosDatabase.id(), client);
+    public static CosmosAsyncDatabase getCosmosDatabaseWithNewClient(CosmosAsyncDatabase cosmosDatabase, CosmosAsyncClient client) {
+        return new CosmosAsyncDatabase(cosmosDatabase.getId(), client);
     }
 
-    public static CosmosContainer getCosmosContainerWithNewClient(CosmosContainer cosmosContainer, CosmosDatabase cosmosDatabase, CosmosClient client) {
-        return new CosmosContainer(cosmosContainer.id(), CosmosBridgeInternal.getCosmosDatabaseWithNewClient(cosmosDatabase, client));
+    public static CosmosAsyncContainer getCosmosContainerWithNewClient(CosmosAsyncContainer cosmosContainer, CosmosAsyncDatabase cosmosDatabase, CosmosAsyncClient client) {
+        return new CosmosAsyncContainer(cosmosContainer.getId(), CosmosBridgeInternal.getCosmosDatabaseWithNewClient(cosmosDatabase, client));
     }
 
-    public static Mono getDatabaseAccount(CosmosClient client) {
+    public static Mono getDatabaseAccount(CosmosAsyncClient client) {
         return client.readDatabaseAccount();
     }
 
-    public static AsyncDocumentClient getContextClient(CosmosDatabase database) {
+    public static AsyncDocumentClient getContextClient(CosmosAsyncDatabase database) {
         return database.getClient().getContextClient();
     }
 
-    public static AsyncDocumentClient getContextClient(CosmosContainer container) {
+    public static AsyncDocumentClient getContextClient(CosmosAsyncContainer container) {
         return container.getDatabase().getClient().getContextClient();
     }
 }
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java
similarity index 64%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncClient.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java
index 57dbbb762a75..7403a86e48b3 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncClient.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClient.java
@@ -1,17 +1,9 @@
 // Copyright (c) Microsoft Corporation. All rights reserved.
 // Licensed under the MIT License.
 
-package com.azure.data.cosmos.sync;
-
-import com.azure.data.cosmos.CosmosClient;
-import com.azure.data.cosmos.CosmosClientBuilder;
-import com.azure.data.cosmos.CosmosClientException;
-import com.azure.data.cosmos.CosmosDatabaseProperties;
-import com.azure.data.cosmos.CosmosDatabaseRequestOptions;
-import com.azure.data.cosmos.CosmosDatabaseResponse;
-import com.azure.data.cosmos.FeedOptions;
-import com.azure.data.cosmos.FeedResponse;
-import com.azure.data.cosmos.SqlQuerySpec;
+package com.azure.data.cosmos;
+
+import com.azure.core.implementation.annotation.ServiceClient;
 import reactor.core.Exceptions;
 import reactor.core.publisher.Mono;
 
@@ -21,15 +13,16 @@
  * Provides a client-side logical representation of the Azure Cosmos database service.
  * SyncClient is used to perform operations in a synchronous way
  */
-public class CosmosSyncClient implements AutoCloseable {
-    private final CosmosClient asyncClientWrapper;
+@ServiceClient(builder=CosmosClientBuilder.class)
+public class CosmosClient implements AutoCloseable {
+    private final CosmosAsyncClient asyncClientWrapper;
 
-    public CosmosSyncClient(CosmosClientBuilder builder) {
-        this.asyncClientWrapper = builder.build();
+    public CosmosClient(CosmosClientBuilder builder) {
+        this.asyncClientWrapper = builder.buildAsyncClient();
     }
     
     /**
-     * Instantiate the cosmos client builder to build cosmos client
+     * Instantiate the cosmos client builder to buildAsyncClient cosmos client
      * @return {@link CosmosClientBuilder}
      */
     public static CosmosClientBuilder builder(){
@@ -40,10 +33,10 @@ public static CosmosClientBuilder builder(){
      * Create a Database if it does not already exist on the service
      *
      * @param databaseProperties {@link CosmosDatabaseProperties} the database properties
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception.
      */
-    public CosmosSyncDatabaseResponse createDatabaseIfNotExists(CosmosDatabaseProperties databaseProperties)
+    public CosmosDatabaseResponse createDatabaseIfNotExists(CosmosDatabaseProperties databaseProperties)
             throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabaseIfNotExists(databaseProperties));
     }
@@ -52,10 +45,10 @@ public CosmosSyncDatabaseResponse createDatabaseIfNotExists(CosmosDatabaseProper
      * Create a Database if it does not already exist on the service
      *
      * @param id the id of the database
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception.
      */
-    public CosmosSyncDatabaseResponse createDatabaseIfNotExists(String id) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabaseIfNotExists(String id) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabaseIfNotExists(id));
     }
 
@@ -65,11 +58,11 @@ public CosmosSyncDatabaseResponse createDatabaseIfNotExists(String id) throws Co
      *
      * @param databaseProperties {@link CosmosDatabaseProperties} the database properties.
      * @param options the request options.
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception.
      */
-    public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
-                                                     CosmosDatabaseRequestOptions options) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
+                                                 CosmosDatabaseRequestOptions options) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(databaseProperties, options));
     }
 
@@ -77,10 +70,10 @@ public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databa
      * Creates a database.
      *
      * @param databaseProperties {@link CosmosDatabaseProperties} the database properties.
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception.
      */
-    public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(databaseProperties));
     }
 
@@ -88,10 +81,10 @@ public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databa
      * Creates a database.
      *
      * @param id the id of the database
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception.
      */
-    public CosmosSyncDatabaseResponse createDatabase(String id) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(String id) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(id));
 
     }
@@ -102,12 +95,12 @@ public CosmosSyncDatabaseResponse createDatabase(String id) throws CosmosClientE
      * @param databaseProperties {@link CosmosDatabaseProperties} the database properties.
      * @param throughput the throughput
      * @param options {@link CosmosDatabaseRequestOptions} the request options
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception
      */
-    public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
-                                                     int throughput,
-                                                     CosmosDatabaseRequestOptions options) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
+                                                 int throughput,
+                                                 CosmosDatabaseRequestOptions options) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(databaseProperties, throughput, options));
     }
 
@@ -116,11 +109,11 @@ public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databa
      *
      * @param databaseProperties {@link CosmosDatabaseProperties} the database properties.
      * @param throughput the throughput
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception
      */
-    public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
-                                                     int throughput) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(CosmosDatabaseProperties databaseProperties,
+                                                 int throughput) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(databaseProperties, throughput));
     }
 
@@ -130,14 +123,14 @@ public CosmosSyncDatabaseResponse createDatabase(CosmosDatabaseProperties databa
      *
      * @param id the id of the database
      * @param throughput the throughput
-     * @return the {@link CosmosSyncDatabaseResponse} with the created database.
+     * @return the {@link CosmosDatabaseResponse} with the created database.
      * @throws CosmosClientException the cosmos client exception
      */
-    public CosmosSyncDatabaseResponse createDatabase(String id, int throughput) throws CosmosClientException {
+    public CosmosDatabaseResponse createDatabase(String id, int throughput) throws CosmosClientException {
         return mapDatabaseResponseAndBlock(asyncClientWrapper.createDatabase(id, throughput));
     }
 
-    CosmosSyncDatabaseResponse mapDatabaseResponseAndBlock(Mono databaseMono)
+    CosmosDatabaseResponse mapDatabaseResponseAndBlock(Mono databaseMono)
             throws CosmosClientException {
         try {
             return databaseMono
@@ -206,22 +199,22 @@ public Iterator> queryDatabases(SqlQueryS
      * Gets the database client
      *
      * @param id the id of the database
-     * @return {@link CosmosSyncDatabase} the cosmos sync database
+     * @return {@link CosmosDatabase} the cosmos sync database
      */
-    public CosmosSyncDatabase getDatabase(String id) {
-        return new CosmosSyncDatabase(id, this, asyncClientWrapper.getDatabase(id));
+    public CosmosDatabase getDatabase(String id) {
+        return new CosmosDatabase(id, this, asyncClientWrapper.getDatabase(id));
     }
 
-    CosmosSyncDatabaseResponse convertResponse(CosmosDatabaseResponse response) {
-        return new CosmosSyncDatabaseResponse(response, this);
+    CosmosDatabaseResponse convertResponse(CosmosAsyncDatabaseResponse response) {
+        return new CosmosDatabaseResponse(response, this);
     }
 
-    CosmosClient asyncClient() {
+    CosmosAsyncClient asyncClient() {
         return this.asyncClientWrapper;
     }
 
     /**
-     * Close this {@link CosmosSyncClient} instance
+     * Close this {@link CosmosClient} instance
      */
     public void close() {
         asyncClientWrapper.close();
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java
similarity index 71%
rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java
rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java
index c42b5c78bd42..d83ac68177df 100644
--- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientBuilder.java
@@ -2,30 +2,31 @@
 // Licensed under the MIT License.
 package com.azure.data.cosmos;
 
+import com.azure.core.implementation.annotation.ServiceClientBuilder;
 import com.azure.data.cosmos.internal.Configs;
 import com.azure.data.cosmos.internal.Permission;
-import com.azure.data.cosmos.sync.CosmosSyncClient;
 import org.apache.commons.lang3.StringUtils;
 
 import java.util.List;
 
 /**
- * Helper class to build {@link CosmosClient} instances
+ * Helper class to buildAsyncClient {@link CosmosAsyncClient} instances
  * as logical representation of the Azure Cosmos database service.
  *
  * 
  * {@code
- * ConnectionPolicy connectionPolicy = new ConnectionPolicy();
- * connectionPolicy.connectionMode(ConnectionMode.DIRECT);
- * CosmonsClient client = new CosmosClient.builder()
- *         .endpoint(serviceEndpoint)
- *         .key(key)
- *         .connectionPolicy(connectionPolicy)
- *         .consistencyLevel(ConsistencyLevel.SESSION)
- *         .build();
+ * ConnectionPolicy getConnectionPolicy = new ConnectionPolicy();
+ * getConnectionPolicy.getConnectionMode(ConnectionMode.DIRECT);
+ * CosmonsClient client = new CosmosAsyncClient.builder()
+ *         .getEndpoint(serviceEndpoint)
+ *         .getKey(getKey)
+ *         .getConnectionPolicy(getConnectionPolicy)
+ *         .getConsistencyLevel(ConsistencyLevel.SESSION)
+ *         .buildAsyncClient();
  * }
  * 
*/ +@ServiceClientBuilder(serviceClients = {CosmosClient.class, CosmosAsyncClient.class}) public class CosmosClientBuilder { private Configs configs = new Configs(); @@ -44,7 +45,7 @@ public CosmosClientBuilder() { * Gets the token resolver * @return the token resolver */ - public TokenResolver tokenResolver() { + public TokenResolver getTokenResolver() { return tokenResolver; } @@ -53,7 +54,7 @@ public TokenResolver tokenResolver() { * @param tokenResolver * @return current builder */ - public CosmosClientBuilder tokenResolver(TokenResolver tokenResolver) { + public CosmosClientBuilder setTokenResolver(TokenResolver tokenResolver) { this.tokenResolver = tokenResolver; return this; } @@ -62,7 +63,7 @@ public CosmosClientBuilder tokenResolver(TokenResolver tokenResolver) { * Gets the Azure Cosmos DB endpoint the SDK will connect to * @return the endpoint */ - public String endpoint() { + public String getEndpoint() { return serviceEndpoint; } @@ -71,7 +72,7 @@ public String endpoint() { * @param endpoint the service endpoint * @return current Builder */ - public CosmosClientBuilder endpoint(String endpoint) { + public CosmosClientBuilder setEndpoint(String endpoint) { this.serviceEndpoint = endpoint; return this; } @@ -81,7 +82,7 @@ public CosmosClientBuilder endpoint(String endpoint) { * for accessing resource. * @return the key */ - public String key() { + public String getKey() { return keyOrResourceToken; } @@ -92,7 +93,7 @@ public String key() { * @param key master or readonly key * @return current Builder. */ - public CosmosClientBuilder key(String key) { + public CosmosClientBuilder setKey(String key) { this.keyOrResourceToken = key; return this; } @@ -102,7 +103,7 @@ public CosmosClientBuilder key(String key) { * for accessing resource. * @return the resourceToken */ - public String resourceToken() { + public String getResourceToken() { return keyOrResourceToken; } @@ -113,7 +114,7 @@ public String resourceToken() { * @param resourceToken resourceToken for authentication * @return current Builder. */ - public CosmosClientBuilder resourceToken(String resourceToken) { + public CosmosClientBuilder setResourceToken(String resourceToken) { this.keyOrResourceToken = resourceToken; return this; } @@ -123,7 +124,7 @@ public CosmosClientBuilder resourceToken(String resourceToken) { * resource tokens needed to access resources. * @return the permission list */ - public List permissions() { + public List getPermissions() { return permissions; } @@ -134,7 +135,7 @@ public List permissions() { * @param permissions Permission list for authentication. * @return current Builder. */ - public CosmosClientBuilder permissions(List permissions) { + public CosmosClientBuilder setPermissions(List permissions) { this.permissions = permissions; return this; } @@ -143,7 +144,7 @@ public CosmosClientBuilder permissions(List permissions) { * Gets the {@link ConsistencyLevel} to be used * @return the consistency level */ - public ConsistencyLevel consistencyLevel() { + public ConsistencyLevel getConsistencyLevel() { return this.desiredConsistencyLevel; } @@ -152,7 +153,7 @@ public ConsistencyLevel consistencyLevel() { * @param desiredConsistencyLevel {@link ConsistencyLevel} * @return current Builder */ - public CosmosClientBuilder consistencyLevel(ConsistencyLevel desiredConsistencyLevel) { + public CosmosClientBuilder setConsistencyLevel(ConsistencyLevel desiredConsistencyLevel) { this.desiredConsistencyLevel = desiredConsistencyLevel; return this; } @@ -161,7 +162,7 @@ public CosmosClientBuilder consistencyLevel(ConsistencyLevel desiredConsistencyL * Gets the (@link ConnectionPolicy) to be used * @return the connection policy */ - public ConnectionPolicy connectionPolicy() { + public ConnectionPolicy getConnectionPolicy() { return connectionPolicy; } @@ -170,7 +171,7 @@ public ConnectionPolicy connectionPolicy() { * @param connectionPolicy {@link ConnectionPolicy} * @return current Builder */ - public CosmosClientBuilder connectionPolicy(ConnectionPolicy connectionPolicy) { + public CosmosClientBuilder setConnectionPolicy(ConnectionPolicy connectionPolicy) { this.connectionPolicy = connectionPolicy; return this; } @@ -179,7 +180,7 @@ public CosmosClientBuilder connectionPolicy(ConnectionPolicy connectionPolicy) { * Gets the {@link CosmosKeyCredential} to be used * @return cosmosKeyCredential */ - public CosmosKeyCredential cosmosKeyCredential() { + public CosmosKeyCredential getCosmosKeyCredential() { return cosmosKeyCredential; } @@ -188,39 +189,39 @@ public CosmosKeyCredential cosmosKeyCredential() { * @param cosmosKeyCredential {@link CosmosKeyCredential} * @return current builder */ - public CosmosClientBuilder cosmosKeyCredential(CosmosKeyCredential cosmosKeyCredential) { + public CosmosClientBuilder setCosmosKeyCredential(CosmosKeyCredential cosmosKeyCredential) { this.cosmosKeyCredential = cosmosKeyCredential; return this; } /** * Builds a cosmos configuration object with the provided properties - * @return CosmosClient + * @return CosmosAsyncClient */ - public CosmosClient build() { + public CosmosAsyncClient buildAsyncClient() { validateConfig(); - return new CosmosClient(this); + return new CosmosAsyncClient(this); } private void validateConfig() { - ifThrowIllegalArgException(this.serviceEndpoint == null, "cannot build client without service endpoint"); + ifThrowIllegalArgException(this.serviceEndpoint == null, "cannot buildAsyncClient client without service endpoint"); ifThrowIllegalArgException( this.keyOrResourceToken == null && (permissions == null || permissions.isEmpty()) && this.tokenResolver == null && this.cosmosKeyCredential == null, - "cannot build client without any one of key, resource token, permissions, token resolver, and cosmos key credential"); - ifThrowIllegalArgException(cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.key()), - "cannot build client without key credential"); + "cannot buildAsyncClient client without any one of key, resource token, permissions, token resolver, and cosmos key credential"); + ifThrowIllegalArgException(cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.getKey()), + "cannot buildAsyncClient client without key credential"); } /** * Builds a cosmos sync client object with the provided properties - * @return CosmosSyncClient + * @return CosmosClient */ - public CosmosSyncClient buildSyncClient() { + public CosmosClient buildClient() { validateConfig(); - return new CosmosSyncClient(this); + return new CosmosClient(this); } Configs configs() { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java index cf4c22abae08..f2269bef9210 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosClientException.java @@ -132,7 +132,7 @@ public String getMessage() { * * @return the activity ID. */ - public String message() { + public String getActivityId() { if (this.responseHeaders != null) { return this.responseHeaders.get(HttpConstants.HttpHeaders.ACTIVITY_ID); } @@ -145,7 +145,7 @@ public String message() { * * @return the status code. */ - public int statusCode() { + public int getStatusCode() { return this.statusCode; } @@ -154,7 +154,7 @@ public int statusCode() { * * @return the status code. */ - public int subStatusCode() { + public int getSubStatusCode() { int code = HttpConstants.SubStatusCodes.UNKNOWN; if (this.responseHeaders != null) { String subStatusString = this.responseHeaders.get(HttpConstants.HttpHeaders.SUB_STATUS); @@ -175,11 +175,11 @@ public int subStatusCode() { * * @return the error. */ - public CosmosError error() { + public CosmosError getError() { return this.cosmosError; } - void error(CosmosError cosmosError) { + void setError(CosmosError cosmosError) { this.cosmosError = cosmosError; } @@ -190,7 +190,7 @@ void error(CosmosError cosmosError) { * @return the recommended time interval after which the client can retry failed * requests. */ - public long retryAfterInMilliseconds() { + public long getRetryAfterInMilliseconds() { long retryIntervalInMilliseconds = 0; if (this.responseHeaders != null) { @@ -216,7 +216,7 @@ public long retryAfterInMilliseconds() { * * @return the response headers */ - public Map responseHeaders() { + public Map getResponseHeaders() { return this.responseHeaders; } @@ -234,11 +234,11 @@ String getResourceAddress() { * * @return Cosmos Response Diagnostic Statistics associated with this exception. */ - public CosmosResponseDiagnostics cosmosResponseDiagnostics() { + public CosmosResponseDiagnostics getCosmosResponseDiagnostics() { return cosmosResponseDiagnostics; } - CosmosClientException cosmosResponseDiagnostics(CosmosResponseDiagnostics cosmosResponseDiagnostics) { + CosmosClientException setCosmosResponseDiagnostics(CosmosResponseDiagnostics cosmosResponseDiagnostics) { this.cosmosResponseDiagnostics = cosmosResponseDiagnostics; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java index e135f867ad26..627a91050381 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictProperties.java @@ -33,7 +33,7 @@ public class CosmosConflictProperties extends Resource { * * @return the operation kind. */ - public String operationKind() { + public String getOperationKind() { return super.getString(Constants.Properties.OPERATION_TYPE); } @@ -42,7 +42,7 @@ public String operationKind() { * * @return the resource type. */ - public String resourceType() { + public String getResourceType() { return super.getString(Constants.Properties.RESOURCE_TYPE); } @@ -50,7 +50,7 @@ public String resourceType() { * Gets the resource ID for the conflict in the Azure Cosmos DB service. * @return resource Id for the conflict. */ - String sourceResourceId() { + String getSourceResourceId() { return super.getString(Constants.Properties.SOURCE_RESOURCE_ID); } @@ -79,4 +79,4 @@ static List getFromV2Results(List results) { return results.stream().map(conflict -> new CosmosConflictProperties(conflict.toJson())) .collect(Collectors.toList()); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java index ea7e01f91ad9..d26dc5ef2b7f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictRequestOptions.java @@ -12,7 +12,7 @@ public class CosmosConflictRequestOptions { * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -22,7 +22,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosConflictRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosConflictRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } @@ -32,4 +32,4 @@ RequestOptions toRequestOptions() { requestOptions.setAccessCondition(accessCondition); return requestOptions; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java similarity index 72% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java index 256eae410adf..4d38f529c2e6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainer.java @@ -1,19 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; +package com.azure.data.cosmos; -import com.azure.data.cosmos.ChangeFeedOptions; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; import reactor.core.Exceptions; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -24,12 +13,12 @@ * Provides synchronous methods for reading, deleting, and replacing existing Containers * Provides methods for interacting with child resources (Items, Scripts, Conflicts) */ -public class CosmosSyncContainer { +public class CosmosContainer { - private final CosmosContainer containerWrapper; - private final CosmosSyncDatabase database; + private final CosmosAsyncContainer containerWrapper; + private final CosmosDatabase database; private final String id; - private CosmosSyncScripts scripts; + private CosmosScripts scripts; /** * Instantiates a new Cosmos sync container. @@ -38,7 +27,7 @@ public class CosmosSyncContainer { * @param database the database * @param container the container */ - CosmosSyncContainer(String id, CosmosSyncDatabase database, CosmosContainer container) { + CosmosContainer(String id, CosmosDatabase database, CosmosAsyncContainer container) { this.id = id; this.database = database; this.containerWrapper = container; @@ -49,7 +38,7 @@ public class CosmosSyncContainer { * * @return the string */ - public String id() { + public String getId() { return id; } @@ -59,7 +48,7 @@ public String id() { * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse read() throws CosmosClientException { + public CosmosContainerResponse read() throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.read()); } @@ -70,7 +59,7 @@ public CosmosSyncContainerResponse read() throws CosmosClientException { * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse read(CosmosContainerRequestOptions options) throws CosmosClientException { + public CosmosContainerResponse read(CosmosContainerRequestOptions options) throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.read(options)); } @@ -81,7 +70,7 @@ public CosmosSyncContainerResponse read(CosmosContainerRequestOptions options) t * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse delete(CosmosContainerRequestOptions options) throws CosmosClientException { + public CosmosContainerResponse delete(CosmosContainerRequestOptions options) throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.delete(options)); } @@ -91,7 +80,7 @@ public CosmosSyncContainerResponse delete(CosmosContainerRequestOptions options) * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse delete() throws CosmosClientException { + public CosmosContainerResponse delete() throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.delete()); } @@ -102,7 +91,7 @@ public CosmosSyncContainerResponse delete() throws CosmosClientException { * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse replace(CosmosContainerProperties containerProperties) throws CosmosClientException { + public CosmosContainerResponse replace(CosmosContainerProperties containerProperties) throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.replace(containerProperties)); } @@ -114,8 +103,8 @@ public CosmosSyncContainerResponse replace(CosmosContainerProperties containerPr * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse replace(CosmosContainerProperties containerProperties, - CosmosContainerRequestOptions options) throws CosmosClientException { + public CosmosContainerResponse replace(CosmosContainerProperties containerProperties, + CosmosContainerRequestOptions options) throws CosmosClientException { return database.mapContainerResponseAndBlock(this.containerWrapper.replace(containerProperties, options)); } @@ -126,7 +115,7 @@ public CosmosSyncContainerResponse replace(CosmosContainerProperties containerPr * @throws CosmosClientException the cosmos client exception */ public Integer readProvisionedThroughput() throws CosmosClientException { - return CosmosSyncDatabase.throughputResponseToBlock(this.containerWrapper.readProvisionedThroughput()); + return CosmosDatabase.throughputResponseToBlock(this.containerWrapper.readProvisionedThroughput()); } /** @@ -137,11 +126,11 @@ public Integer readProvisionedThroughput() throws CosmosClientException { * @throws CosmosClientException the cosmos client exception */ public Integer replaceProvisionedThroughput(int requestUnitsPerSecond) throws CosmosClientException { - return CosmosSyncDatabase.throughputResponseToBlock(this.containerWrapper.replaceProvisionedThroughput(requestUnitsPerSecond)); + return CosmosDatabase.throughputResponseToBlock(this.containerWrapper.replaceProvisionedThroughput(requestUnitsPerSecond)); } - /* CosmosItem operations */ + /* CosmosAsyncItem operations */ /** * Create item cosmos sync item response. @@ -150,7 +139,7 @@ public Integer replaceProvisionedThroughput(int requestUnitsPerSecond) throws Co * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse createItem(Object item) throws CosmosClientException { + public CosmosItemResponse createItem(Object item) throws CosmosClientException { return this.mapItemResponseAndBlock(this.containerWrapper.createItem(item)); } @@ -162,7 +151,7 @@ public CosmosSyncItemResponse createItem(Object item) throws CosmosClientExcepti * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse createItem(Object item, CosmosItemRequestOptions options) throws CosmosClientException { + public CosmosItemResponse createItem(Object item, CosmosItemRequestOptions options) throws CosmosClientException { return this.mapItemResponseAndBlock(this.containerWrapper.createItem(item, options)); } @@ -173,7 +162,7 @@ public CosmosSyncItemResponse createItem(Object item, CosmosItemRequestOptions o * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse upsertItem(Object item) throws CosmosClientException { + public CosmosItemResponse upsertItem(Object item) throws CosmosClientException { return this.mapItemResponseAndBlock(this.containerWrapper.upsertItem(item)); } @@ -185,7 +174,7 @@ public CosmosSyncItemResponse upsertItem(Object item) throws CosmosClientExcepti * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse upsertItem(Object item, CosmosItemRequestOptions options) throws CosmosClientException { + public CosmosItemResponse upsertItem(Object item, CosmosItemRequestOptions options) throws CosmosClientException { return this.mapItemResponseAndBlock(this.containerWrapper.createItem(item, options)); } @@ -196,7 +185,7 @@ public CosmosSyncItemResponse upsertItem(Object item, CosmosItemRequestOptions o * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - CosmosSyncItemResponse mapItemResponseAndBlock(Mono itemMono) + CosmosItemResponse mapItemResponseAndBlock(Mono itemMono) throws CosmosClientException { try { return itemMono @@ -261,8 +250,8 @@ public Iterator> queryChangeFeedItems(ChangeF * @param partitionKey the partition key * @return the item */ - public CosmosSyncItem getItem(String id, Object partitionKey) { - return new CosmosSyncItem(id, + public CosmosItem getItem(String id, Object partitionKey) { + return new CosmosItem(id, partitionKey, this, containerWrapper.getItem(id, partitionKey)); @@ -273,22 +262,22 @@ public CosmosSyncItem getItem(String id, Object partitionKey) { * * @return the cosmos sync scripts */ - public CosmosSyncScripts getScripts(){ + public CosmosScripts getScripts(){ if (this.scripts == null) { - this.scripts = new CosmosSyncScripts(this, containerWrapper.getScripts()); + this.scripts = new CosmosScripts(this, containerWrapper.getScripts()); } return this.scripts; } - // TODO: should make partitionkey public in CosmosItem and fix the below call + // TODO: should make partitionkey public in CosmosAsyncItem and fix the below call /** * Convert response cosmos sync item response. * * @param response the cosmos item response * @return the cosmos sync item response */ - private CosmosSyncItemResponse convertResponse(CosmosItemResponse response) { - return new CosmosSyncItemResponse(response, null, this); + private CosmosItemResponse convertResponse(CosmosAsyncItemResponse response) { + return new CosmosItemResponse(response, null, this); } private Iterator> getFeedIterator(Flux> itemFlux) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java index 6f53467e2e2b..a7c8041c0a89 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java @@ -30,12 +30,12 @@ public class CosmosContainerProperties extends Resource { * @param partitionKeyPath partition key path */ public CosmosContainerProperties(String id, String partitionKeyPath) { - super.id(id); + super.setId(id); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add(partitionKeyPath); - partitionKeyDef.paths(paths); - partitionKeyDefinition(partitionKeyDef); + partitionKeyDef.setPaths(paths); + setPartitionKeyDefinition(partitionKeyDef); } /** @@ -44,8 +44,8 @@ public CosmosContainerProperties(String id, String partitionKeyPath) { * @param partitionKeyDefinition the {@link PartitionKeyDefinition} */ public CosmosContainerProperties(String id, PartitionKeyDefinition partitionKeyDefinition) { - super.id(id); - partitionKeyDefinition(partitionKeyDefinition); + super.setId(id); + setPartitionKeyDefinition(partitionKeyDefinition); } CosmosContainerProperties(ResourceResponse response) { @@ -66,7 +66,7 @@ static List getFromV2Results(List * * @return the indexing policy. */ - public IndexingPolicy indexingPolicy() { + public IndexingPolicy getIndexingPolicy() { if (this.indexingPolicy == null) { if (super.has(Constants.Properties.INDEXING_POLICY)) { this.indexingPolicy = super.getObject(Constants.Properties.INDEXING_POLICY, IndexingPolicy.class); @@ -84,7 +84,7 @@ public IndexingPolicy indexingPolicy() { * @param indexingPolicy {@link IndexingPolicy} the indexing policy * @return the CosmosContainerProperties. */ - public CosmosContainerProperties indexingPolicy(IndexingPolicy indexingPolicy) { + public CosmosContainerProperties setIndexingPolicy(IndexingPolicy indexingPolicy) { if (indexingPolicy == null) { throw new IllegalArgumentException("IndexingPolicy cannot be null."); } @@ -98,7 +98,7 @@ public CosmosContainerProperties indexingPolicy(IndexingPolicy indexingPolicy) { * * @return the unique key policy */ - public UniqueKeyPolicy uniqueKeyPolicy() { + public UniqueKeyPolicy getUniqueKeyPolicy() { // Thread safe lazy initialization for case when collection is cached (and is basically readonly). if (this.uniqueKeyPolicy == null) { @@ -118,7 +118,7 @@ public UniqueKeyPolicy uniqueKeyPolicy() { * @param uniqueKeyPolicy the unique key policy * @return the CosmosContainerProperties. */ - public CosmosContainerProperties uniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { + public CosmosContainerProperties setUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { if (uniqueKeyPolicy == null) { throw new IllegalArgumentException("uniqueKeyPolicy cannot be null."); } @@ -133,7 +133,7 @@ public CosmosContainerProperties uniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy * * @return the partition key definition. */ - public PartitionKeyDefinition partitionKeyDefinition() { + public PartitionKeyDefinition getPartitionKeyDefinition() { if (this.partitionKeyDefinition == null) { if (super.has(Constants.Properties.PARTITION_KEY)) { @@ -152,7 +152,7 @@ public PartitionKeyDefinition partitionKeyDefinition() { * @param partitionKeyDefinition the partition key definition. * @return the CosmosContainerProperties. */ - public CosmosContainerProperties partitionKeyDefinition(PartitionKeyDefinition partitionKeyDefinition) { + public CosmosContainerProperties setPartitionKeyDefinition(PartitionKeyDefinition partitionKeyDefinition) { if (partitionKeyDefinition == null) { throw new IllegalArgumentException("partitionKeyDefinition cannot be null."); } @@ -167,7 +167,7 @@ public CosmosContainerProperties partitionKeyDefinition(PartitionKeyDefinition p * * @return ConflictResolutionPolicy */ - public ConflictResolutionPolicy conflictResolutionPolicy() { + public ConflictResolutionPolicy getConflictResolutionPolicy() { return super.getObject(Constants.Properties.CONFLICT_RESOLUTION_POLICY, ConflictResolutionPolicy.class); } @@ -178,7 +178,7 @@ public ConflictResolutionPolicy conflictResolutionPolicy() { * @param value ConflictResolutionPolicy to be used. * @return the CosmosContainerProperties. */ - public CosmosContainerProperties conflictResolutionPolicy(ConflictResolutionPolicy value) { + public CosmosContainerProperties setConflictResolutionPolicy(ConflictResolutionPolicy value) { if (value == null) { throw new IllegalArgumentException("CONFLICT_RESOLUTION_POLICY cannot be null."); } @@ -189,8 +189,8 @@ public CosmosContainerProperties conflictResolutionPolicy(ConflictResolutionPoli DocumentCollection getV2Collection(){ DocumentCollection collection = new DocumentCollection(this.toJson()); - collection.setPartitionKey(this.partitionKeyDefinition()); - collection.setIndexingPolicy(this.indexingPolicy()); + collection.setPartitionKey(this.getPartitionKeyDefinition()); + collection.setIndexingPolicy(this.getIndexingPolicy()); return collection; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java similarity index 84% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java index f23b5a63c5a0..a4b1eb1ba59b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerRequestOptions.java @@ -19,7 +19,7 @@ public class CosmosContainerRequestOptions { * * @return the throughput value. */ - Integer offerThroughput() { + Integer getOfferThroughput() { return offerThroughput; } @@ -29,7 +29,7 @@ Integer offerThroughput() { * @param offerThroughput the throughput value. * @return the current request options */ - CosmosContainerRequestOptions offerThroughput(Integer offerThroughput) { + CosmosContainerRequestOptions setOfferThroughput(Integer offerThroughput) { this.offerThroughput = offerThroughput; return this; } @@ -41,7 +41,7 @@ CosmosContainerRequestOptions offerThroughput(Integer offerThroughput) { * * @return true if PopulateQuotaInfo is enabled */ - public boolean populateQuotaInfo() { + public boolean getPopulateQuotaInfo() { return populateQuotaInfo; } @@ -53,7 +53,7 @@ public boolean populateQuotaInfo() { * @param populateQuotaInfo a boolean value indicating whether PopulateQuotaInfo is enabled or not * @return the current request options */ - public CosmosContainerRequestOptions populateQuotaInfo(boolean populateQuotaInfo) { + public CosmosContainerRequestOptions setPopulateQuotaInfo(boolean populateQuotaInfo) { this.populateQuotaInfo = populateQuotaInfo; return this; } @@ -63,7 +63,7 @@ public CosmosContainerRequestOptions populateQuotaInfo(boolean populateQuotaInfo * * @return the consistency level. */ - public ConsistencyLevel consistencyLevel() { + public ConsistencyLevel getConsistencyLevel() { return consistencyLevel; } @@ -73,7 +73,7 @@ public ConsistencyLevel consistencyLevel() { * @param consistencyLevel the consistency level. * @return the current request options */ - public CosmosContainerRequestOptions consistencyLevel(ConsistencyLevel consistencyLevel) { + public CosmosContainerRequestOptions setConsistencyLevel(ConsistencyLevel consistencyLevel) { this.consistencyLevel = consistencyLevel; return this; } @@ -83,7 +83,7 @@ public CosmosContainerRequestOptions consistencyLevel(ConsistencyLevel consisten * * @return the session token. */ - public String sessionToken() { + public String getSessionToken() { return sessionToken; } @@ -93,7 +93,7 @@ public String sessionToken() { * @param sessionToken the session token. * @return the current request options */ - public CosmosContainerRequestOptions sessionToken(String sessionToken) { + public CosmosContainerRequestOptions setSessionToken(String sessionToken) { this.sessionToken = sessionToken; return this; } @@ -103,7 +103,7 @@ public CosmosContainerRequestOptions sessionToken(String sessionToken) { * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -113,7 +113,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosContainerRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosContainerRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } @@ -127,4 +127,4 @@ RequestOptions toRequestOptions() { options.setConsistencyLevel(consistencyLevel); return options; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java new file mode 100644 index 000000000000..b702bb56eadf --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerResponse.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.cosmos; + +/** + * The synchronous cosmos container response + */ +public class CosmosContainerResponse extends CosmosResponse { + + private final CosmosAsyncContainerResponse responseWrapper; + private final CosmosContainer container; + + CosmosContainerResponse(CosmosAsyncContainerResponse response, CosmosDatabase database, CosmosClient client) { + super(response.getProperties()); + this.responseWrapper = response; + if (responseWrapper.getContainer() != null) { + this.container = new CosmosContainer(responseWrapper.getContainer().getId(), database, responseWrapper.getContainer()); + } else { + // Delete will have null container client in response + this.container = null; + } + } + + /** + * Gets the progress of an index transformation, if one is underway. + * + * @return the progress of an index transformation. + */ + public long getIndexTransformationProgress() { + return responseWrapper.getIndexTransformationProgress(); + } + + /** + * Gets the container properties + * + * @return the cosmos container properties + */ + public CosmosContainerProperties getProperties() { + return responseWrapper.getProperties(); + } + + /** + * Gets the Container object + * + * @return the Cosmos container object + */ + public CosmosContainer getContainer() { + return container; + } +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabase.java similarity index 73% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabase.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabase.java index 5e41a32d534b..b94d729f0dd4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabase.java @@ -1,19 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.CosmosUserResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import reactor.core.Exceptions; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -24,10 +13,10 @@ * Perform read and delete databases, update database throughput, and perform operations on child resources in * a synchronous way */ -public class CosmosSyncDatabase { +public class CosmosDatabase { - private final CosmosDatabase databaseWrapper; - private final CosmosSyncClient client; + private final CosmosAsyncDatabase databaseWrapper; + private final CosmosClient client; private final String id; /** @@ -37,28 +26,28 @@ public class CosmosSyncDatabase { * @param client the client * @param database the database */ - CosmosSyncDatabase(String id, CosmosSyncClient client, CosmosDatabase database) { + CosmosDatabase(String id, CosmosClient client, CosmosAsyncDatabase database) { this.id = id; this.client = client; this.databaseWrapper = database; } /** - * Get the id of the CosmosDatabase + * Get the id of the CosmosAsyncDatabase * * @return the id of the database */ - public String id() { + public String getId() { return id; } /** * Reads a database * - * @return the {@link CosmosSyncDatabaseResponse} + * @return the {@link CosmosDatabaseResponse} * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncDatabaseResponse read() throws CosmosClientException { + public CosmosDatabaseResponse read() throws CosmosClientException { return client.mapDatabaseResponseAndBlock((databaseWrapper.read())); } @@ -66,20 +55,20 @@ public CosmosSyncDatabaseResponse read() throws CosmosClientException { * Reads a database. * * @param options the {@link CosmosDatabaseRequestOptions} request options. - * @return the {@link CosmosSyncDatabaseResponse} + * @return the {@link CosmosDatabaseResponse} * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncDatabaseResponse read(CosmosDatabaseRequestOptions options) throws CosmosClientException { + public CosmosDatabaseResponse read(CosmosDatabaseRequestOptions options) throws CosmosClientException { return client.mapDatabaseResponseAndBlock(databaseWrapper.read(options)); } /** * Delete a database. * - * @return the {@link CosmosSyncDatabaseResponse} + * @return the {@link CosmosDatabaseResponse} * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncDatabaseResponse delete() throws CosmosClientException { + public CosmosDatabaseResponse delete() throws CosmosClientException { return client.mapDatabaseResponseAndBlock(databaseWrapper.delete()); } @@ -87,23 +76,23 @@ public CosmosSyncDatabaseResponse delete() throws CosmosClientException { * Delete a database. * * @param options the {@link CosmosDatabaseRequestOptions} request options. - * @return the {@link CosmosSyncDatabaseResponse} + * @return the {@link CosmosDatabaseResponse} * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncDatabaseResponse delete(CosmosDatabaseRequestOptions options) throws CosmosClientException { + public CosmosDatabaseResponse delete(CosmosDatabaseRequestOptions options) throws CosmosClientException { return client.mapDatabaseResponseAndBlock(databaseWrapper.delete(options)); } - /* CosmosContainer operations */ + /* CosmosAsyncContainer operations */ /** * Creates a cosmos container. * * @param containerProperties the {@link CosmosContainerProperties} - * @return the {@link CosmosSyncContainerResponse} with the created container. + * @return the {@link CosmosContainerResponse} with the created container. * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(CosmosContainerProperties containerProperties) throws CosmosClientException { + public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(containerProperties)); } @@ -112,11 +101,11 @@ public CosmosSyncContainerResponse createContainer(CosmosContainerProperties con * * @param containerProperties the {@link CosmosContainerProperties} * @param throughput the throughput - * @return the {@link CosmosSyncContainerResponse} with the created container. + * @return the {@link CosmosContainerResponse} with the created container. * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(CosmosContainerProperties containerProperties, - int throughput) throws CosmosClientException { + public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, + int throughput) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(containerProperties, throughput)); } @@ -125,11 +114,11 @@ public CosmosSyncContainerResponse createContainer(CosmosContainerProperties con * * @param containerProperties the {@link CosmosContainerProperties} * @param options the {@link CosmosContainerProperties} - * @return the {@link CosmosSyncContainerResponse} with the created container. + * @return the {@link CosmosContainerResponse} with the created container. * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(CosmosContainerProperties containerProperties, - CosmosContainerRequestOptions options) throws CosmosClientException { + public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, + CosmosContainerRequestOptions options) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(containerProperties, options)); } @@ -139,12 +128,12 @@ public CosmosSyncContainerResponse createContainer(CosmosContainerProperties con * @param containerProperties the {@link CosmosContainerProperties} * @param throughput the throughput * @param options the {@link CosmosContainerProperties} - * @return the {@link CosmosSyncContainerResponse} with the created container. + * @return the {@link CosmosContainerResponse} with the created container. * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(CosmosContainerProperties containerProperties, - int throughput, - CosmosContainerRequestOptions options) throws CosmosClientException { + public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, + int throughput, + CosmosContainerRequestOptions options) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(containerProperties, throughput, options)); @@ -158,7 +147,7 @@ public CosmosSyncContainerResponse createContainer(CosmosContainerProperties con * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(String id, String partitionKeyPath) throws CosmosClientException { + public CosmosContainerResponse createContainer(String id, String partitionKeyPath) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(id, partitionKeyPath)); } @@ -171,7 +160,7 @@ public CosmosSyncContainerResponse createContainer(String id, String partitionKe * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainer(String id, String partitionKeyPath, int throughput) throws CosmosClientException { + public CosmosContainerResponse createContainer(String id, String partitionKeyPath, int throughput) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainer(id, partitionKeyPath, throughput)); } @@ -182,7 +171,7 @@ public CosmosSyncContainerResponse createContainer(String id, String partitionKe * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties) + public CosmosContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainerIfNotExists(containerProperties)); } @@ -195,8 +184,8 @@ public CosmosSyncContainerResponse createContainerIfNotExists(CosmosContainerPro * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties, - int throughput) throws CosmosClientException { + public CosmosContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties, + int throughput) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainerIfNotExists(containerProperties, throughput)); } @@ -208,8 +197,8 @@ public CosmosSyncContainerResponse createContainerIfNotExists(CosmosContainerPro * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainerIfNotExists(String id, - String partitionKeyPath) throws CosmosClientException { + public CosmosContainerResponse createContainerIfNotExists(String id, + String partitionKeyPath) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainerIfNotExists(id, partitionKeyPath)); } @@ -222,8 +211,8 @@ public CosmosSyncContainerResponse createContainerIfNotExists(String id, * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncContainerResponse createContainerIfNotExists(String id, String partitionKeyPath, - int throughput) throws CosmosClientException { + public CosmosContainerResponse createContainerIfNotExists(String id, String partitionKeyPath, + int throughput) throws CosmosClientException { return this.mapContainerResponseAndBlock(databaseWrapper.createContainerIfNotExists(id, partitionKeyPath, throughput)); @@ -236,7 +225,7 @@ public CosmosSyncContainerResponse createContainerIfNotExists(String id, String * @return the cosmos sync container response * @throws CosmosClientException the cosmos client exception */ - CosmosSyncContainerResponse mapContainerResponseAndBlock(Mono containerMono) + CosmosContainerResponse mapContainerResponseAndBlock(Mono containerMono) throws CosmosClientException { try { return containerMono @@ -326,13 +315,13 @@ public Iterator> queryContainers(SqlQuer } /** - * Gets a CosmosSyncContainer object without making a service call + * Gets a CosmosContainer object without making a service call * * @param id id of the container * @return Cosmos Container */ - public CosmosSyncContainer getContainer(String id) { - return new CosmosSyncContainer(id, this, databaseWrapper.getContainer(id)); + public CosmosContainer getContainer(String id) { + return new CosmosContainer(id, this, databaseWrapper.getContainer(id)); } /** @@ -341,8 +330,8 @@ public CosmosSyncContainer getContainer(String id) { * @param response the response * @return the cosmos sync container response */ - CosmosSyncContainerResponse convertResponse(CosmosContainerResponse response) { - return new CosmosSyncContainerResponse(response, this, client); + CosmosContainerResponse convertResponse(CosmosAsyncContainerResponse response) { + return new CosmosContainerResponse(response, this, client); } /* Users */ @@ -354,7 +343,7 @@ CosmosSyncContainerResponse convertResponse(CosmosContainerResponse response) { * @return the cosmos sync user response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserResponse createUser(CosmosUserProperties settings) throws CosmosClientException { + public CosmosUserResponse createUser(CosmosUserProperties settings) throws CosmosClientException { return mapUserResponseAndBlock(databaseWrapper.createUser(settings)); } @@ -365,7 +354,7 @@ public CosmosSyncUserResponse createUser(CosmosUserProperties settings) throws C * @return the cosmos sync user response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserResponse upsertUser(CosmosUserProperties settings) throws CosmosClientException { + public CosmosUserResponse upsertUser(CosmosUserProperties settings) throws CosmosClientException { return mapUserResponseAndBlock(databaseWrapper.upsertUser(settings)); } @@ -436,11 +425,11 @@ public Iterator> queryUsers(SqlQuerySpec quer * @param id the id * @return the user */ - public CosmosSyncUser getUser(String id) { - return new CosmosSyncUser(databaseWrapper.getUser(id), this, id); + public CosmosUser getUser(String id) { + return new CosmosUser(databaseWrapper.getUser(id), this, id); } - CosmosSyncUserResponse mapUserResponseAndBlock(Mono containerMono) + CosmosUserResponse mapUserResponseAndBlock(Mono containerMono) throws CosmosClientException { try { return containerMono.map(this::convertUserResponse).block(); @@ -454,8 +443,8 @@ CosmosSyncUserResponse mapUserResponseAndBlock(Mono containe } } - private CosmosSyncUserResponse convertUserResponse(CosmosUserResponse response) { - return new CosmosSyncUserResponse(response, this); + private CosmosUserResponse convertUserResponse(CosmosAsyncUserResponse response) { + return new CosmosUserResponse(response, this); } /** diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java index 554add12d504..eb3652bcad5a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseProperties.java @@ -9,7 +9,7 @@ import java.util.stream.Collectors; /** - * Represents a CosmosDatabase in the Azure Cosmos database service. A cosmos database manages users, permissions and a set of containers + * Represents a CosmosAsyncDatabase in the Azure Cosmos database service. A cosmos database manages users, permissions and a set of containers *

* Each Azure Cosmos DB Service is able to support multiple independent named databases, with the database being the * logical container for data. Each Database consists of one or more cosmos containers, each of which in turn contain one or @@ -23,7 +23,7 @@ public class CosmosDatabaseProperties extends Resource { * @param id id of the database */ public CosmosDatabaseProperties(String id) { - super.id(id); + super.setId(id); } CosmosDatabaseProperties(ResourceResponse response) { @@ -38,4 +38,4 @@ public CosmosDatabaseProperties(String id) { static List getFromV2Results(List results){ return results.stream().map(CosmosDatabaseProperties::new).collect(Collectors.toList()); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java index 2ad9771b2ecc..679a15a1f6f0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseRequestOptions.java @@ -16,7 +16,7 @@ public class CosmosDatabaseRequestOptions{ * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -26,7 +26,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosDatabaseRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosDatabaseRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } @@ -36,7 +36,7 @@ public CosmosDatabaseRequestOptions accessCondition(AccessCondition accessCondit * * @return the throughput value. */ - Integer offerThroughput() { + Integer getOfferThroughput() { return offerThroughput; } @@ -46,7 +46,7 @@ Integer offerThroughput() { * @param offerThroughput the throughput value. * @return the current request options */ - CosmosDatabaseRequestOptions offerThroughput(Integer offerThroughput) { + CosmosDatabaseRequestOptions setOfferThroughput(Integer offerThroughput) { this.offerThroughput = offerThroughput; return this; } @@ -57,4 +57,4 @@ RequestOptions toRequestOptions() { options.setOfferThroughput(offerThroughput); return options; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java new file mode 100644 index 000000000000..a92205d2b64e --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.cosmos; + +public class CosmosDatabaseResponse extends CosmosResponse { + private final CosmosAsyncDatabaseResponse responseWrapper; + private final CosmosDatabase database; + + CosmosDatabaseResponse(CosmosAsyncDatabaseResponse response, CosmosClient client) { + super(response.getProperties()); + this.responseWrapper = response; + if (responseWrapper.getDatabase() != null) { + this.database = new CosmosDatabase(responseWrapper.getDatabase().getId(), client, responseWrapper.getDatabase()); + } else { + this.database = null; + } + } + + /** + * Gets the CosmosAsyncDatabase object + * + * @return {@link CosmosDatabase} + */ + public CosmosDatabase getDatabase() { + return database; + } + + /** + * Gets the cosmos database properties + * + * @return the cosmos database properties + */ + public CosmosDatabaseProperties getProperties() { + return responseWrapper.getProperties(); + } + + /** + * Gets the Max Quota. + * + * @return the database quota. + */ + public long getDatabaseQuota() { + return responseWrapper.getDatabaseQuota(); + } + + /** + * Gets the current Usage. + * + * @return the current database usage. + */ + public long getDatabaseUsage() { + return responseWrapper.getDatabaseUsage(); + } + +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosError.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosError.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosError.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosError.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItem.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java similarity index 62% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItem.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java index 1c459cc69921..b71374d9e8bd 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItem.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItem.java @@ -1,18 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemRequestOptions; +package com.azure.data.cosmos; /** * The Cosmos synchronous item. */ -public class CosmosSyncItem { - private final CosmosSyncContainer container; - private final CosmosItem asyncItem; +public class CosmosItem { + private final CosmosContainer container; + private final CosmosAsyncItem asyncItem; private final String id; private final Object partitionKey; @@ -21,13 +17,13 @@ public class CosmosSyncItem { * * @param id the id * @param partitionKey the partition key - * @param cosmosSyncContainer the cosmos sync container + * @param cosmosContainer the cosmos sync container * @param item the item */ - CosmosSyncItem(String id, Object partitionKey, CosmosSyncContainer cosmosSyncContainer, CosmosItem item) { + CosmosItem(String id, Object partitionKey, CosmosContainer cosmosContainer, CosmosAsyncItem item) { this.id = id; this.partitionKey = partitionKey; - this.container = cosmosSyncContainer; + this.container = cosmosContainer; this.asyncItem = item; } @@ -36,16 +32,16 @@ public class CosmosSyncItem { * * @return the string */ - public String id() { + public String getId() { return id; } /** - * Partition key object. + * Partition getKey object. * * @return the object */ - public Object partitionKey() { + public Object getPartitionKey() { return partitionKey; } @@ -56,7 +52,7 @@ public Object partitionKey() { * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse read(CosmosItemRequestOptions options) throws CosmosClientException { + public CosmosItemResponse read(CosmosItemRequestOptions options) throws CosmosClientException { return container.mapItemResponseAndBlock(asyncItem.read(options)); } @@ -68,7 +64,7 @@ public CosmosSyncItemResponse read(CosmosItemRequestOptions options) throws Cosm * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse replace(Object item, CosmosItemRequestOptions options) throws CosmosClientException { + public CosmosItemResponse replace(Object item, CosmosItemRequestOptions options) throws CosmosClientException { return container.mapItemResponseAndBlock(asyncItem.replace(item, options)); } @@ -79,7 +75,7 @@ public CosmosSyncItemResponse replace(Object item, CosmosItemRequestOptions opti * @return the cosmos sync item response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncItemResponse delete(CosmosItemRequestOptions options) throws CosmosClientException { + public CosmosItemResponse delete(CosmosItemRequestOptions options) throws CosmosClientException { return container.mapItemResponseAndBlock(asyncItem.delete(options)); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java index 441b872f3f1d..b91234a6f058 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemProperties.java @@ -26,8 +26,8 @@ public CosmosItemProperties() { * @param id the name of the resource. * @return the cosmos item properties with id set */ - public CosmosItemProperties id(String id) { - super.id(id); + public CosmosItemProperties setId(String id) { + super.setId(id); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java similarity index 78% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java index 188db483dca0..757fbf27ef9a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemRequestOptions.java @@ -32,9 +32,9 @@ public CosmosItemRequestOptions(){ public CosmosItemRequestOptions(Object partitionKey){ super(); if (partitionKey instanceof PartitionKey) { - partitionKey((PartitionKey) partitionKey); + setPartitionKey((PartitionKey) partitionKey); } else { - partitionKey(new PartitionKey(partitionKey)); + setPartitionKey(new PartitionKey(partitionKey)); } } @@ -43,7 +43,7 @@ public CosmosItemRequestOptions(Object partitionKey){ * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -53,7 +53,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosItemRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosItemRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } @@ -63,7 +63,7 @@ public CosmosItemRequestOptions accessCondition(AccessCondition accessCondition) * * @return the consistency level. */ - public ConsistencyLevel consistencyLevel() { + public ConsistencyLevel getConsistencyLevel() { return consistencyLevel; } @@ -73,7 +73,7 @@ public ConsistencyLevel consistencyLevel() { * @param consistencyLevel the consistency level. * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions consistencyLevel(ConsistencyLevel consistencyLevel) { + public CosmosItemRequestOptions setConsistencyLevel(ConsistencyLevel consistencyLevel) { this.consistencyLevel = consistencyLevel; return this; } @@ -83,7 +83,7 @@ public CosmosItemRequestOptions consistencyLevel(ConsistencyLevel consistencyLev * * @return the indexing directive. */ - public IndexingDirective indexingDirective() { + public IndexingDirective getIndexingDirective() { return indexingDirective; } @@ -93,7 +93,7 @@ public IndexingDirective indexingDirective() { * @param indexingDirective the indexing directive. * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions indexingDirective(IndexingDirective indexingDirective) { + public CosmosItemRequestOptions setIndexingDirective(IndexingDirective indexingDirective) { this.indexingDirective = indexingDirective; return this; } @@ -103,7 +103,7 @@ public CosmosItemRequestOptions indexingDirective(IndexingDirective indexingDire * * @return the triggers to be invoked before the operation. */ - public List preTriggerInclude() { + public List getPreTriggerInclude() { return preTriggerInclude; } @@ -113,7 +113,7 @@ public List preTriggerInclude() { * @param preTriggerInclude the triggers to be invoked before the operation. * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions preTriggerInclude(List preTriggerInclude) { + public CosmosItemRequestOptions setPreTriggerInclude(List preTriggerInclude) { this.preTriggerInclude = preTriggerInclude; return this; } @@ -123,7 +123,7 @@ public CosmosItemRequestOptions preTriggerInclude(List preTriggerInclude * * @return the triggers to be invoked after the operation. */ - public List postTriggerInclude() { + public List getPostTriggerInclude() { return postTriggerInclude; } @@ -133,7 +133,7 @@ public List postTriggerInclude() { * @param postTriggerInclude the triggers to be invoked after the operation. * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions postTriggerInclude(List postTriggerInclude) { + public CosmosItemRequestOptions setPostTriggerInclude(List postTriggerInclude) { this.postTriggerInclude = postTriggerInclude; return this; } @@ -143,7 +143,7 @@ public CosmosItemRequestOptions postTriggerInclude(List postTriggerInclu * * @return the session token. */ - public String sessionToken() { + public String getSessionToken() { return sessionToken; } @@ -153,7 +153,7 @@ public String sessionToken() { * @param sessionToken the session token. * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions sessionToken(String sessionToken) { + public CosmosItemRequestOptions setSessionToken(String sessionToken) { this.sessionToken = sessionToken; return this; } @@ -163,7 +163,7 @@ public CosmosItemRequestOptions sessionToken(String sessionToken) { * @param partitionKey the partition key * @return the CosmosItemRequestOptions. */ - public CosmosItemRequestOptions partitionKey(PartitionKey partitionKey) { + public CosmosItemRequestOptions setPartitionKey(PartitionKey partitionKey) { this.partitionKey = partitionKey; return this; } @@ -172,7 +172,7 @@ public CosmosItemRequestOptions partitionKey(PartitionKey partitionKey) { * Gets the partition key * @return the partition key */ - public PartitionKey partitionKey() { + public PartitionKey getPartitionKey() { return partitionKey; } @@ -180,8 +180,8 @@ RequestOptions toRequestOptions() { //TODO: Should we set any default values instead of nulls? RequestOptions requestOptions = new RequestOptions(); requestOptions.setAccessCondition(accessCondition); - requestOptions.setAccessCondition(accessCondition()); - requestOptions.setConsistencyLevel(consistencyLevel()); + requestOptions.setAccessCondition(getAccessCondition()); + requestOptions.setConsistencyLevel(getConsistencyLevel()); requestOptions.setIndexingDirective(indexingDirective); requestOptions.setPreTriggerInclude(preTriggerInclude); requestOptions.setPostTriggerInclude(postTriggerInclude); @@ -189,4 +189,4 @@ RequestOptions toRequestOptions() { requestOptions.setPartitionKey(partitionKey); return requestOptions; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java new file mode 100644 index 000000000000..7924b35dd7a4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.cosmos; + +public class CosmosItemResponse extends CosmosResponse { + private final CosmosAsyncItemResponse responseWrapper; + private final CosmosItem item; + + + CosmosItemResponse(CosmosAsyncItemResponse response, PartitionKey partitionKey, CosmosContainer container) { + super(response.getProperties()); + this.responseWrapper = response; + if (responseWrapper.getItem() != null) { + this.item = new CosmosItem(responseWrapper.getItem().getId(), partitionKey, container, responseWrapper.getItem()); + } else { + // Delete will have null container client in response + this.item = null; + } + } + + /** + * Gets the itemSettings + * + * @return the itemSettings + */ + public CosmosItemProperties getProperties() { + return responseWrapper.getProperties(); + } + + /** + * Gets the CosmosAsyncItem + * + * @return the cosmos item + */ + public CosmosItem getItem() { + return item; + } +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java index 6ada00a4db5b..4e82cfdab18e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosKeyCredential.java @@ -6,7 +6,7 @@ * Cosmos Key Credential is used to store key credentials, in order to support dynamic key rotation. * Singleton instance should be used to support multiple keys. * Azure client library for Cosmos ensures to use the updated key provided in the same singleton instance - * which was used when building {@link CosmosClient} + * which was used when building {@link CosmosAsyncClient} */ public class CosmosKeyCredential { @@ -24,7 +24,7 @@ public CosmosKeyCredential(String key) { * Returns the key stored in Cosmos Key Credential * @return key */ - public String key() { + public String getKey() { return key; } @@ -33,7 +33,7 @@ public String key() { * @param key key to be used in CosmosKeyCredential * @return current CosmosKeyCredential */ - public CosmosKeyCredential key(String key) { + public CosmosKeyCredential setKey(String key) { this.key = key; this.keyHashCode = key.hashCode(); return this; @@ -43,7 +43,7 @@ public CosmosKeyCredential key(String key) { * CosmosKeyCredential stores the computed hashcode of the key for performance improvements. * @return hashcode of the key */ - public int keyHashCode() { + public int getKeyHashCode() { return this.keyHashCode; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java index 6abfd0dc3772..058029500a05 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionProperties.java @@ -28,15 +28,15 @@ public CosmosPermissionProperties() { * @param id the name of the resource. * @return the current {@link CosmosPermissionProperties} object */ - public CosmosPermissionProperties id(String id) { - super.id(id); + public CosmosPermissionProperties setId(String id) { + super.setId(id); return this; } /** * Initialize a permission object from json string. * - * @param jsonString the json string that represents the permission. + * @param jsonString the json string that represents the getPermission. */ CosmosPermissionProperties(String jsonString) { super(jsonString); @@ -47,7 +47,7 @@ public CosmosPermissionProperties id(String id) { * * @return the resource link. */ - public String resourceLink() { + public String getResourceLink() { return super.getString(Constants.Properties.RESOURCE_LINK); } @@ -57,7 +57,7 @@ public String resourceLink() { * @param resourceLink the resource link. * @return the current {@link CosmosPermissionProperties} object */ - public CosmosPermissionProperties resourceLink(String resourceLink) { + public CosmosPermissionProperties setResourceLink(String resourceLink) { super.set(Constants.Properties.RESOURCE_LINK, resourceLink); return this; } @@ -67,7 +67,7 @@ public CosmosPermissionProperties resourceLink(String resourceLink) { * * @return the permission mode. */ - public PermissionMode permissionMode() { + public PermissionMode getPermissionMode() { String value = super.getString(Constants.Properties.PERMISSION_MODE); return PermissionMode.valueOf(StringUtils.upperCase(value)); } @@ -78,7 +78,7 @@ public PermissionMode permissionMode() { * @param permissionMode the permission mode. * @return the current {@link CosmosPermissionProperties} object */ - public CosmosPermissionProperties permissionMode(PermissionMode permissionMode) { + public CosmosPermissionProperties setPermissionMode(PermissionMode permissionMode) { this.set(Constants.Properties.PERMISSION_MODE, permissionMode.toString().toLowerCase()); return this; @@ -107,7 +107,7 @@ public CosmosPermissionProperties permissionMode(PermissionMode permissionMode) * @param partitionKey the partition key. * @return the current {@link CosmosPermissionProperties} object */ - public CosmosPermissionProperties resourcePartitionKey(PartitionKey partitionKey) { + public CosmosPermissionProperties setResourcePartitionKey(PartitionKey partitionKey) { super.set(Constants.Properties.RESOURCE_PARTITION_KEY, partitionKey.getInternalPartitionKey().toJson()); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java similarity index 83% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java index b721d9252ba0..c95ab001dd35 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionRequestOptions.java @@ -5,7 +5,7 @@ import com.azure.data.cosmos.internal.RequestOptions; /** - * Contains the request options of CosmosPermission + * Contains the request options of CosmosAsyncPermission */ public class CosmosPermissionRequestOptions { //TODO: Need to add respective options @@ -16,7 +16,7 @@ public class CosmosPermissionRequestOptions { * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -26,7 +26,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosPermissionRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosPermissionRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResourceType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResourceType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResourceType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResourceType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java similarity index 76% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java index c47c7ded05ae..331691e59ffa 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponse.java @@ -9,27 +9,27 @@ import java.util.Map; public class CosmosResponse { - private T resourceSettings; + private T properties; ResourceResponse resourceResponseWrapper; CosmosResponse(ResourceResponse resourceResponse){ this.resourceResponseWrapper = resourceResponse; } - CosmosResponse(T resourceSettings){ - this.resourceSettings = resourceSettings; + CosmosResponse(T properties){ + this.properties = properties; } - // Only used in CosmosStoredProcedureResponse compatibility with StoredProcedureResponse + // Only used in CosmosAsyncStoredProcedureResponse compatibility with StoredProcedureResponse CosmosResponse(StoredProcedureResponse response) { } - T resourceSettings() { - return resourceSettings; + public T getProperties() { + return properties; } - CosmosResponse resourceSettings(T resourceSettings){ - this.resourceSettings = resourceSettings; + CosmosResponse setProperties(T resourceSettings){ + this.properties = resourceSettings; return this; } @@ -39,7 +39,7 @@ CosmosResponse resourceSettings(T resourceSettings){ * * @return the max resource quota. */ - public String maxResourceQuota() { + public String getMaxResourceQuota() { return resourceResponseWrapper.getMaxResourceQuota(); } @@ -48,16 +48,16 @@ public String maxResourceQuota() { * * @return the current resource quota usage. */ - public String currentResourceQuotaUsage() { + public String getCurrentResourceQuotaUsage() { return resourceResponseWrapper.getCurrentResourceQuotaUsage(); } /** * Gets the Activity ID for the request. * - * @return the activity id. + * @return the activity getId. */ - public String activityId() { + public String getActivityId() { return resourceResponseWrapper.getActivityId(); } @@ -66,7 +66,7 @@ public String activityId() { * * @return the request charge. */ - public double requestCharge() { + public double getRequestCharge() { return resourceResponseWrapper.getRequestCharge(); } @@ -75,7 +75,7 @@ public double requestCharge() { * * @return the status code. */ - public int statusCode() { + public int getStatusCode() { return resourceResponseWrapper.getStatusCode(); } @@ -84,7 +84,7 @@ public int statusCode() { * * @return the session token. */ - public String sessionToken(){ + public String getSessionToken(){ return resourceResponseWrapper.getSessionToken(); } @@ -93,7 +93,7 @@ public String sessionToken(){ * * @return the response headers. */ - public Map responseHeaders() { + public Map getResponseHeaders() { return resourceResponseWrapper.getResponseHeaders(); } @@ -102,7 +102,7 @@ public Map responseHeaders() { * * @return diagnostics information for the current request to Azure Cosmos DB service. */ - public CosmosResponseDiagnostics cosmosResponseDiagnosticsString() { + public CosmosResponseDiagnostics getCosmosResponseDiagnosticsString() { return resourceResponseWrapper.getCosmosResponseDiagnostics(); } @@ -111,7 +111,7 @@ public CosmosResponseDiagnostics cosmosResponseDiagnosticsString() { * * @return end-to-end request latency for the current request to Azure Cosmos DB service. */ - public Duration requestLatency() { + public Duration getRequestLatency() { return resourceResponseWrapper.getRequestLatency(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java index 3d7268eef5bb..cae7015a4bd4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosResponseDiagnostics.java @@ -37,7 +37,7 @@ public String toString() { * Retrieves latency related to the completion of the request * @return request completion latency */ - public Duration requestLatency() { + public Duration getRequestLatency() { return this.clientSideRequestStatistics.getRequestLatency(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncScripts.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java similarity index 69% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncScripts.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java index 7d4fafff6faf..9afc676ab7b1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncScripts.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosScripts.java @@ -1,21 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosScripts; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.CosmosStoredProcedureResponse; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.CosmosTriggerResponse; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; -import com.azure.data.cosmos.CosmosUserDefinedFunctionResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import reactor.core.Exceptions; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -25,9 +12,9 @@ /** * The type Cosmos sync scripts. */ -public class CosmosSyncScripts { - private final CosmosSyncContainer container; - private final CosmosScripts asyncScripts; +public class CosmosScripts { + private final CosmosContainer container; + private final CosmosAsyncScripts asyncScripts; /** * Instantiates a new Cosmos sync scripts. @@ -35,11 +22,11 @@ public class CosmosSyncScripts { * @param container the container * @param asyncScripts the async scripts */ - CosmosSyncScripts(CosmosSyncContainer container, CosmosScripts asyncScripts) { + CosmosScripts(CosmosContainer container, CosmosAsyncScripts asyncScripts) { this.container = container; this.asyncScripts = asyncScripts; } - /* CosmosStoredProcedure operations */ + /* CosmosAsyncStoredProcedure operations */ /** * Create stored procedure @@ -48,7 +35,7 @@ public class CosmosSyncScripts { * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties) + public CosmosStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties) throws CosmosClientException { return mapStoredProcedureResponseAndBlock(asyncScripts.createStoredProcedure(properties, new CosmosStoredProcedureRequestOptions())); @@ -62,8 +49,8 @@ public CosmosSyncStoredProcedureResponse createStoredProcedure(CosmosStoredProce * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties, - CosmosStoredProcedureRequestOptions options) throws CosmosClientException { + public CosmosStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties, + CosmosStoredProcedureRequestOptions options) throws CosmosClientException { return mapStoredProcedureResponseAndBlock(asyncScripts.createStoredProcedure(properties, options)); } @@ -109,8 +96,8 @@ public Iterator> queryStoredProced * @param id the id * @return the stored procedure */ - public CosmosSyncStoredProcedure getStoredProcedure(String id) { - return new CosmosSyncStoredProcedure(id, + public CosmosStoredProcedure getStoredProcedure(String id) { + return new CosmosStoredProcedure(id, this.container, asyncScripts.getStoredProcedure(id)); } @@ -125,7 +112,7 @@ public CosmosSyncStoredProcedure getStoredProcedure(String id) { * @return the cosmos sync user defined function response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserDefinedFunctionResponse createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties) throws CosmosClientException { + public CosmosUserDefinedFunctionResponse createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties) throws CosmosClientException { return mapUDFResponseAndBlock(asyncScripts.createUserDefinedFunction(properties)); } @@ -169,8 +156,8 @@ public Iterator> queryUserDefi * @param id the id * @return the user defined function */ - public CosmosSyncUserDefinedFunction getUserDefinedFunction(String id) { - return new CosmosSyncUserDefinedFunction(id, + public CosmosUserDefinedFunction getUserDefinedFunction(String id) { + return new CosmosUserDefinedFunction(id, this.container, asyncScripts.getUserDefinedFunction(id)); } @@ -183,7 +170,7 @@ public CosmosSyncUserDefinedFunction getUserDefinedFunction(String id) { * @throws CosmosClientException the cosmos client exception */ /* Trigger Operations */ - public CosmosSyncTriggerResponse createTrigger(CosmosTriggerProperties properties) throws CosmosClientException { + public CosmosTriggerResponse createTrigger(CosmosTriggerProperties properties) throws CosmosClientException { return mapTriggerResponseAndBlock(asyncScripts.createTrigger(properties)); } @@ -226,8 +213,8 @@ public Iterator> queryTriggers(SqlQuerySpe * @param id the id * @return the trigger */ - public CosmosSyncTrigger getTrigger(String id) { - return new CosmosSyncTrigger(id, + public CosmosTrigger getTrigger(String id) { + return new CosmosTrigger(id, this.container, asyncScripts.getTrigger(id)); } @@ -239,7 +226,7 @@ public CosmosSyncTrigger getTrigger(String id) { * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - CosmosSyncStoredProcedureResponse mapStoredProcedureResponseAndBlock(Mono storedProcedureResponseMono) + CosmosStoredProcedureResponse mapStoredProcedureResponseAndBlock(Mono storedProcedureResponseMono) throws CosmosClientException { try { return storedProcedureResponseMono @@ -255,47 +242,14 @@ CosmosSyncStoredProcedureResponse mapStoredProcedureResponseAndBlock(Mono responseMono) - throws CosmosClientException { - try { - return responseMono - .map(this::convertDeleteResponse) - .block(); - } catch (Exception ex) { - final Throwable throwable = Exceptions.unwrap(ex); - if (throwable instanceof CosmosClientException) { - throw (CosmosClientException) throwable; - } else { - throw ex; - } - } - } - - /** - * Convert delete response cosmos sync response. - * - * @param response the response - * @return the cosmos sync response - */ - CosmosSyncResponse convertDeleteResponse(CosmosResponse response) { - return new CosmosSyncResponse(response); - } - /** * Convert response cosmos sync stored procedure response. * * @param response the response * @return the cosmos sync stored procedure response */ - CosmosSyncStoredProcedureResponse convertResponse(CosmosStoredProcedureResponse response) { - return new CosmosSyncStoredProcedureResponse(response, getStoredProcedure(response.storedProcedure().id())); + CosmosStoredProcedureResponse convertResponse(CosmosAsyncStoredProcedureResponse response) { + return new CosmosStoredProcedureResponse(response, getStoredProcedure(response.getStoredProcedure().id())); } /** @@ -305,7 +259,7 @@ CosmosSyncStoredProcedureResponse convertResponse(CosmosStoredProcedureResponse * @return the cosmos sync user defined function response * @throws CosmosClientException the cosmos client exception */ - CosmosSyncUserDefinedFunctionResponse mapUDFResponseAndBlock(Mono responseMono) + CosmosUserDefinedFunctionResponse mapUDFResponseAndBlock(Mono responseMono) throws CosmosClientException { try { return responseMono @@ -327,9 +281,9 @@ CosmosSyncUserDefinedFunctionResponse mapUDFResponseAndBlock(Mono responseMono) + CosmosTriggerResponse mapTriggerResponseAndBlock(Mono responseMono) throws CosmosClientException { try { return responseMono @@ -363,9 +317,9 @@ CosmosSyncTriggerResponse mapTriggerResponseAndBlock(Mono * @param response the response * @return the cosmos sync trigger response */ - CosmosSyncTriggerResponse convertResponse(CosmosTriggerResponse response) { - return new CosmosSyncTriggerResponse(response, - getTrigger(response.trigger().id())); + CosmosTriggerResponse convertResponse(CosmosAsyncTriggerResponse response) { + return new CosmosTriggerResponse(response, + getTrigger(response.getTrigger().getId())); } private Iterator> getFeedIterator(Flux> itemFlux) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedure.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java similarity index 64% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedure.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java index a6a16a518bc8..9aa57b3366e0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedure.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedure.java @@ -1,20 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosStoredProcedure; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; +package com.azure.data.cosmos; /** * The type Cosmos sync stored procedure. */ -public class CosmosSyncStoredProcedure { +public class CosmosStoredProcedure { private final String id; - private final CosmosSyncContainer container; - private final CosmosStoredProcedure storedProcedure; + private final CosmosContainer container; + private final CosmosAsyncStoredProcedure storedProcedure; /** * Instantiates a new Cosmos sync stored procedure. @@ -23,7 +18,7 @@ public class CosmosSyncStoredProcedure { * @param container the container * @param storedProcedure the stored procedure */ - public CosmosSyncStoredProcedure(String id, CosmosSyncContainer container, CosmosStoredProcedure storedProcedure) { + public CosmosStoredProcedure(String id, CosmosContainer container, CosmosAsyncStoredProcedure storedProcedure) { this.id = id; this.container = container; @@ -35,7 +30,7 @@ public CosmosSyncStoredProcedure(String id, CosmosSyncContainer container, Cosmo * * @return the string */ - public String id() { + public String getId() { return id; } @@ -45,7 +40,7 @@ public String id() { * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse read() throws CosmosClientException { + public CosmosStoredProcedureResponse read() throws CosmosClientException { return container.getScripts() .mapStoredProcedureResponseAndBlock(storedProcedure.read()); } @@ -57,7 +52,7 @@ public CosmosSyncStoredProcedureResponse read() throws CosmosClientException { * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse read(CosmosStoredProcedureRequestOptions options) throws CosmosClientException { + public CosmosStoredProcedureResponse read(CosmosStoredProcedureRequestOptions options) throws CosmosClientException { return container.getScripts() .mapStoredProcedureResponseAndBlock(storedProcedure.read(options)); } @@ -68,9 +63,9 @@ public CosmosSyncStoredProcedureResponse read(CosmosStoredProcedureRequestOption * @return the cosmos sync response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncResponse delete() throws CosmosClientException { + public CosmosStoredProcedureResponse delete() throws CosmosClientException { return container.getScripts() - .mapDeleteResponseAndBlock(storedProcedure.delete()); + .mapStoredProcedureResponseAndBlock(storedProcedure.delete()); } /** @@ -80,9 +75,9 @@ public CosmosSyncResponse delete() throws CosmosClientException { * @return the cosmos sync response * @throws CosmosClientException the cosmos client exception */ - CosmosSyncResponse delete(CosmosStoredProcedureRequestOptions options) throws CosmosClientException { + CosmosStoredProcedureResponse delete(CosmosStoredProcedureRequestOptions options) throws CosmosClientException { return container.getScripts() - .mapDeleteResponseAndBlock(storedProcedure.delete(options)); + .mapStoredProcedureResponseAndBlock(storedProcedure.delete(options)); } /** @@ -93,8 +88,8 @@ CosmosSyncResponse delete(CosmosStoredProcedureRequestOptions options) throws Co * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse execute(Object[] procedureParams, - CosmosStoredProcedureRequestOptions options) throws CosmosClientException { + public CosmosStoredProcedureResponse execute(Object[] procedureParams, + CosmosStoredProcedureRequestOptions options) throws CosmosClientException { return container.getScripts() .mapStoredProcedureResponseAndBlock(storedProcedure.execute(procedureParams, options)); } @@ -106,7 +101,7 @@ public CosmosSyncStoredProcedureResponse execute(Object[] procedureParams, * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse replace(CosmosStoredProcedureProperties storedProcedureSettings) + public CosmosStoredProcedureResponse replace(CosmosStoredProcedureProperties storedProcedureSettings) throws CosmosClientException { return container.getScripts() .mapStoredProcedureResponseAndBlock(storedProcedure.replace(storedProcedureSettings)); @@ -120,8 +115,8 @@ public CosmosSyncStoredProcedureResponse replace(CosmosStoredProcedureProperties * @return the cosmos sync stored procedure response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncStoredProcedureResponse replace(CosmosStoredProcedureProperties storedProcedureSettings, - CosmosStoredProcedureRequestOptions options) throws CosmosClientException { + public CosmosStoredProcedureResponse replace(CosmosStoredProcedureProperties storedProcedureSettings, + CosmosStoredProcedureRequestOptions options) throws CosmosClientException { return container.getScripts() .mapStoredProcedureResponseAndBlock(storedProcedure.replace(storedProcedureSettings, options)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java index 49a0f0533c03..1ad49015c1f4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureProperties.java @@ -24,8 +24,8 @@ public CosmosStoredProcedureProperties() { * @param id the name of the resource. * @return return the Cosmos stored procedure properties with id set */ - public CosmosStoredProcedureProperties id(String id){ - super.id(id); + public CosmosStoredProcedureProperties setId(String id){ + super.setId(id); return this; } @@ -46,8 +46,8 @@ public CosmosStoredProcedureProperties id(String id){ */ public CosmosStoredProcedureProperties(String id, String body) { super(); - super.id(id); - this.body(body); + super.setId(id); + this.setBody(body); } CosmosStoredProcedureProperties(ResourceResponse response) { @@ -59,7 +59,7 @@ public CosmosStoredProcedureProperties(String id, String body) { * * @return the body of the stored procedure. */ - public String body() { + public String getBody() { return super.getString(Constants.Properties.BODY); } @@ -68,7 +68,7 @@ public String body() { * * @param body the body of the stored procedure. */ - public void body(String body) { + public void setBody(String body) { super.set(Constants.Properties.BODY, body); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java index 5710749adc63..e23bcff76e31 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureRequestOptions.java @@ -18,7 +18,7 @@ public class CosmosStoredProcedureRequestOptions { * * @return the access condition. */ - public AccessCondition accessCondition() { + public AccessCondition getAccessCondition() { return accessCondition; } @@ -28,7 +28,7 @@ public AccessCondition accessCondition() { * @param accessCondition the access condition. * @return the current request options */ - public CosmosStoredProcedureRequestOptions accessCondition(AccessCondition accessCondition) { + public CosmosStoredProcedureRequestOptions setAccessCondition(AccessCondition accessCondition) { this.accessCondition = accessCondition; return this; } @@ -37,7 +37,7 @@ public CosmosStoredProcedureRequestOptions accessCondition(AccessCondition acces * * @return the consistency level. */ - public ConsistencyLevel consistencyLevel() { + public ConsistencyLevel getConsistencyLevel() { return consistencyLevel; } @@ -47,7 +47,7 @@ public ConsistencyLevel consistencyLevel() { * @param consistencyLevel the consistency level. * @return the CosmosStoredProcedureRequestOptions. */ - public CosmosStoredProcedureRequestOptions consistencyLevel(ConsistencyLevel consistencyLevel) { + public CosmosStoredProcedureRequestOptions setConsistencyLevel(ConsistencyLevel consistencyLevel) { this.consistencyLevel = consistencyLevel; return this; } @@ -57,7 +57,7 @@ public CosmosStoredProcedureRequestOptions consistencyLevel(ConsistencyLevel con * * @return the partition key value. */ - public PartitionKey partitionKey() { + public PartitionKey getPartitionKey() { return partitionKey; } @@ -67,7 +67,7 @@ public PartitionKey partitionKey() { * @param partitionKey the partition key value. * @return the CosmosStoredProcedureRequestOptions. */ - public CosmosStoredProcedureRequestOptions partitionKey(PartitionKey partitionKey) { + public CosmosStoredProcedureRequestOptions setPartitionKey(PartitionKey partitionKey) { this.partitionKey = partitionKey; return this; } @@ -77,7 +77,7 @@ public CosmosStoredProcedureRequestOptions partitionKey(PartitionKey partitionKe * * @return the session token. */ - public String sessionToken() { + public String getSessionToken() { return sessionToken; } @@ -87,7 +87,7 @@ public String sessionToken() { * @param sessionToken the session token. * @return the CosmosStoredProcedureRequestOptions. */ - public CosmosStoredProcedureRequestOptions sessionToken(String sessionToken) { + public CosmosStoredProcedureRequestOptions setSessionToken(String sessionToken) { this.sessionToken = sessionToken; return this; } @@ -95,7 +95,7 @@ public CosmosStoredProcedureRequestOptions sessionToken(String sessionToken) { RequestOptions toRequestOptions() { RequestOptions requestOptions = new RequestOptions(); requestOptions.setAccessCondition(accessCondition); - requestOptions.setConsistencyLevel(consistencyLevel()); + requestOptions.setConsistencyLevel(getConsistencyLevel()); requestOptions.setPartitionKey(partitionKey); requestOptions.setSessionToken(sessionToken); return requestOptions; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java new file mode 100644 index 000000000000..d694b83e6481 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.cosmos; + + +/** + * The type Cosmos sync stored procedure response. + */ +public class CosmosStoredProcedureResponse extends CosmosResponse { + private final CosmosStoredProcedure cosmosStoredProcedure; + private final CosmosAsyncStoredProcedureResponse asyncResponse; + + /** + * Instantiates a new Cosmos sync stored procedure response. + * + * @param resourceResponse the resource response + * @param storedProcedure the stored procedure + */ + CosmosStoredProcedureResponse(CosmosAsyncStoredProcedureResponse resourceResponse, + CosmosStoredProcedure storedProcedure) { + super(resourceResponse.getProperties()); + this.asyncResponse = resourceResponse; + this.cosmosStoredProcedure = storedProcedure; + } + + /** + * Gets cosmos stored procedure properties. + * + * @return the cosmos stored procedure properties + */ + public CosmosStoredProcedureProperties getProperties() { + return asyncResponse.getProperties(); + } + + /** + * Gets cosmos sync stored procedure. + * + * @return the cosmos sync stored procedure + */ + public CosmosStoredProcedure getStoredProcedure() { + return cosmosStoredProcedure; + } + + @Override + public String getActivityId() { + return asyncResponse.getActivityId(); + } + + @Override + public String getSessionToken() { + return asyncResponse.getSessionToken(); + } + + @Override + public int getStatusCode() { + return asyncResponse.getStatusCode(); + } + + @Override + public double getRequestCharge() { + return asyncResponse.getRequestCharge(); + } + + /** + * Response as string string. + * + * @return the string + */ + public String responseAsString() { + return asyncResponse.getResponseAsString(); + } + + /** + * Script log string. + * + * @return the string + */ + public String scriptLog() { + return asyncResponse.getScriptLog(); + } + + +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTrigger.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTrigger.java similarity index 61% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTrigger.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTrigger.java index 01ee1f975ce5..bca385756101 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTrigger.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTrigger.java @@ -1,19 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosTrigger; -import com.azure.data.cosmos.CosmosTriggerProperties; +package com.azure.data.cosmos; /** * The type Cosmos sync trigger. */ -public class CosmosSyncTrigger { +public class CosmosTrigger { private final String id; - private final CosmosSyncContainer container; - private final CosmosTrigger trigger; + private final CosmosContainer container; + private final CosmosAsyncTrigger trigger; /** * Instantiates a new Cosmos sync trigger. @@ -22,18 +18,18 @@ public class CosmosSyncTrigger { * @param container the container * @param trigger the trigger */ - CosmosSyncTrigger(String id, CosmosSyncContainer container, CosmosTrigger trigger) { + CosmosTrigger(String id, CosmosContainer container, CosmosAsyncTrigger trigger) { this.id = id; this.container = container; this.trigger = trigger; } /** - * Gets id. + * Gets getId. * * @return the string */ - public String id() { + public String getId() { return id; } @@ -43,7 +39,7 @@ public String id() { * @return the cosmos sync trigger response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncTriggerResponse read() throws CosmosClientException { + public CosmosTriggerResponse read() throws CosmosClientException { return container.getScripts().mapTriggerResponseAndBlock(trigger.read()); } @@ -54,7 +50,7 @@ public CosmosSyncTriggerResponse read() throws CosmosClientException { * @return the cosmos sync trigger response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncTriggerResponse replace(CosmosTriggerProperties triggerSettings) throws CosmosClientException { + public CosmosTriggerResponse replace(CosmosTriggerProperties triggerSettings) throws CosmosClientException { return container.getScripts().mapTriggerResponseAndBlock(trigger.replace(triggerSettings)); } @@ -64,8 +60,8 @@ public CosmosSyncTriggerResponse replace(CosmosTriggerProperties triggerSettings * @return the cosmos sync response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncResponse delete() throws CosmosClientException { - return container.getScripts().mapDeleteResponseAndBlock(trigger.delete()); + public CosmosTriggerResponse delete() throws CosmosClientException { + return container.getScripts().mapTriggerResponseAndBlock(trigger.delete()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java index ef9ce947c090..32a7322f8c33 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerProperties.java @@ -38,8 +38,8 @@ public CosmosTriggerProperties(){ * @param id the name of the resource. * @return the current cosmos trigger properties instance */ - public CosmosTriggerProperties id(String id) { - super.id(id); + public CosmosTriggerProperties setId(String id) { + super.setId(id); return this; } @@ -48,7 +48,7 @@ public CosmosTriggerProperties id(String id) { * * @return the body of the trigger. */ - public String body() { + public String getBody() { return super.getString(Constants.Properties.BODY); } @@ -58,7 +58,7 @@ public String body() { * @param body the body of the trigger. * @return the CosmosTriggerProperties. */ - public CosmosTriggerProperties body(String body) { + public CosmosTriggerProperties setBody(String body) { super.set(Constants.Properties.BODY, body); return this; } @@ -68,7 +68,7 @@ public CosmosTriggerProperties body(String body) { * * @return the trigger type. */ - public TriggerType triggerType() { + public TriggerType getTriggerType() { TriggerType result = TriggerType.PRE; try { result = TriggerType.valueOf( @@ -86,7 +86,7 @@ public TriggerType triggerType() { * @param triggerType the trigger type. * @return the CosmosTriggerProperties. */ - public CosmosTriggerProperties triggerType(TriggerType triggerType) { + public CosmosTriggerProperties setTriggerType(TriggerType triggerType) { super.set(Constants.Properties.TRIGGER_TYPE, triggerType.toString()); return this; } @@ -96,7 +96,7 @@ public CosmosTriggerProperties triggerType(TriggerType triggerType) { * * @return the trigger operation. */ - public TriggerOperation triggerOperation() { + public TriggerOperation getTriggerOperation() { TriggerOperation result = TriggerOperation.CREATE; try { result = TriggerOperation.valueOf( @@ -114,7 +114,7 @@ public TriggerOperation triggerOperation() { * @param triggerOperation the trigger operation. * @return the CosmosTriggerProperties. */ - public CosmosTriggerProperties triggerOperation(TriggerOperation triggerOperation) { + public CosmosTriggerProperties setTriggerOperation(TriggerOperation triggerOperation) { super.set(Constants.Properties.TRIGGER_OPERATION, triggerOperation.toString()); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTriggerResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java similarity index 51% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTriggerResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java index 7b4756a196ab..4b56edfaf9ad 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncTriggerResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosTriggerResponse.java @@ -1,18 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.CosmosTriggerResponse; +package com.azure.data.cosmos; /** * The type Cosmos sync trigger response. */ -public class CosmosSyncTriggerResponse extends CosmosSyncResponse { +public class CosmosTriggerResponse extends CosmosResponse { - private final CosmosSyncTrigger syncTrigger; - private final CosmosTriggerResponse asyncResponse; + private final CosmosTrigger syncTrigger; + private final CosmosAsyncTriggerResponse asyncResponse; /** * Instantiates a new Cosmos sync trigger response. @@ -20,9 +17,9 @@ public class CosmosSyncTriggerResponse extends CosmosSyncResponse { * @param asyncResponse the async response * @param syncTrigger the sync trigger */ - CosmosSyncTriggerResponse(CosmosTriggerResponse asyncResponse, - CosmosSyncTrigger syncTrigger) { - super(asyncResponse); + CosmosTriggerResponse(CosmosAsyncTriggerResponse asyncResponse, + CosmosTrigger syncTrigger) { + super(asyncResponse.getProperties()); this.asyncResponse = asyncResponse; this.syncTrigger = syncTrigger; } @@ -32,8 +29,8 @@ public class CosmosSyncTriggerResponse extends CosmosSyncResponse { * * @return the cosmos trigger properties */ - public CosmosTriggerProperties properties() { - return asyncResponse.properties(); + public CosmosTriggerProperties getProperties() { + return asyncResponse.getProperties(); } /** @@ -41,7 +38,7 @@ public CosmosTriggerProperties properties() { * * @return the cosmos sync trigger */ - public CosmosSyncTrigger trigger() { + public CosmosTrigger getTrigger() { return syncTrigger; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUser.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUser.java similarity index 66% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUser.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUser.java index 393df1fa6270..112b22093173 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUser.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUser.java @@ -1,18 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosUser; -import com.azure.data.cosmos.CosmosUserProperties; +package com.azure.data.cosmos; /** * The type Cosmos sync user. */ -public class CosmosSyncUser { - private final CosmosUser asyncUser; - private final CosmosSyncDatabase database; +public class CosmosUser { + private final CosmosAsyncUser asyncUser; + private final CosmosDatabase database; private final String id; /** @@ -22,7 +18,7 @@ public class CosmosSyncUser { * @param database the database * @param id the id */ - CosmosSyncUser(CosmosUser asyncUser, CosmosSyncDatabase database, String id) { + CosmosUser(CosmosAsyncUser asyncUser, CosmosDatabase database, String id) { this.asyncUser = asyncUser; this.database = database; this.id = id; @@ -33,7 +29,7 @@ public class CosmosSyncUser { * * @return the string */ - public String id() { + public String getId() { return id; } @@ -43,7 +39,7 @@ public String id() { * @return the cosmos sync user response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserResponse read() throws CosmosClientException { + public CosmosUserResponse read() throws CosmosClientException { return database.mapUserResponseAndBlock(asyncUser.read()); } @@ -54,7 +50,7 @@ public CosmosSyncUserResponse read() throws CosmosClientException { * @return the cosmos sync user response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserResponse replace(CosmosUserProperties userProperties) throws CosmosClientException { + public CosmosUserResponse replace(CosmosUserProperties userProperties) throws CosmosClientException { return database.mapUserResponseAndBlock(asyncUser.replace(userProperties)); } @@ -64,7 +60,7 @@ public CosmosSyncUserResponse replace(CosmosUserProperties userProperties) throw * @return the cosmos sync user response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserResponse delete() throws CosmosClientException { + public CosmosUserResponse delete() throws CosmosClientException { return database.mapUserResponseAndBlock(asyncUser.delete()); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java similarity index 62% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunction.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java index fbea2b3fcc5f..346980c853e9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunction.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunction.java @@ -1,19 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosUserDefinedFunction; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; +package com.azure.data.cosmos; /** * The type Cosmos sync user defined function. */ -public class CosmosSyncUserDefinedFunction { +public class CosmosUserDefinedFunction { private final String id; - private final CosmosSyncContainer container; - private final CosmosUserDefinedFunction userDefinedFunction; + private final CosmosContainer container; + private final CosmosAsyncUserDefinedFunction userDefinedFunction; /** * Instantiates a new Cosmos sync user defined function. @@ -22,7 +18,7 @@ public class CosmosSyncUserDefinedFunction { * @param container the container * @param userDefinedFunction the user defined function */ - CosmosSyncUserDefinedFunction(String id, CosmosSyncContainer container, CosmosUserDefinedFunction userDefinedFunction) { + CosmosUserDefinedFunction(String id, CosmosContainer container, CosmosAsyncUserDefinedFunction userDefinedFunction) { this.id = id; this.container = container; @@ -34,7 +30,7 @@ public class CosmosSyncUserDefinedFunction { * * @return the string */ - public String id() { + public String getId() { return id; } @@ -44,7 +40,7 @@ public String id() { * @return the cosmos sync user defined function response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserDefinedFunctionResponse read() throws CosmosClientException { + public CosmosUserDefinedFunctionResponse read() throws CosmosClientException { return container.getScripts().mapUDFResponseAndBlock(userDefinedFunction.read()); } @@ -55,7 +51,7 @@ public CosmosSyncUserDefinedFunctionResponse read() throws CosmosClientException * @return the cosmos sync user defined function response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncUserDefinedFunctionResponse replace(CosmosUserDefinedFunctionProperties udfSettings) + public CosmosUserDefinedFunctionResponse replace(CosmosUserDefinedFunctionProperties udfSettings) throws CosmosClientException { return container.getScripts().mapUDFResponseAndBlock(userDefinedFunction.replace(udfSettings)); } @@ -66,7 +62,7 @@ public CosmosSyncUserDefinedFunctionResponse replace(CosmosUserDefinedFunctionPr * @return the cosmos sync response * @throws CosmosClientException the cosmos client exception */ - public CosmosSyncResponse delete() throws CosmosClientException { - return container.getScripts().mapDeleteResponseAndBlock(userDefinedFunction.delete()); + public CosmosUserDefinedFunctionResponse delete() throws CosmosClientException { + return container.getScripts().mapUDFResponseAndBlock(userDefinedFunction.delete()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java index 577e2b163ade..d2b20d164721 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionProperties.java @@ -36,8 +36,8 @@ public CosmosUserDefinedFunctionProperties(){ * @param id the name of the resource. * @return the current instance of cosmos user defined function properties */ - public CosmosUserDefinedFunctionProperties id(String id) { - super.id(id); + public CosmosUserDefinedFunctionProperties setId(String id) { + super.setId(id); return this; } @@ -46,7 +46,7 @@ public CosmosUserDefinedFunctionProperties id(String id) { * * @return the body. */ - public String body() { + public String getBody() { return super.getString(Constants.Properties.BODY); } @@ -56,7 +56,7 @@ public String body() { * @param body the body. * @return the CosmosUserDefinedFunctionProperties. */ - public CosmosUserDefinedFunctionProperties body(String body) { + public CosmosUserDefinedFunctionProperties setBody(String body) { super.set(Constants.Properties.BODY, body); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunctionResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java similarity index 50% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunctionResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java index b9c6f728fc8e..bb8009b4f3a6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserDefinedFunctionResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java @@ -1,18 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; -import com.azure.data.cosmos.CosmosUserDefinedFunctionResponse; +package com.azure.data.cosmos; /** * The type Cosmos sync user defined function response. */ -public class CosmosSyncUserDefinedFunctionResponse extends CosmosSyncResponse { +public class CosmosUserDefinedFunctionResponse extends CosmosResponse { - private final CosmosSyncUserDefinedFunction userDefinedFunction; - private CosmosUserDefinedFunctionResponse asyncResponse; + private final CosmosUserDefinedFunction userDefinedFunction; + private CosmosAsyncUserDefinedFunctionResponse asyncResponse; /** * Instantiates a new Cosmos sync user defined function response. @@ -20,9 +17,9 @@ public class CosmosSyncUserDefinedFunctionResponse extends CosmosSyncResponse { * @param resourceResponse the resource response * @param userDefinedFunction the user defined function */ - CosmosSyncUserDefinedFunctionResponse(CosmosUserDefinedFunctionResponse resourceResponse, - CosmosSyncUserDefinedFunction userDefinedFunction) { - super(resourceResponse); + CosmosUserDefinedFunctionResponse(CosmosAsyncUserDefinedFunctionResponse resourceResponse, + CosmosUserDefinedFunction userDefinedFunction) { + super(resourceResponse.getProperties()); this.asyncResponse = resourceResponse; this.userDefinedFunction = userDefinedFunction; } @@ -32,8 +29,8 @@ public class CosmosSyncUserDefinedFunctionResponse extends CosmosSyncResponse { * * @return the cosmos user defined function properties */ - public CosmosUserDefinedFunctionProperties properties() { - return asyncResponse.properties(); + public CosmosUserDefinedFunctionProperties getProperties() { + return asyncResponse.getProperties(); } /** @@ -41,7 +38,7 @@ public CosmosUserDefinedFunctionProperties properties() { * * @return the cosmos sync user defined function */ - public CosmosSyncUserDefinedFunction userDefinedFunction() { + public CosmosUserDefinedFunction getUserDefinedFunction() { return userDefinedFunction; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java index f0da50e952d7..84da36231a27 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserProperties.java @@ -22,8 +22,8 @@ public CosmosUserProperties() { * Gets the id * @return the id of the user */ - public String id() { - return super.id(); + public String getId() { + return super.getId(); } /** @@ -31,8 +31,8 @@ public String id() { * @param id the name of the resource. * @return the current instance of cosmos user properties */ - public CosmosUserProperties id(String id) { - return (CosmosUserProperties) super.id(id); + public CosmosUserProperties setId(String id) { + return (CosmosUserProperties) super.setId(id); } /** @@ -59,7 +59,7 @@ public CosmosUserProperties id(String id) { * @return the permissions link. */ String getPermissionsLink() { - String selfLink = this.selfLink(); + String selfLink = this.getSelfLink(); if (selfLink.endsWith("/")) { return selfLink + super.getString(Constants.Properties.PERMISSIONS_LINK); } else { @@ -74,4 +74,4 @@ public User getV2User() { static List getFromV2Results(List results) { return results.stream().map(CosmosUserProperties::new).collect(Collectors.toList()); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java similarity index 50% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java index 4d9e3c701db5..741b75a99de0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncUserResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.CosmosUserResponse; +package com.azure.data.cosmos; /** * The type Cosmos sync user response. */ -public class CosmosSyncUserResponse extends CosmosSyncResponse { - private final CosmosUserResponse asyncResponse; - private final CosmosSyncUser user; +public class CosmosUserResponse extends CosmosResponse { + private final CosmosAsyncUserResponse asyncResponse; + private final CosmosUser user; /** * Instantiates a new Cosmos sync user response. @@ -19,11 +16,11 @@ public class CosmosSyncUserResponse extends CosmosSyncResponse { * @param response the response * @param database the database */ - CosmosSyncUserResponse(CosmosUserResponse response, CosmosSyncDatabase database) { - super(response); + CosmosUserResponse(CosmosAsyncUserResponse response, CosmosDatabase database) { + super(response.getProperties()); this.asyncResponse = response; - if (response.user() != null) { - this.user = new CosmosSyncUser(response.user(), database, response.user().id()); + if (response.getUser() != null) { + this.user = new CosmosUser(response.getUser(), database, response.getUser().getId()); } else { // delete has null user client this.user = null; @@ -35,7 +32,7 @@ public class CosmosSyncUserResponse extends CosmosSyncResponse { * * @return the cosmos sync user */ - public CosmosSyncUser user() { + public CosmosUser getUser() { return this.user; } @@ -44,7 +41,7 @@ public CosmosSyncUser user() { * * @return the cosmos user properties */ - public CosmosUserProperties properties() { - return asyncResponse.properties(); + public CosmosUserProperties getProperties() { + return asyncResponse.getProperties(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DataType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DataType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DataType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DataType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java index 92f4d3628031..0924591140da 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccount.java @@ -214,7 +214,7 @@ Map getQueryEngineConfiguration() { * * @return the list of writable locations. */ - public Iterable writableLocations() { + public Iterable getWritableLocations() { return super.getCollection(Constants.Properties.WRITABLE_LOCATIONS, DatabaseAccountLocation.class); } @@ -234,7 +234,7 @@ void setWritableLocations(Iterable locations) { * * @return the list of readable locations. */ - public Iterable readableLocations() { + public Iterable getReadableLocations() { return super.getCollection(Constants.Properties.READABLE_LOCATIONS, DatabaseAccountLocation.class); } @@ -249,7 +249,7 @@ void setReadableLocations(Iterable locations) { setProperty(this, Constants.Properties.READABLE_LOCATIONS, locations); } - public boolean enableMultipleWriteLocations() { + public boolean getEnableMultipleWriteLocations() { return ObjectUtils.defaultIfNull(super.getBoolean(Constants.Properties.ENABLE_MULTIPLE_WRITE_LOCATIONS), false); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java index 449af8cb538f..64b13f8d6da6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/DatabaseAccountLocation.java @@ -36,7 +36,7 @@ public DatabaseAccountLocation(String jsonString) { * * @return the name of the database account location. */ - public String name() { + public String getName() { return super.getString(Constants.Properties.Name); } @@ -54,7 +54,7 @@ void setName(String name) { * * @return the endpoint of the database account location. */ - public String endpoint() { + public String getEndpoint() { return super.getString(Constants.Properties.DATABASE_ACCOUNT_ENDPOINT); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java index 4f45e3fd9c8f..c81791593c31 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ExcludedPath.java @@ -31,7 +31,7 @@ public ExcludedPath() { * * @return the path. */ - public String path() { + public String getPath() { return super.getString(Constants.Properties.PATH); } @@ -41,7 +41,7 @@ public String path() { * @param path the path. * @return the Exculded path. */ - public ExcludedPath path(String path) { + public ExcludedPath setPath(String path) { super.set(Constants.Properties.PATH, path); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java index 56ea0eb15cb8..b215a6722a10 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedOptions.java @@ -47,7 +47,7 @@ public FeedOptions(FeedOptions options) { * * @return the partitionKeyRangeId. */ - String partitionKeyRangeIdInternal() { + String getPartitionKeyRangeIdInternal() { return this.partitionKeyRangeId; } @@ -57,7 +57,7 @@ String partitionKeyRangeIdInternal() { * @param partitionKeyRangeId the partitionKeyRangeId. * @return the FeedOptions. */ - FeedOptions partitionKeyRangeIdInternal(String partitionKeyRangeId) { + FeedOptions setPartitionKeyRangeIdInternal(String partitionKeyRangeId) { this.partitionKeyRangeId = partitionKeyRangeId; return this; } @@ -67,7 +67,7 @@ FeedOptions partitionKeyRangeIdInternal(String partitionKeyRangeId) { * * @return the session token. */ - public String sessionToken() { + public String getSessionToken() { return this.sessionToken; } @@ -77,7 +77,7 @@ public String sessionToken() { * @param sessionToken the session token. * @return the FeedOptions. */ - public FeedOptions sessionToken(String sessionToken) { + public FeedOptions setSessionToken(String sessionToken) { this.sessionToken = sessionToken; return this; } @@ -88,7 +88,7 @@ public FeedOptions sessionToken(String sessionToken) { * * @return the option of enable scan in query. */ - public Boolean enableScanInQuery() { + public Boolean getEnableScanInQuery() { return this.enableScanInQuery; } @@ -99,7 +99,7 @@ public Boolean enableScanInQuery() { * @param enableScanInQuery the option of enable scan in query. * @return the FeedOptions. */ - public FeedOptions enableScanInQuery(Boolean enableScanInQuery) { + public FeedOptions setEnableScanInQuery(Boolean enableScanInQuery) { this.enableScanInQuery = enableScanInQuery; return this; } @@ -110,7 +110,7 @@ public FeedOptions enableScanInQuery(Boolean enableScanInQuery) { * * @return the emit verbose traces in query. */ - public Boolean emitVerboseTracesInQuery() { + public Boolean getEmitVerboseTracesInQuery() { return this.emitVerboseTracesInQuery; } @@ -121,7 +121,7 @@ public Boolean emitVerboseTracesInQuery() { * @param emitVerboseTracesInQuery the emit verbose traces in query. * @return the FeedOptions. */ - public FeedOptions emitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery) { + public FeedOptions setEmitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery) { this.emitVerboseTracesInQuery = emitVerboseTracesInQuery; return this; } @@ -133,7 +133,7 @@ public FeedOptions emitVerboseTracesInQuery(Boolean emitVerboseTracesInQuery) { * @return whether to allow queries to run across all partitions of the * collection. */ - public Boolean enableCrossPartitionQuery() { + public Boolean getEnableCrossPartitionQuery() { return this.enableCrossPartitionQuery; } @@ -145,7 +145,7 @@ public Boolean enableCrossPartitionQuery() { * partitions of the collection. * @return the FeedOptions. */ - public FeedOptions enableCrossPartitionQuery(Boolean enableCrossPartitionQuery) { + public FeedOptions setEnableCrossPartitionQuery(Boolean enableCrossPartitionQuery) { this.enableCrossPartitionQuery = enableCrossPartitionQuery; return this; } @@ -157,7 +157,7 @@ public FeedOptions enableCrossPartitionQuery(Boolean enableCrossPartitionQuery) * @return number of concurrent operations run client side during parallel query * execution. */ - public int maxDegreeOfParallelism() { + public int getMaxDegreeOfParallelism() { return maxDegreeOfParallelism; } @@ -168,7 +168,7 @@ public int maxDegreeOfParallelism() { * @param maxDegreeOfParallelism number of concurrent operations. * @return the FeedOptions. */ - public FeedOptions maxDegreeOfParallelism(int maxDegreeOfParallelism) { + public FeedOptions setMaxDegreeOfParallelism(int maxDegreeOfParallelism) { this.maxDegreeOfParallelism = maxDegreeOfParallelism; return this; } @@ -180,7 +180,7 @@ public FeedOptions maxDegreeOfParallelism(int maxDegreeOfParallelism) { * @return maximum number of items that can be buffered client side during * parallel query execution. */ - public int maxBufferedItemCount() { + public int getMaxBufferedItemCount() { return maxBufferedItemCount; } @@ -191,7 +191,7 @@ public int maxBufferedItemCount() { * @param maxBufferedItemCount maximum number of items. * @return the FeedOptions. */ - public FeedOptions maxBufferedItemCount(int maxBufferedItemCount) { + public FeedOptions setMaxBufferedItemCount(int maxBufferedItemCount) { this.maxBufferedItemCount = maxBufferedItemCount; return this; } @@ -216,7 +216,7 @@ public FeedOptions maxBufferedItemCount(int maxBufferedItemCount) { * @param limitInKb continuation token size limit. * @return the FeedOptions. */ - public FeedOptions responseContinuationTokenLimitInKb(int limitInKb) { + public FeedOptions getResponseContinuationTokenLimitInKb(int limitInKb) { this.responseContinuationTokenLimitInKb = limitInKb; return this; } @@ -230,7 +230,7 @@ public FeedOptions responseContinuationTokenLimitInKb(int limitInKb) { * * @return return set ResponseContinuationTokenLimitInKb, or 0 if not set */ - public int responseContinuationTokenLimitInKb() { + public int setResponseContinuationTokenLimitInKb() { return responseContinuationTokenLimitInKb; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java index fb4ab994ce9f..dbab545b16ce 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponse.java @@ -62,7 +62,7 @@ private FeedResponse( * * @return the list of results. */ - public List results() { + public List getResults() { return results; } @@ -71,7 +71,7 @@ public List results() { * * @return The maximum quota for the account. */ - public long databaseQuota() { + public long getDatabaseQuota() { return this.maxQuotaHeader(Constants.Quota.DATABASE); } @@ -80,7 +80,7 @@ public long databaseQuota() { * * @return The current number of databases. */ - public long databaseUsage() { + public long getDatabaseUsage() { return this.currentQuotaHeader(Constants.Quota.DATABASE); } @@ -89,7 +89,7 @@ public long databaseUsage() { * * @return The maximum quota for the account. */ - public long collectionQuota() { + public long getCollectionQuota() { return this.maxQuotaHeader(Constants.Quota.COLLECTION); } @@ -98,7 +98,7 @@ public long collectionQuota() { * * @return The current number of collections. */ - public long collectionUsage() { + public long getCollectionUsage() { return this.currentQuotaHeader(Constants.Quota.COLLECTION); } @@ -107,7 +107,7 @@ public long collectionUsage() { * * @return The maximum quota for the account. */ - public long userQuota() { + public long getUserQuota() { return this.maxQuotaHeader(Constants.Quota.USER); } @@ -116,7 +116,7 @@ public long userQuota() { * * @return The current number of users. */ - public long userUsage() { + public long getUserUsage() { return this.currentQuotaHeader(Constants.Quota.USER); } @@ -125,7 +125,7 @@ public long userUsage() { * * @return The maximum quota for the account. */ - public long permissionQuota() { + public long getPermissionQuota() { return this.maxQuotaHeader(Constants.Quota.PERMISSION); } @@ -134,7 +134,7 @@ public long permissionQuota() { * * @return The current number of permissions. */ - public long permissionUsage() { + public long getPermissionUsage() { return this.currentQuotaHeader(Constants.Quota.PERMISSION); } @@ -143,7 +143,7 @@ public long permissionUsage() { * * @return The maximum quota in kilobytes. */ - public long collectionSizeQuota() { + public long getCollectionSizeQuota() { return this.maxQuotaHeader(Constants.Quota.COLLECTION_SIZE); } @@ -152,7 +152,7 @@ public long collectionSizeQuota() { * * @return The current size of a collection in kilobytes. */ - public long collectionSizeUsage() { + public long getCollectionSizeUsage() { return this.currentQuotaHeader(Constants.Quota.COLLECTION_SIZE); } @@ -161,7 +161,7 @@ public long collectionSizeUsage() { * * @return The maximum stored procedure quota. */ - public long storedProceduresQuota() { + public long getStoredProceduresQuota() { return this.maxQuotaHeader(Constants.Quota.STORED_PROCEDURE); } @@ -170,7 +170,7 @@ public long storedProceduresQuota() { * * @return The current number of stored procedures. */ - public long storedProceduresUsage() { + public long getStoredProceduresUsage() { return this.currentQuotaHeader(Constants.Quota.STORED_PROCEDURE); } @@ -179,7 +179,7 @@ public long storedProceduresUsage() { * * @return The maximum triggers quota. */ - public long triggersQuota() { + public long getTriggersQuota() { return this.maxQuotaHeader(Constants.Quota.TRIGGER); } @@ -188,7 +188,7 @@ public long triggersQuota() { * * @return The current number of triggers. */ - public long triggersUsage() { + public long getTriggersUsage() { return this.currentQuotaHeader(Constants.Quota.TRIGGER); } @@ -197,7 +197,7 @@ public long triggersUsage() { * * @return The maximum user defined functions quota. */ - public long userDefinedFunctionsQuota() { + public long getUserDefinedFunctionsQuota() { return this.maxQuotaHeader(Constants.Quota.USER_DEFINED_FUNCTION); } @@ -206,7 +206,7 @@ public long userDefinedFunctionsQuota() { * * @return the current number of user defined functions. */ - public long userDefinedFunctionsUsage() { + public long getUserDefinedFunctionsUsage() { return this.currentQuotaHeader(Constants.Quota.USER_DEFINED_FUNCTION); } @@ -216,7 +216,7 @@ public long userDefinedFunctionsUsage() { * @return the maximum size limit for this entity. * Measured in kilobytes for document resources and in counts for other resources. */ - public String maxResourceQuota() { + public String getMaxResourceQuota() { return getValueOrNull(header, HttpConstants.HttpHeaders.MAX_RESOURCE_QUOTA); } @@ -227,7 +227,7 @@ public String maxResourceQuota() { * @return the current size for this entity. Measured in kilobytes for document resources * and in counts for other resources. */ - public String currentResourceQuotaUsage() { + public String getCurrentResourceQuotaUsage() { return getValueOrNull(header, HttpConstants.HttpHeaders.CURRENT_RESOURCE_QUOTA_USAGE); } @@ -237,7 +237,7 @@ public String currentResourceQuotaUsage() { * * @return the request charge. */ - public double requestCharge() { + public double getRequestCharge() { String value = getValueOrNull(header, HttpConstants.HttpHeaders.REQUEST_CHARGE); if (StringUtils.isEmpty(value)) { @@ -251,7 +251,7 @@ public double requestCharge() { * * @return the activity id. */ - public String activityId() { + public String getActivityId() { return getValueOrNull(header, HttpConstants.HttpHeaders.ACTIVITY_ID); } @@ -260,7 +260,7 @@ public String activityId() { * * @return the response continuation. */ - public String continuationToken() { + public String getContinuationToken() { String headerName = useEtagAsContinuation ? HttpConstants.HttpHeaders.E_TAG : HttpConstants.HttpHeaders.CONTINUATION; @@ -272,7 +272,7 @@ public String continuationToken() { * * @return the session token. */ - public String sessionToken() { + public String getSessionToken() { return getValueOrNull(header, HttpConstants.HttpHeaders.SESSION_TOKEN); } @@ -281,12 +281,12 @@ public String sessionToken() { * * @return the response headers. */ - public Map responseHeaders() { + public Map getResponseHeaders() { return header; } - private String queryMetricsString(){ - return getValueOrNull(responseHeaders(), + private String getQueryMetricsString(){ + return getValueOrNull(getResponseHeaders(), HttpConstants.HttpHeaders.QUERY_METRICS); } @@ -294,7 +294,7 @@ private String queryMetricsString(){ * Gets the feed response diagnostics * @return Feed response diagnostics */ - public FeedResponseDiagnostics feedResponseDiagnostics() { + public FeedResponseDiagnostics getFeedResponseDiagnostics() { return this.feedResponseDiagnostics; } @@ -304,9 +304,9 @@ ConcurrentMap queryMetrics() { } //We parse query metrics for un-partitioned collection here - if (!StringUtils.isEmpty(queryMetricsString())) { - String qm = queryMetricsString(); - qm += String.format(";%s=%.2f", QueryMetricsConstants.RequestCharge, requestCharge()); + if (!StringUtils.isEmpty(getQueryMetricsString())) { + String qm = getQueryMetricsString(); + qm += String.format(";%s=%.2f", QueryMetricsConstants.RequestCharge, getRequestCharge()); queryMetricsMap.put(DefaultPartition, QueryMetrics.createFromDelimitedString(qm)); } return queryMetricsMap; @@ -317,9 +317,9 @@ ConcurrentMap queryMetricsMap(){ } private long currentQuotaHeader(String headerName) { - if (this.usageHeaders.size() == 0 && !StringUtils.isEmpty(this.maxResourceQuota()) && - !StringUtils.isEmpty(this.currentResourceQuotaUsage())) { - this.populateQuotaHeader(this.maxResourceQuota(), this.currentResourceQuotaUsage()); + if (this.usageHeaders.size() == 0 && !StringUtils.isEmpty(this.getMaxResourceQuota()) && + !StringUtils.isEmpty(this.getCurrentResourceQuotaUsage())) { + this.populateQuotaHeader(this.getMaxResourceQuota(), this.getCurrentResourceQuotaUsage()); } if (this.usageHeaders.containsKey(headerName)) { @@ -331,9 +331,9 @@ private long currentQuotaHeader(String headerName) { private long maxQuotaHeader(String headerName) { if (this.quotaHeaders.size() == 0 && - !StringUtils.isEmpty(this.maxResourceQuota()) && - !StringUtils.isEmpty(this.currentResourceQuotaUsage())) { - this.populateQuotaHeader(this.maxResourceQuota(), this.currentResourceQuotaUsage()); + !StringUtils.isEmpty(this.getMaxResourceQuota()) && + !StringUtils.isEmpty(this.getCurrentResourceQuotaUsage())) { + this.populateQuotaHeader(this.getMaxResourceQuota(), this.getCurrentResourceQuotaUsage()); } if (this.quotaHeaders.containsKey(headerName)) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java index a90f3c8586ec..9de9ee470b33 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/FeedResponseDiagnostics.java @@ -16,11 +16,11 @@ public class FeedResponseDiagnostics { this.queryMetricsMap = queryMetricsMap; } - Map queryMetricsMap() { + Map getQueryMetricsMap() { return queryMetricsMap; } - FeedResponseDiagnostics queryMetricsMap(Map queryMetricsMap) { + FeedResponseDiagnostics setQueryMetricsMap(Map queryMetricsMap) { this.queryMetricsMap = queryMetricsMap; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ForbiddenException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ForbiddenException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ForbiddenException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ForbiddenException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/GoneException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/GoneException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/GoneException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/GoneException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java index 20939e41f652..754ba9b54b03 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/HashIndex.java @@ -27,7 +27,7 @@ public final class HashIndex extends Index { */ public HashIndex(DataType dataType) { super(IndexKind.HASH); - this.dataType(dataType); + this.setDataType(dataType); } /** @@ -47,8 +47,8 @@ public HashIndex(DataType dataType) { */ public HashIndex(DataType dataType, int precision) { super(IndexKind.HASH); - this.dataType(dataType); - this.precision(precision); + this.setDataType(dataType); + this.setPrecision(precision); } /** @@ -58,7 +58,7 @@ public HashIndex(DataType dataType, int precision) { */ HashIndex(String jsonString) { super(jsonString, IndexKind.HASH); - if (this.dataType() == null) { + if (this.getDataType() == null) { throw new IllegalArgumentException("The jsonString doesn't contain a valid 'dataType'."); } } @@ -68,7 +68,7 @@ public HashIndex(DataType dataType, int precision) { * * @return the data type. */ - public DataType dataType() { + public DataType getDataType() { DataType result = null; try { result = DataType.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.DATA_TYPE))); @@ -85,7 +85,7 @@ public DataType dataType() { * @param dataType the data type. * @return the Hash Index. */ - public HashIndex dataType(DataType dataType) { + public HashIndex setDataType(DataType dataType) { super.set(Constants.Properties.DATA_TYPE, dataType.toString()); return this; } @@ -95,7 +95,7 @@ public HashIndex dataType(DataType dataType) { * * @return the precision. */ - public int precision() { + public int getPrecision() { return super.getInt(Constants.Properties.PRECISION); } @@ -105,7 +105,7 @@ public int precision() { * @param precision the precision. * @return the Hash Index. */ - public HashIndex precision(int precision) { + public HashIndex setPrecision(int precision) { super.set(Constants.Properties.PRECISION, precision); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java index f96f408ee03b..f728a689f460 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IncludedPath.java @@ -39,7 +39,7 @@ public IncludedPath(String jsonString) { * * @return the path. */ - public String path() { + public String getPath() { return super.getString(Constants.Properties.PATH); } @@ -49,7 +49,7 @@ public String path() { * @param path the path. * @return the Included Path. */ - public IncludedPath path(String path) { + public IncludedPath setPath(String path) { super.set(Constants.Properties.PATH, path); return this; } @@ -59,9 +59,9 @@ public IncludedPath path(String path) { * * @return the included paths. */ - public Collection indexes() { + public Collection getIndexes() { if (this.indexes == null) { - this.indexes = this.indexCollection(); + this.indexes = this.getIndexCollection(); if (this.indexes == null) { this.indexes = new ArrayList(); @@ -71,12 +71,12 @@ public Collection indexes() { return this.indexes; } - public IncludedPath indexes(Collection indexes) { + public IncludedPath setIndexes(Collection indexes) { this.indexes = indexes; return this; } - private Collection indexCollection() { + private Collection getIndexCollection() { if (this.propertyBag != null && this.propertyBag.has(Constants.Properties.INDEXES)) { ArrayNode jsonArray = (ArrayNode) this.propertyBag.get(Constants.Properties.INDEXES); Collection result = new ArrayList(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java index 8519e8383abb..e91d478c3c76 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Index.java @@ -18,7 +18,7 @@ public abstract class Index extends JsonSerializable { */ Index(IndexKind indexKind) { super(); - this.kind(indexKind); + this.setKind(indexKind); } /** @@ -29,7 +29,7 @@ public abstract class Index extends JsonSerializable { */ Index(String jsonString, IndexKind indexKind) { super(jsonString); - this.kind(indexKind); + this.setKind(indexKind); } /** @@ -123,7 +123,7 @@ public static SpatialIndex Spatial(DataType dataType) { * * @return the index kind. */ - public IndexKind kind() { + public IndexKind getKind() { IndexKind result = null; try { result = IndexKind.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.INDEX_KIND))); @@ -139,7 +139,7 @@ public IndexKind kind() { * * @param indexKind the index kind. */ - private Index kind(IndexKind indexKind) { + private Index setKind(IndexKind indexKind) { super.set(Constants.Properties.INDEX_KIND, indexKind.toString()); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexKind.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexKind.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexKind.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexKind.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingDirective.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingDirective.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingDirective.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingDirective.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingMode.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingMode.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingMode.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java index c9c8fbd2dd66..fd3cdfcd823e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/IndexingPolicy.java @@ -27,8 +27,8 @@ public final class IndexingPolicy extends JsonSerializable { * Constructor. */ public IndexingPolicy() { - this.automatic(true); - this.indexingMode(IndexingMode.CONSISTENT); + this.setAutomatic(true); + this.setIndexingMode(IndexingMode.CONSISTENT); } /** @@ -65,9 +65,9 @@ public IndexingPolicy(Index[] defaultIndexOverrides) { } IncludedPath includedPath = new IncludedPath(); - includedPath.path(IndexingPolicy.DEFAULT_PATH); - includedPath.indexes(new ArrayList(Arrays.asList(defaultIndexOverrides))); - this.includedPaths().add(includedPath); + includedPath.setPath(IndexingPolicy.DEFAULT_PATH); + includedPath.setIndexes(new ArrayList(Arrays.asList(defaultIndexOverrides))); + this.getIncludedPaths().add(includedPath); } /** @@ -87,7 +87,7 @@ public IndexingPolicy(Index[] defaultIndexOverrides) { * * @return the automatic */ - public Boolean automatic() { + public Boolean getAutomatic() { return super.getBoolean(Constants.Properties.AUTOMATIC); } @@ -100,7 +100,7 @@ public Boolean automatic() { * @param automatic the automatic * @return the Indexing Policy. */ - public IndexingPolicy automatic(boolean automatic) { + public IndexingPolicy setAutomatic(boolean automatic) { super.set(Constants.Properties.AUTOMATIC, automatic); return this; } @@ -110,7 +110,7 @@ public IndexingPolicy automatic(boolean automatic) { * * @return the indexing mode. */ - public IndexingMode indexingMode() { + public IndexingMode getIndexingMode() { IndexingMode result = IndexingMode.LAZY; try { result = IndexingMode.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.INDEXING_MODE))); @@ -126,7 +126,7 @@ public IndexingMode indexingMode() { * @param indexingMode the indexing mode. * @return the Indexing Policy. */ - public IndexingPolicy indexingMode(IndexingMode indexingMode) { + public IndexingPolicy setIndexingMode(IndexingMode indexingMode) { super.set(Constants.Properties.INDEXING_MODE, indexingMode.toString()); return this; } @@ -136,7 +136,7 @@ public IndexingPolicy indexingMode(IndexingMode indexingMode) { * * @return the included paths. */ - public List includedPaths() { + public List getIncludedPaths() { if (this.includedPaths == null) { this.includedPaths = super.getList(Constants.Properties.INCLUDED_PATHS, IncludedPath.class); @@ -157,7 +157,7 @@ public void setIncludedPaths(List includedPaths) { * * @return the excluded paths. */ - public List excludedPaths() { + public List getExcludedPaths() { if (this.excludedPaths == null) { this.excludedPaths = super.getList(Constants.Properties.EXCLUDED_PATHS, ExcludedPath.class); @@ -169,7 +169,7 @@ public List excludedPaths() { return this.excludedPaths; } - public IndexingPolicy excludedPaths(List excludedPaths) { + public IndexingPolicy setExcludedPaths(List excludedPaths) { this.excludedPaths = excludedPaths; return this; } @@ -179,7 +179,7 @@ public IndexingPolicy excludedPaths(List excludedPaths) { * * @return the composite indexes. */ - public List> compositeIndexes() { + public List> getCompositeIndexes() { if (this.compositeIndexes == null) { this.compositeIndexes = new ArrayList<>(); ArrayNode compositeIndexes = (ArrayNode) super.get(Constants.Properties.COMPOSITE_INDEXES); @@ -203,7 +203,7 @@ public List> compositeIndexes() { * @param compositeIndexes the composite indexes. * @return the Indexing Policy. */ - public IndexingPolicy compositeIndexes(List> compositeIndexes) { + public IndexingPolicy setCompositeIndexes(List> compositeIndexes) { this.compositeIndexes = compositeIndexes; super.set(Constants.Properties.COMPOSITE_INDEXES, this.compositeIndexes); return this; @@ -214,7 +214,7 @@ public IndexingPolicy compositeIndexes(List> compositeIndexe * * @return the spatial indexes. */ - public List spatialIndexes() { + public List getSpatialIndexes() { if (this.spatialIndexes == null) { this.spatialIndexes = super.getList(Constants.Properties.SPATIAL_INDEXES, SpatialSpec.class); @@ -232,7 +232,7 @@ public List spatialIndexes() { * @param spatialIndexes the spatial indexes. * @return the Indexing Policy. */ - public IndexingPolicy spatialIndexes(List spatialIndexes) { + public IndexingPolicy setSpatialIndexes(List spatialIndexes) { this.spatialIndexes = spatialIndexes; super.set(Constants.Properties.SPATIAL_INDEXES, this.spatialIndexes); return this; @@ -241,11 +241,11 @@ public IndexingPolicy spatialIndexes(List spatialIndexes) { @Override void populatePropertyBag() { // If indexing mode is not 'none' and not paths are set, set them to the defaults - if (this.indexingMode() != IndexingMode.NONE && this.includedPaths().size() == 0 && - this.excludedPaths().size() == 0) { + if (this.getIndexingMode() != IndexingMode.NONE && this.getIncludedPaths().size() == 0 && + this.getExcludedPaths().size() == 0) { IncludedPath includedPath = new IncludedPath(); - includedPath.path(IndexingPolicy.DEFAULT_PATH); - this.includedPaths().add(includedPath); + includedPath.setPath(IndexingPolicy.DEFAULT_PATH); + this.getIncludedPaths().add(includedPath); } if (this.includedPaths != null) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/InternalServerErrorException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/InternalServerErrorException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/InternalServerErrorException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/InternalServerErrorException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java index 645e708f94c0..eab7fb4821c4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/InvalidPartitionException.java @@ -60,8 +60,8 @@ public InvalidPartitionException(String message, HttpHeaders headers, String req } private void setSubStatus() { - this.responseHeaders().put( + this.getResponseHeaders().put( WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.NAME_CACHE_IS_STALE)); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/LockedException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/LockedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/LockedException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/LockedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/MethodNotAllowedException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/MethodNotAllowedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/MethodNotAllowedException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/MethodNotAllowedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/NotFoundException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/NotFoundException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/NotFoundException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/NotFoundException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java index 52d4e777caca..ff87c738c2b6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionIsMigratingException.java @@ -60,8 +60,8 @@ public PartitionIsMigratingException(String message, HttpHeaders headers, String } private void setSubStatus() { - this.responseHeaders().put( + this.getResponseHeaders().put( WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.COMPLETING_PARTITION_MIGRATION)); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKey.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKey.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKey.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKey.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java index ca4dc91ae6dd..95d18c5a6c4b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinition.java @@ -25,7 +25,7 @@ public final class PartitionKeyDefinition extends JsonSerializable { * Constructor. Creates a new instance of the PartitionKeyDefinition object. */ public PartitionKeyDefinition() { - this.kind(PartitionKind.HASH); + this.setKind(PartitionKind.HASH); } /** @@ -43,7 +43,7 @@ public PartitionKeyDefinition() { * * @return the partition algorithm. */ - public PartitionKind kind() { + public PartitionKind getKind() { if (this.kind == null) { this.kind = super.getObject(Constants.Properties.PARTITION_KIND, PartitionKind.class, true); } @@ -57,12 +57,12 @@ public PartitionKind kind() { * @param kind the partition algorithm. * @return this PartitionKeyDefinition. */ - public PartitionKeyDefinition kind(PartitionKind kind) { + public PartitionKeyDefinition setKind(PartitionKind kind) { this.kind = kind; return this; } - public PartitionKeyDefinitionVersion version() { + public PartitionKeyDefinitionVersion getVersion() { if (this.version == null) { Object versionObject = super.getObject(Constants.Properties.PARTITION_KEY_DEFINITION_VERSION, Object.class); if (versionObject == null) { @@ -82,7 +82,7 @@ public PartitionKeyDefinitionVersion version() { return this.version; } - public PartitionKeyDefinition version(PartitionKeyDefinitionVersion version) { + public PartitionKeyDefinition setVersion(PartitionKeyDefinitionVersion version) { this.version = version; return this; } @@ -92,7 +92,7 @@ public PartitionKeyDefinition version(PartitionKeyDefinitionVersion version) { * * @return the paths to the document properties that form the partition key. */ - public List paths() { + public List getPaths() { if (this.paths == null) { if (super.has(Constants.Properties.PARTITION_KEY_PATHS)) { paths = super.getList(Constants.Properties.PARTITION_KEY_PATHS, String.class); @@ -110,9 +110,9 @@ public List paths() { * @param paths the paths to document properties that form the partition key. * @return this PartitionKeyDefinition. */ - public PartitionKeyDefinition paths(List paths) { + public PartitionKeyDefinition setPaths(List paths) { if (paths == null || paths.size() == 0) { - throw new IllegalArgumentException("paths must not be null or empty."); + throw new IllegalArgumentException("getPaths must not be null or empty."); } this.paths = paths; @@ -137,7 +137,7 @@ Boolean isSystemKey() { } PartitionKeyInternal getNonePartitionKeyValue() { - if (this.paths().size() == 0 || this.isSystemKey()) { + if (this.getPaths().size() == 0 || this.isSystemKey()) { return PartitionKeyInternal.Empty; } else { return PartitionKeyInternal.UndefinedPartitionKey; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinitionVersion.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinitionVersion.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinitionVersion.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyDefinitionVersion.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java index 08b3a4c5e9a1..b4cdb661a272 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeGoneException.java @@ -55,6 +55,6 @@ public PartitionKeyRangeGoneException(String message, HttpHeaders headers, Strin } private void setSubstatus() { - this.responseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.PARTITION_KEY_RANGE_GONE)); + this.getResponseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.PARTITION_KEY_RANGE_GONE)); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java index 84c9bc5ea07d..8de6782bbd5a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKeyRangeIsSplittingException.java @@ -60,8 +60,8 @@ public PartitionKeyRangeIsSplittingException(String message, HttpHeaders headers } private void setSubStatus() { - this.responseHeaders().put( + this.getResponseHeaders().put( WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.COMPLETING_SPLIT)); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKind.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKind.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKind.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PartitionKind.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PermissionMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PermissionMode.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PermissionMode.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PermissionMode.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PreconditionFailedException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PreconditionFailedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/PreconditionFailedException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/PreconditionFailedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java index ce7e5124a7c1..43172cbb91f5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RangeIndex.java @@ -27,7 +27,7 @@ public final class RangeIndex extends Index { */ public RangeIndex(DataType dataType) { super(IndexKind.RANGE); - this.dataType(dataType); + this.setDataType(dataType); } /** @@ -44,8 +44,8 @@ public RangeIndex(DataType dataType) { */ public RangeIndex(DataType dataType, int precision) { super(IndexKind.RANGE); - this.dataType(dataType); - this.precision(precision); + this.setDataType(dataType); + this.setPrecision(precision); } /** @@ -55,7 +55,7 @@ public RangeIndex(DataType dataType, int precision) { */ RangeIndex(String jsonString) { super(jsonString, IndexKind.RANGE); - if (this.dataType() == null) { + if (this.getDataType() == null) { throw new IllegalArgumentException("The jsonString doesn't contain a valid 'dataType'."); } } @@ -65,7 +65,7 @@ public RangeIndex(DataType dataType, int precision) { * * @return the data type. */ - public DataType dataType() { + public DataType getDataType() { DataType result = null; try { result = DataType.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.DATA_TYPE))); @@ -81,7 +81,7 @@ public DataType dataType() { * @param dataType the data type. * @return the RangeIndex. */ - public RangeIndex dataType(DataType dataType) { + public RangeIndex setDataType(DataType dataType) { super.set(Constants.Properties.DATA_TYPE, dataType.toString()); return this; } @@ -91,7 +91,7 @@ public RangeIndex dataType(DataType dataType) { * * @return the precision. */ - public int precision() { + public int getPrecision() { return super.getInt(Constants.Properties.PRECISION); } @@ -101,7 +101,7 @@ public int precision() { * @param precision the precision. * @return the RangeIndex. */ - public RangeIndex precision(int precision) { + public RangeIndex setPrecision(int precision) { super.set(Constants.Properties.PRECISION, precision); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestEntityTooLargeException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestEntityTooLargeException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestEntityTooLargeException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestEntityTooLargeException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestRateTooLargeException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestRateTooLargeException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestRateTooLargeException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestRateTooLargeException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestTimeoutException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestTimeoutException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RequestTimeoutException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RequestTimeoutException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java similarity index 80% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java index 970463f94784..7b2631b6e845 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/Resource.java @@ -19,13 +19,13 @@ public class Resource extends JsonSerializable { private String altLink; static void validateResource(Resource resource) { - if (!StringUtils.isEmpty(resource.id())) { - if (resource.id().indexOf('/') != -1 || resource.id().indexOf('\\') != -1 || - resource.id().indexOf('?') != -1 || resource.id().indexOf('#') != -1) { + if (!StringUtils.isEmpty(resource.getId())) { + if (resource.getId().indexOf('/') != -1 || resource.getId().indexOf('\\') != -1 || + resource.getId().indexOf('?') != -1 || resource.getId().indexOf('#') != -1) { throw new IllegalArgumentException("Id contains illegal chars."); } - if (resource.id().endsWith(" ")) { + if (resource.getId().endsWith(" ")) { throw new IllegalArgumentException("Id ends with a space."); } } @@ -37,12 +37,12 @@ static void validateResource(Resource resource) { * @param resource resource to by copied. */ protected Resource(Resource resource) { - this.id(resource.id()); - this.resourceId(resource.resourceId()); - this.selfLink(resource.selfLink()); - this.altLink(resource.altLink()); - this.timestamp(resource.timestamp()); - this.etag(resource.etag()); + this.setId(resource.getId()); + this.setResourceId(resource.getResourceId()); + this.setSelfLink(resource.getSelfLink()); + this.setAltLink(resource.getAltLink()); + this.setTimestamp(resource.getTimestamp()); + this.setETag(resource.getETag()); } /** @@ -87,7 +87,7 @@ protected Resource(String jsonString) { * * @return the name of the resource. */ - public String id() { + public String getId() { return super.getString(Constants.Properties.ID); } @@ -97,7 +97,7 @@ public String id() { * @param id the name of the resource. * @return the resource. */ - public Resource id(String id) { + public Resource setId(String id) { super.set(Constants.Properties.ID, id); return this; } @@ -107,7 +107,7 @@ public Resource id(String id) { * * @return the ID associated with the resource. */ - public String resourceId() { + public String getResourceId() { return super.getString(Constants.Properties.R_ID); } @@ -118,7 +118,7 @@ public String resourceId() { * @param resourceId the ID associated with the resource. * @return the resource. */ - public Resource resourceId(String resourceId) { + public Resource setResourceId(String resourceId) { super.set(Constants.Properties.R_ID, resourceId); return this; } @@ -128,7 +128,7 @@ public Resource resourceId(String resourceId) { * * @return the self link. */ - public String selfLink() { + public String getSelfLink() { return super.getString(Constants.Properties.SELF_LINK); } @@ -137,7 +137,7 @@ public String selfLink() { * * @param selfLink the self link. */ - Resource selfLink(String selfLink) { + Resource setSelfLink(String selfLink) { super.set(Constants.Properties.SELF_LINK, selfLink); return this; } @@ -147,7 +147,7 @@ Resource selfLink(String selfLink) { * * @return the timestamp. */ - public OffsetDateTime timestamp() { + public OffsetDateTime getTimestamp() { Long seconds = super.getLong(Constants.Properties.LAST_MODIFIED); if (seconds == null) return null; @@ -159,7 +159,7 @@ public OffsetDateTime timestamp() { * * @param timestamp the timestamp. */ - Resource timestamp(OffsetDateTime timestamp) { + Resource setTimestamp(OffsetDateTime timestamp) { long seconds = timestamp.toEpochSecond(); super.set(Constants.Properties.LAST_MODIFIED, seconds); return this; @@ -170,7 +170,7 @@ Resource timestamp(OffsetDateTime timestamp) { * * @return the e tag. */ - public String etag() { + public String getETag() { return super.getString(Constants.Properties.E_TAG); } @@ -179,7 +179,7 @@ public String etag() { * * @param eTag the e tag. */ - Resource etag(String eTag) { + Resource setETag(String eTag) { super.set(Constants.Properties.E_TAG, eTag); return this; } @@ -190,7 +190,7 @@ Resource etag(String eTag) { * * @param altLink */ - Resource altLink(String altLink) { + Resource setAltLink(String altLink) { this.altLink = altLink; return this; } @@ -199,7 +199,7 @@ Resource altLink(String altLink) { * Gets the alt-link associated with the resource from the Azure Cosmos DB * service. */ - String altLink() { + String getAltLink() { return this.altLink; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java index 24ae164fec1f..240a69139e31 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RetryOptions.java @@ -25,7 +25,7 @@ public RetryOptions() { * * @return the maximum number of retries. */ - public int maxRetryAttemptsOnThrottledRequests() { + public int getMaxRetryAttemptsOnThrottledRequests() { return this.maxRetryAttemptsOnThrottledRequests; } @@ -47,7 +47,7 @@ public int maxRetryAttemptsOnThrottledRequests() { * throttle error. * @return the RetryOptions. */ - public RetryOptions maxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests) { + public RetryOptions setMaxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests) { if (maxRetryAttemptsOnThrottledRequests < 0) { throw new IllegalArgumentException("maxRetryAttemptsOnThrottledRequests value must be a positive integer."); } @@ -61,7 +61,7 @@ public RetryOptions maxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnTh * * @return the maximum retry time in seconds. */ - public int maxRetryWaitTimeInSeconds() { + public int getMaxRetryWaitTimeInSeconds() { return this.maxRetryWaitTimeInSeconds; } @@ -80,7 +80,7 @@ public int maxRetryWaitTimeInSeconds() { * @param maxRetryWaitTimeInSeconds the maximum number of seconds a request will be retried. * @return the RetryOptions. */ - public RetryOptions maxRetryWaitTimeInSeconds(int maxRetryWaitTimeInSeconds) { + public RetryOptions setMaxRetryWaitTimeInSeconds(int maxRetryWaitTimeInSeconds) { if (maxRetryWaitTimeInSeconds < 0 || maxRetryWaitTimeInSeconds > Integer.MAX_VALUE / 1000) { throw new IllegalArgumentException( "value must be a positive integer between the range of 0 to " + Integer.MAX_VALUE / 1000); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RetryWithException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RetryWithException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/RetryWithException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/RetryWithException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SerializationFormattingPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SerializationFormattingPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SerializationFormattingPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SerializationFormattingPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ServiceUnavailableException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ServiceUnavailableException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ServiceUnavailableException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/ServiceUnavailableException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java index 7f88321a1fde..9d1e15d10a75 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialIndex.java @@ -27,7 +27,7 @@ final class SpatialIndex extends Index { */ SpatialIndex(DataType dataType) { super(IndexKind.SPATIAL); - this.dataType(dataType); + this.setDataType(dataType); } /** @@ -37,7 +37,7 @@ final class SpatialIndex extends Index { */ SpatialIndex(String jsonString) { super(jsonString, IndexKind.SPATIAL); - if (this.dataType() == null) { + if (this.getDataType() == null) { throw new IllegalArgumentException("The jsonString doesn't contain a valid 'dataType'."); } } @@ -47,7 +47,7 @@ final class SpatialIndex extends Index { * * @return the data type. */ - public DataType dataType() { + public DataType getDataType() { DataType result = null; try { result = DataType.valueOf(StringUtils.upperCase(super.getString(Constants.Properties.DATA_TYPE))); @@ -63,7 +63,7 @@ public DataType dataType() { * @param dataType the data type. * @return the SpatialIndex. */ - public SpatialIndex dataType(DataType dataType) { + public SpatialIndex setDataType(DataType dataType) { super.set(Constants.Properties.DATA_TYPE, dataType.toString()); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java index 1c579937a98d..ad6dc9d45df6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialSpec.java @@ -35,7 +35,7 @@ public SpatialSpec() { * * @return the path. */ - public String path() { + public String getPath() { return super.getString(Constants.Properties.PATH); } @@ -45,7 +45,7 @@ public String path() { * @param path the path. * @return the SpatialSpec. */ - public SpatialSpec path(String path) { + public SpatialSpec setPath(String path) { super.set(Constants.Properties.PATH, path); return this; } @@ -55,7 +55,7 @@ public SpatialSpec path(String path) { * * @return the collection of spatial types. */ - public List spatialTypes() { + public List getSpatialTypes() { if (this.spatialTypes == null) { this.spatialTypes = super.getList(Constants.Properties.TYPES, SpatialType.class, true); @@ -73,7 +73,7 @@ public List spatialTypes() { * @param spatialTypes the collection of spatial types. * @return the SpatialSpec. */ - public SpatialSpec spatialTypes(List spatialTypes) { + public SpatialSpec setSpatialTypes(List spatialTypes) { this.spatialTypes = spatialTypes; Collection spatialTypeNames = new ArrayList(); for (SpatialType spatialType : this.spatialTypes) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SpatialType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java index e6c9f8f0d0dc..ad1175de826c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameter.java @@ -24,8 +24,8 @@ public SqlParameter() { */ public SqlParameter(String name, Object value) { super(); - this.name(name); - this.value(value); + this.setName(name); + this.setValue(value); } /** @@ -33,7 +33,7 @@ public SqlParameter(String name, Object value) { * * @return the name of the parameter. */ - public String name() { + public String getName() { return super.getString("name"); } @@ -43,7 +43,7 @@ public String name() { * @param name the name of the parameter. * @return the SqlParameter. */ - public SqlParameter name(String name) { + public SqlParameter setName(String name) { super.set("name", name); return this; } @@ -55,7 +55,7 @@ public SqlParameter name(String name) { * @param the type of the parameter * @return the value of the parameter. */ - public Object value(Class c) { + public Object getValue(Class c) { return super.getObject("value", c); } @@ -65,7 +65,7 @@ public Object value(Class c) { * @param value the value of the parameter. * @return the SqlParameter. */ - public SqlParameter value(Object value) { + public SqlParameter setValue(Object value) { super.set("value", value); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameterList.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameterList.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameterList.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlParameterList.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java index 2c7b94a1e5b3..5665bac34dfe 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/SqlQuerySpec.java @@ -29,7 +29,7 @@ public SqlQuerySpec() { */ public SqlQuerySpec(String queryText) { super(); - this.queryText(queryText); + this.setQueryText(queryText); } /** @@ -41,7 +41,7 @@ public SqlQuerySpec(String queryText) { */ public SqlQuerySpec(String queryText, SqlParameterList parameters) { super(); - this.queryText(queryText); + this.setQueryText(queryText); this.parameters = parameters; } @@ -50,7 +50,7 @@ public SqlQuerySpec(String queryText, SqlParameterList parameters) { * * @return the query text. */ - public String queryText() { + public String getQueryText() { return super.getString("query"); } @@ -61,7 +61,7 @@ public String queryText() { * the query text. * @return the SqlQuerySpec. */ - public SqlQuerySpec queryText(String queryText) { + public SqlQuerySpec setQueryText(String queryText) { super.set("query", queryText); return this; } @@ -71,7 +71,7 @@ public SqlQuerySpec queryText(String queryText) { * * @return the query parameters. */ - public SqlParameterList parameters() { + public SqlParameterList getParameters() { if (this.parameters == null) { Collection sqlParameters = super.getCollection("parameters", SqlParameter.class); if (sqlParameters == null) { @@ -91,7 +91,7 @@ public SqlParameterList parameters() { * the query parameters. * @return the SqlQuerySpec. */ - public SqlQuerySpec parameters(SqlParameterList parameters) { + public SqlQuerySpec setParameters(SqlParameterList parameters) { this.parameters = parameters; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TokenResolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TokenResolver.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TokenResolver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TokenResolver.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerOperation.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerOperation.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerOperation.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerOperation.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/TriggerType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UnauthorizedException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UnauthorizedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UnauthorizedException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UnauthorizedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java index a32a1540235e..52719c20af4b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKey.java @@ -35,7 +35,7 @@ public UniqueKey() { * * @return the unique paths. */ - public Collection paths() { + public Collection getPaths() { if (this.paths == null) { this.paths = super.getList(Constants.Properties.PATHS, String.class); @@ -57,7 +57,7 @@ public Collection paths() { * @param paths the unique paths. * @return the Unique Key. */ - public UniqueKey paths(List paths) { + public UniqueKey setPaths(List paths) { this.paths = paths; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKeyPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKeyPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKeyPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/UniqueKeyPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java index b58914e96a98..3267758bffca 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AsyncDocumentClient.java @@ -42,14 +42,14 @@ * .withMasterKeyOrResourceToken(masterKey) * .withConnectionPolicy(connectionPolicy) * .withConsistencyLevel(ConsistencyLevel.SESSION) - * .build(); + * .buildAsyncClient(); * } *

*/ public interface AsyncDocumentClient { /** - * Helper class to build {@link AsyncDocumentClient} instances + * Helper class to buildAsyncClient {@link AsyncDocumentClient} instances * as logical representation of the Azure Cosmos DB database service. * *
@@ -61,7 +61,7 @@ public interface AsyncDocumentClient {
      *         .withMasterKeyOrResourceToken(masterKey)
      *         .withConnectionPolicy(connectionPolicy)
      *         .withConsistencyLevel(ConsistencyLevel.SESSION)
-     *         .build();
+     *         .buildAsyncClient();
      * }
      * 
*/ @@ -139,8 +139,8 @@ public Builder withConnectionPolicy(ConnectionPolicy connectionPolicy) { } public Builder withCosmosKeyCredential(CosmosKeyCredential cosmosKeyCredential) { - if (cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.key())) { - throw new IllegalArgumentException("Cannot build client with empty key credential"); + if (cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.getKey())) { + throw new IllegalArgumentException("Cannot buildAsyncClient client with empty key credential"); } this.cosmosKeyCredential = cosmosKeyCredential; return this; @@ -165,14 +165,14 @@ private void ifThrowIllegalArgException(boolean value, String error) { public AsyncDocumentClient build() { - ifThrowIllegalArgException(this.serviceEndpoint == null, "cannot build client without service endpoint"); + ifThrowIllegalArgException(this.serviceEndpoint == null, "cannot buildAsyncClient client without service endpoint"); ifThrowIllegalArgException( this.masterKeyOrResourceToken == null && (permissionFeed == null || permissionFeed.isEmpty()) && this.tokenResolver == null && this.cosmosKeyCredential == null, - "cannot build client without any one of masterKey, " + + "cannot buildAsyncClient client without any one of masterKey, " + "resource token, permissionFeed, tokenResolver and cosmos key credential"); - ifThrowIllegalArgException(cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.key()), - "cannot build client without key credential"); + ifThrowIllegalArgException(cosmosKeyCredential != null && StringUtils.isEmpty(cosmosKeyCredential.getKey()), + "cannot buildAsyncClient client without key credential"); RxDocumentClientImpl client = new RxDocumentClientImpl(serviceEndpoint, masterKeyOrResourceToken, diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenProvider.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenProvider.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/AuthorizationTokenType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BackoffRetryUtility.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BackoffRetryUtility.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BackoffRetryUtility.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BackoffRetryUtility.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java index 51ea66597f35..484306fc2b61 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseAuthorizationTokenProvider.java @@ -117,7 +117,7 @@ public String generateKeyAuthorizationSignature(String verb, throw new IllegalArgumentException("headers"); } - if (StringUtils.isEmpty(this.cosmosKeyCredential.key())) { + if (StringUtils.isEmpty(this.cosmosKeyCredential.getKey())) { throw new IllegalArgumentException("key credentials cannot be empty"); } @@ -243,11 +243,11 @@ private String generateKeyAuthorizationSignatureNew(String verb, String resource } private Mac getMacInstance() { - int masterKeyLatestHashCode = this.cosmosKeyCredential.keyHashCode(); + int masterKeyLatestHashCode = this.cosmosKeyCredential.getKeyHashCode(); // Master key has changed, or this is the first time we are getting mac instance if (masterKeyLatestHashCode != this.masterKeyHashCode) { - byte[] masterKeyBytes = this.cosmosKeyCredential.key().getBytes(); + byte[] masterKeyBytes = this.cosmosKeyCredential.getKey().getBytes(); byte[] masterKeyDecodedBytes = Utils.Base64Decoder.decode(masterKeyBytes); SecretKey signingKey = new SecretKeySpec(masterKeyDecodedBytes, "HMACSHA256"); try { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java index 76f62c035250..b62e9f6b6242 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/BaseDatabaseAccountConfigurationProvider.java @@ -20,7 +20,7 @@ public BaseDatabaseAccountConfigurationProvider(DatabaseAccount databaseAccount, } public ConsistencyLevel getStoreConsistencyPolicy() { - ConsistencyLevel databaseAccountConsistency = BridgeInternal.getConsistencyPolicy(this.databaseAccount).defaultConsistencyLevel(); + ConsistencyLevel databaseAccountConsistency = BridgeInternal.getConsistencyPolicy(this.databaseAccount).getDefaultConsistencyLevel(); if (this.desiredConsistencyLevel == null) { return databaseAccountConsistency; } else if (!Utils.isValidConsistency(databaseAccountConsistency, this.desiredConsistencyLevel)) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Bytes.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Bytes.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Bytes.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Bytes.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java index e31964bbe35c..b4a5dc38405d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ChangeFeedQueryImpl.java @@ -40,11 +40,11 @@ public ChangeFeedQueryImpl(RxDocumentClientImpl client, changeFeedOptions = changeFeedOptions != null ? changeFeedOptions: new ChangeFeedOptions(); - if (resourceType.isPartitioned() && partitionKeyRangeIdInternal(changeFeedOptions) == null && changeFeedOptions.partitionKey() == null) { + if (resourceType.isPartitioned() && partitionKeyRangeIdInternal(changeFeedOptions) == null && changeFeedOptions.getPartitionKey() == null) { throw new IllegalArgumentException(RMResources.PartitionKeyRangeIdOrPartitionKeyMustBeSpecified); } - if (changeFeedOptions.partitionKey() != null && + if (changeFeedOptions.getPartitionKey() != null && !Strings.isNullOrEmpty(partitionKeyRangeIdInternal(changeFeedOptions))) { throw new IllegalArgumentException(String.format( @@ -55,16 +55,16 @@ public ChangeFeedQueryImpl(RxDocumentClientImpl client, String initialNextIfNoneMatch = null; boolean canUseStartFromBeginning = true; - if (changeFeedOptions.requestContinuation() != null) { - initialNextIfNoneMatch = changeFeedOptions.requestContinuation(); + if (changeFeedOptions.getRequestContinuation() != null) { + initialNextIfNoneMatch = changeFeedOptions.getRequestContinuation(); canUseStartFromBeginning = false; } - if(changeFeedOptions.startDateTime() != null){ + if(changeFeedOptions.getStartDateTime() != null){ canUseStartFromBeginning = false; } - if (canUseStartFromBeginning && !changeFeedOptions.startFromBeginning()) { + if (canUseStartFromBeginning && !changeFeedOptions.getStartFromBeginning()) { initialNextIfNoneMatch = IfNonMatchAllHeaderValue; } @@ -74,8 +74,8 @@ public ChangeFeedQueryImpl(RxDocumentClientImpl client, private RxDocumentServiceRequest createDocumentServiceRequest(String continuationToken, int pageSize) { Map headers = new HashMap<>(); - if (options.maxItemCount() != null) { - headers.put(HttpConstants.HttpHeaders.PAGE_SIZE, String.valueOf(options.maxItemCount())); + if (options.getMaxItemCount() != null) { + headers.put(HttpConstants.HttpHeaders.PAGE_SIZE, String.valueOf(options.getMaxItemCount())); } // On REST level, change feed is using IF_NONE_MATCH/ETag instead of continuation. @@ -85,13 +85,13 @@ private RxDocumentServiceRequest createDocumentServiceRequest(String continuatio headers.put(HttpConstants.HttpHeaders.A_IM, HttpConstants.A_IMHeaderValues.INCREMENTAL_FEED); - if (options.partitionKey() != null) { - PartitionKeyInternal partitionKey = options.partitionKey().getInternalPartitionKey(); + if (options.getPartitionKey() != null) { + PartitionKeyInternal partitionKey = options.getPartitionKey().getInternalPartitionKey(); headers.put(HttpConstants.HttpHeaders.PARTITION_KEY, partitionKey.toJson()); } - if(options.startDateTime() != null){ - String dateTimeInHttpFormat = Utils.zonedDateTimeAsUTCRFC1123(options.startDateTime()); + if(options.getStartDateTime() != null){ + String dateTimeInHttpFormat = Utils.zonedDateTimeAsUTCRFC1123(options.getStartDateTime()); headers.put(HttpConstants.HttpHeaders.IF_MODIFIED_SINCE, dateTimeInHttpFormat); } @@ -111,7 +111,7 @@ private RxDocumentServiceRequest createDocumentServiceRequest(String continuatio private ChangeFeedOptions getChangeFeedOptions(ChangeFeedOptions options, String continuationToken) { ChangeFeedOptions newOps = new ChangeFeedOptions(options); - newOps.requestContinuation(continuationToken); + newOps.setRequestContinuation(continuationToken); return newOps; } @@ -121,7 +121,7 @@ public Flux> executeAsync() { Function>> executeFunc = this::executeRequestAsync; - return Paginator.getPaginatedChangeFeedQueryResultAsObservable(options, createRequestFunc, executeFunc, klass, options.maxItemCount() != null ? options.maxItemCount(): -1); + return Paginator.getPaginatedChangeFeedQueryResultAsObservable(options, createRequestFunc, executeFunc, klass, options.getMaxItemCount() != null ? options.getMaxItemCount(): -1); } private Flux> executeRequestAsync(RxDocumentServiceRequest request) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClearingSessionContainerClientRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClearingSessionContainerClientRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClearingSessionContainerClientRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClearingSessionContainerClientRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java index b0f7adf8ec42..60ad46edca80 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ClientRetryPolicy.java @@ -45,8 +45,8 @@ public ClientRetryPolicy(GlobalEndpointManager globalEndpointManager, RetryOptions retryOptions) { this.throttlingRetry = new ResourceThrottleRetryPolicy( - retryOptions.maxRetryAttemptsOnThrottledRequests(), - retryOptions.maxRetryWaitTimeInSeconds()); + retryOptions.getMaxRetryAttemptsOnThrottledRequests(), + retryOptions.getMaxRetryWaitTimeInSeconds()); this.globalEndpointManager = globalEndpointManager; this.failoverRetryCount = 0; this.enableEndpointDiscovery = enableEndpointDiscovery; @@ -67,8 +67,8 @@ public Mono shouldRetry(Exception e) { this.retryContext = null; // Received 403.3 on write region, initiate the endpoint re-discovery CosmosClientException clientException = Utils.as(e, CosmosClientException.class); - if (clientException != null && clientException.cosmosResponseDiagnostics() != null) { - this.cosmosResponseDiagnostics = clientException.cosmosResponseDiagnostics(); + if (clientException != null && clientException.getCosmosResponseDiagnostics() != null) { + this.cosmosResponseDiagnostics = clientException.getCosmosResponseDiagnostics(); } if (clientException != null && Exceptions.isStatusCode(clientException, HttpConstants.StatusCodes.FORBIDDEN) && diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Configs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Configs.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Configs.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Configs.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Conflict.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Conflict.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Conflict.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Conflict.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Constants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Constants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Constants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Constants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ContentSerializationFormat.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ContentSerializationFormat.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ContentSerializationFormat.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ContentSerializationFormat.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java index 614e06986ac1..77b520eff5e6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Database.java @@ -28,8 +28,8 @@ public Database() { * @param id the name of the resource. * @return the current instance of Database */ - public Database id(String id){ - super.id(id); + public Database setId(String id){ + super.setId(id); return this; } @@ -49,7 +49,7 @@ public Database(String jsonString) { */ public String getCollectionsLink() { return String.format("%s/%s", - StringUtils.stripEnd(super.selfLink(), "/"), + StringUtils.stripEnd(super.getSelfLink(), "/"), super.getString(Constants.Properties.COLLECTIONS_LINK)); } @@ -60,7 +60,7 @@ public String getCollectionsLink() { */ public String getUsersLink() { return String.format("%s/%s", - StringUtils.stripEnd(super.selfLink(), "/"), + StringUtils.stripEnd(super.getSelfLink(), "/"), super.getString(Constants.Properties.USERS_LINK)); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountConfigurationProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountConfigurationProvider.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountConfigurationProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountConfigurationProvider.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountManagerInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountManagerInternal.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountManagerInternal.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseAccountManagerInternal.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java index f793efcefbb4..72f0cd23eaf8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DatabaseForTest.java @@ -46,11 +46,11 @@ public static String generateId() { } private static DatabaseForTest from(Database db) { - if (db == null || db.id() == null || db.selfLink() == null) { + if (db == null || db.getId() == null || db.getSelfLink() == null) { return null; } - String id = db.id(); + String id = db.getId(); if (id == null) { return null; } @@ -73,7 +73,7 @@ private static DatabaseForTest from(Database db) { public static DatabaseForTest create(DatabaseManager client) { Database dbDef = new Database(); - dbDef.id(generateId()); + dbDef.setId(generateId()); Database db = client.createDatabase(dbDef).single().block().getResource(); DatabaseForTest dbForTest = DatabaseForTest.from(db); @@ -86,16 +86,16 @@ public static void cleanupStaleTestDatabases(DatabaseManager client) { List dbs = client.queryDatabases( new SqlQuerySpec("SELECT * FROM c WHERE STARTSWITH(c.id, @PREFIX)", new SqlParameterList(new SqlParameter("@PREFIX", DatabaseForTest.SHARED_DB_ID_PREFIX)))) - .flatMap(page -> Flux.fromIterable(page.results())).collectList().block(); + .flatMap(page -> Flux.fromIterable(page.getResults())).collectList().block(); for (Database db : dbs) { - assert(db.id().startsWith(DatabaseForTest.SHARED_DB_ID_PREFIX)); + assert(db.getId().startsWith(DatabaseForTest.SHARED_DB_ID_PREFIX)); DatabaseForTest dbForTest = DatabaseForTest.from(db); if (db != null && dbForTest.isStale()) { - logger.info("Deleting database {}", db.id()); - client.deleteDatabase(db.id()).single().block(); + logger.info("Deleting database {}", db.getId()); + client.deleteDatabase(db.getId()).single().block(); } } } @@ -105,4 +105,4 @@ public interface DatabaseManager { Flux> createDatabase(Database databaseDefinition); Flux> deleteDatabase(String id); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java index fc32659f06c5..7cdd45e32493 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Document.java @@ -33,8 +33,8 @@ public Document() { * @param id the name of the resource. * @return the current instance of the Document */ - public Document id(String id){ - super.id(id); + public Document setId(String id){ + super.setId(id); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java index c259caa06534..e099925f555a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentCollection.java @@ -39,8 +39,8 @@ public DocumentCollection() { * @param id the name of the resource. * @return */ - public DocumentCollection id(String id){ - super.id(id); + public DocumentCollection setId(String id){ + super.setId(id); return this; } @@ -213,7 +213,7 @@ public void setConflictResolutionPolicy(ConflictResolutionPolicy value) { */ public String getDocumentsLink() { return String.format("%s/%s", - StringUtils.stripEnd(super.selfLink(), "/"), + StringUtils.stripEnd(super.getSelfLink(), "/"), super.getString(Constants.Properties.DOCUMENTS_LINK)); } @@ -224,7 +224,7 @@ public String getDocumentsLink() { */ public String getStoredProceduresLink() { return String.format("%s/%s", - StringUtils.stripEnd(super.selfLink(), "/"), + StringUtils.stripEnd(super.getSelfLink(), "/"), super.getString(Constants.Properties.STORED_PROCEDURES_LINK)); } @@ -234,7 +234,7 @@ public String getStoredProceduresLink() { * @return the trigger link. */ public String getTriggersLink() { - return StringUtils.removeEnd(this.selfLink(), "/") + + return StringUtils.removeEnd(this.getSelfLink(), "/") + "/" + super.getString(Constants.Properties.TRIGGERS_LINK); } @@ -244,7 +244,7 @@ public String getTriggersLink() { * @return the user defined functions link. */ public String getUserDefinedFunctionsLink() { - return StringUtils.removeEnd(this.selfLink(), "/") + + return StringUtils.removeEnd(this.getSelfLink(), "/") + "/" + super.getString(Constants.Properties.USER_DEFINED_FUNCTIONS_LINK); } @@ -254,7 +254,7 @@ public String getUserDefinedFunctionsLink() { * @return the conflicts link. */ public String getConflictsLink() { - return StringUtils.removeEnd(this.selfLink(), "/") + + return StringUtils.removeEnd(this.getSelfLink(), "/") + "/" + super.getString(Constants.Properties.CONFLICTS_LINK); } @@ -284,12 +284,12 @@ public boolean equals(Object obj) { } DocumentCollection typedObj = (DocumentCollection) obj; - return typedObj.resourceId().equals(this.resourceId()); + return typedObj.getResourceId().equals(this.getResourceId()); } @Override public int hashCode() { - return this.resourceId().hashCode(); + return this.getResourceId().hashCode(); } @Override @@ -297,4 +297,4 @@ public String toJson() { this.populatePropertyBag(); return super.toJson(); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentServiceRequestContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentServiceRequestContext.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentServiceRequestContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/DocumentServiceRequestContext.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/EnumerationDirection.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/EnumerationDirection.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/EnumerationDirection.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/EnumerationDirection.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java index e3bd9a3fc8b6..f72f0cc183a0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Exceptions.java @@ -11,11 +11,11 @@ public class Exceptions { public static boolean isStatusCode(CosmosClientException e, int status) { - return status == e.statusCode(); + return status == e.getStatusCode(); } public static boolean isSubStatusCode(CosmosClientException e, int subStatus) { - return subStatus == e.subStatusCode(); + return subStatus == e.getSubStatusCode(); } public static boolean isPartitionSplit(CosmosClientException e) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/FanoutOperationState.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/FanoutOperationState.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/FanoutOperationState.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/FanoutOperationState.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java index 22643869cbaa..04d2e41bc5bf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/GlobalEndpointManager.java @@ -49,12 +49,12 @@ public GlobalEndpointManager(DatabaseAccountManagerInternal owner, ConnectionPol this.backgroundRefreshLocationTimeIntervalInMS = configs.getUnavailableLocationsExpirationTimeInSeconds() * 1000; try { this.locationCache = new LocationCache( - new ArrayList<>(connectionPolicy.preferredLocations() != null ? - connectionPolicy.preferredLocations(): + new ArrayList<>(connectionPolicy.getPreferredLocations() != null ? + connectionPolicy.getPreferredLocations(): Collections.emptyList() ), owner.getServiceEndpoint().toURL(), - connectionPolicy.enableEndpointDiscovery(), + connectionPolicy.getEnableEndpointDiscovery(), BridgeInternal.getUseMultipleWriteLocations(connectionPolicy), configs); @@ -159,7 +159,7 @@ private Mono refreshLocationPrivateAsync(DatabaseAccount databaseAccount) Mono databaseAccountObs = getDatabaseAccountFromAnyLocationsAsync( this.defaultEndpoint, - new ArrayList<>(this.connectionPolicy.preferredLocations()), + new ArrayList<>(this.connectionPolicy.getPreferredLocations()), this::getDatabaseAccountAsync); return databaseAccountObs.map(dbAccount -> { @@ -211,7 +211,7 @@ private Mono startRefreshLocationTimerAsync(boolean initialization) { } logger.debug("startRefreshLocationTimerAsync() - Invoking refresh, I was registered on [{}]", now); - Mono databaseAccountObs = GlobalEndpointManager.getDatabaseAccountFromAnyLocationsAsync(this.defaultEndpoint, new ArrayList<>(this.connectionPolicy.preferredLocations()), + Mono databaseAccountObs = GlobalEndpointManager.getDatabaseAccountFromAnyLocationsAsync(this.defaultEndpoint, new ArrayList<>(this.connectionPolicy.getPreferredLocations()), this::getDatabaseAccountAsync); return databaseAccountObs.flatMap(dbAccount -> { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java index 8530ba2816e4..4f926800cbd5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java @@ -252,7 +252,7 @@ public static class Versions { // TODO: FIXME we can use maven plugin for generating a version file // @see // https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven - public static final String SDK_VERSION = "3.2.0"; + public static final String SDK_VERSION = "4.0.0-preview.4"; public static final String SDK_NAME = "cosmosdb-java-sdk"; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IAuthorizationTokenProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IAuthorizationTokenProvider.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IAuthorizationTokenProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IAuthorizationTokenProvider.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ICollectionRoutingMapCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ICollectionRoutingMapCache.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ICollectionRoutingMapCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ICollectionRoutingMapCache.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IDocumentClientRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IDocumentClientRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IDocumentClientRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IDocumentClientRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicyFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicyFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicyFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRetryPolicyFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRoutingMapProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRoutingMapProvider.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRoutingMapProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/IRoutingMapProvider.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionContainer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionContainer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionContainer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ISessionToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Integers.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Integers.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Integers.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Integers.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InternalConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InternalConstants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InternalConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InternalConstants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InvalidPartitionExceptionRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InvalidPartitionExceptionRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InvalidPartitionExceptionRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/InvalidPartitionExceptionRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/JavaStreamUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/JavaStreamUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/JavaStreamUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/JavaStreamUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/LifeCycleUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/LifeCycleUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/LifeCycleUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/LifeCycleUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Lists.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Lists.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Lists.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Lists.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Longs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Longs.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Longs.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Longs.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MigrateCollectionDirective.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MigrateCollectionDirective.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MigrateCollectionDirective.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MigrateCollectionDirective.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MutableVolatile.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MutableVolatile.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MutableVolatile.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/MutableVolatile.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ObservableHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ObservableHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ObservableHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ObservableHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Offer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Offer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Offer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Offer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java index 47d5c1d50db8..5b87499b9bda 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/OperationType.java @@ -50,4 +50,4 @@ public boolean isWriteOperation() { this == Upsert || this == Update; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyMismatchRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyMismatchRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyMismatchRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyMismatchRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java index 4bedd8738b37..0b5f77629e95 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRange.java @@ -40,21 +40,21 @@ public PartitionKeyRange(String jsonString) { * @param id the name of the resource. * @return the partition key range */ - public PartitionKeyRange id(String id) { - super.id(id); + public PartitionKeyRange setId(String id) { + super.setId(id); return this; } public PartitionKeyRange(String id, String minInclusive, String maxExclusive) { super(); - this.id(id); + this.setId(id); this.setMinInclusive(minInclusive); this.setMaxExclusive(maxExclusive); } public PartitionKeyRange(String id, String minInclusive, String maxExclusive, List parents) { super(); - this.id(id); + this.setId(id); this.setMinInclusive(minInclusive); this.setMaxExclusive(maxExclusive); this.setParents(parents); @@ -88,7 +88,7 @@ public boolean equals(Object obj) { PartitionKeyRange otherRange = (PartitionKeyRange) obj; - return this.id().compareTo(otherRange.id()) == 0 + return this.getId().compareTo(otherRange.getId()) == 0 && this.getMinInclusive().compareTo(otherRange.getMinInclusive()) == 0 && this.getMaxExclusive().compareTo(otherRange.getMaxExclusive()) == 0; } @@ -96,7 +96,7 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hash = 0; - hash = (hash * 397) ^ this.id().hashCode(); + hash = (hash * 397) ^ this.getId().hashCode(); hash = (hash * 397) ^ this.getMinInclusive().hashCode(); hash = (hash * 397) ^ this.getMaxExclusive().hashCode(); return hash; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java index 7bedc56d484f..a2ced808b2ef 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PartitionKeyRangeGoneRetryPolicy.java @@ -68,12 +68,12 @@ public Mono shouldRetry(Exception exception) { return collectionObs.flatMap(collection -> { - Mono routingMapObs = this.partitionKeyRangeCache.tryLookupAsync(collection.resourceId(), null, request.properties); + Mono routingMapObs = this.partitionKeyRangeCache.tryLookupAsync(collection.getResourceId(), null, request.properties); Mono refreshedRoutingMapObs = routingMapObs.flatMap(routingMap -> { // Force refresh. return this.partitionKeyRangeCache.tryLookupAsync( - collection.resourceId(), + collection.getResourceId(), routingMap, request.properties); }).switchIfEmpty(Mono.defer(Mono::empty)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java index 1c3f15ab5362..bccbf8ba9354 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathInfo.java @@ -18,4 +18,4 @@ public PathInfo(boolean isFeed, String resourcePath, String resourceIdOrFullName this.resourceIdOrFullName = resourceIdOrFullName; this.isNameBased = isNameBased; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathParser.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathParser.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathParser.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathParser.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Paths.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Paths.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Paths.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Paths.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathsHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathsHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathsHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/PathsHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java index 6c328b383063..e6955665f839 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Permission.java @@ -35,8 +35,8 @@ public Permission(String jsonString) { * @param id the name of the resource. * @return the current instance of permission */ - public Permission id(String id){ - super.id(id); + public Permission setId(String id){ + super.setId(id); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Quadruple.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Quadruple.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Quadruple.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Quadruple.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java index f8663aa47a85..0ef0346870cb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryCompatibilityMode.java @@ -11,4 +11,4 @@ public enum QueryCompatibilityMode { Default, Query, SqlQuery -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java index cb7abb32fa77..b44b1d65045a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetrics.java @@ -292,4 +292,4 @@ public static QueryMetrics createFromDelimitedStringAndClientSideMetrics(String public String toString() { return toTextString(0); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsConstants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsConstants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryMetricsUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryPreparationTimes.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryPreparationTimes.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryPreparationTimes.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/QueryPreparationTimes.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RMResources.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RMResources.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RMResources.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RMResources.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReadFeedKeyType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReadFeedKeyType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReadFeedKeyType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReadFeedKeyType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RemoteStorageType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RemoteStorageType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RemoteStorageType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RemoteStorageType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java index 06ec1be94708..437ab00aac5f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicy.java @@ -64,7 +64,7 @@ public Mono shouldRetry(Exception e) { Mono collectionObs = this.collectionCache.resolveCollectionAsync(request); return collectionObs.flatMap(collectionInfo -> { - if (!StringUtils.isEmpty(oldCollectionRid) && !StringUtils.isEmpty(collectionInfo.resourceId())) { + if (!StringUtils.isEmpty(oldCollectionRid) && !StringUtils.isEmpty(collectionInfo.getResourceId())) { return Mono.just(ShouldRetryResult.retryAfter(Duration.ZERO)); } return Mono.just(shouldRetryResult); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicatedResourceClientUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicatedResourceClientUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicatedResourceClientUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicatedResourceClientUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicationPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicationPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicationPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ReplicationPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java index 2923e505087c..71755e7860f8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestChargeTracker.java @@ -23,4 +23,4 @@ public void addCharge(double ruUsage) { public double getAndResetCharge() { return (double) this.totalRUs.getAndSet(0) / NUMBER_OF_DECIMAL_POINT_TO_RESERVE_FACTOR; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestOptions.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestOptions.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RequestOptions.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResetSessionTokenRetryPolicyFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResetSessionTokenRetryPolicyFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResetSessionTokenRetryPolicyFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResetSessionTokenRetryPolicyFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceId.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceId.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceId.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceId.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java index 01a2a9215333..441a02ad02a2 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceResponse.java @@ -336,7 +336,7 @@ public Duration getRequestLatency() { return Duration.ZERO; } - return cosmosResponseDiagnostics.requestLatency(); + return cosmosResponseDiagnostics.getRequestLatency(); } /** diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java index 8a84c7bc32a8..5a849eeab5ee 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceThrottleRetryPolicy.java @@ -89,7 +89,7 @@ private Duration checkIfRetryNeeded(Exception exception) { if (dce != null){ if (Exceptions.isStatusCode(dce, HttpConstants.StatusCodes.TOO_MANY_REQUESTS)) { - retryDelay = Duration.ofMillis(dce.retryAfterInMilliseconds()); + retryDelay = Duration.ofMillis(dce.getRetryAfterInMilliseconds()); if (this.backoffDelayFactor > 1) { retryDelay = Duration.ofNanos(retryDelay.toNanos() * this.backoffDelayFactor); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceTokenAuthorizationHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceTokenAuthorizationHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceTokenAuthorizationHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceTokenAuthorizationHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/ResourceType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java index ad8d2de3a4b1..ee8cf2e72df3 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryPolicy.java @@ -18,9 +18,9 @@ public class RetryPolicy implements IRetryPolicyFactory { private final RetryOptions retryOptions; public RetryPolicy(GlobalEndpointManager globalEndpointManager, ConnectionPolicy connectionPolicy) { - this.enableEndpointDiscovery = connectionPolicy.enableEndpointDiscovery(); + this.enableEndpointDiscovery = connectionPolicy.getEnableEndpointDiscovery(); this.globalEndpointManager = globalEndpointManager; - this.retryOptions = connectionPolicy.retryOptions(); + this.retryOptions = connectionPolicy.getRetryOptions(); } @Override diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RetryUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeConstants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeConstants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeExecutionTimes.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeExecutionTimes.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeExecutionTimes.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RuntimeExecutionTimes.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java index 3e0bcc0d1506..29cd4f267f8c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentClientImpl.java @@ -214,7 +214,7 @@ private RxDocumentClientImpl(URI serviceEndpoint, this.userAgentContainer = new UserAgentContainer(); - String userAgentSuffix = this.connectionPolicy.userAgentSuffix(); + String userAgentSuffix = this.connectionPolicy.getUserAgentSuffix(); if (userAgentSuffix != null && userAgentSuffix.length() > 0) { userAgentContainer.setSuffix(userAgentSuffix); } @@ -244,7 +244,7 @@ private void initializeGatewayConfigurationReader() { this.reactorHttpClient); DatabaseAccount databaseAccount = this.gatewayConfigurationReader.initializeReaderAsync().block(); - this.useMultipleWriteLocations = this.connectionPolicy.usingMultipleWriteLocations() && BridgeInternal.isEnableMultipleWriteLocations(databaseAccount); + this.useMultipleWriteLocations = this.connectionPolicy.getUsingMultipleWriteLocations() && BridgeInternal.isEnableMultipleWriteLocations(databaseAccount); // TODO: add support for openAsync // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/332589 @@ -270,7 +270,7 @@ public void init() { this.partitionKeyRangeCache = new RxPartitionKeyRangeCache(RxDocumentClientImpl.this, collectionCache); - if (this.connectionPolicy.connectionMode() == ConnectionMode.GATEWAY) { + if (this.connectionPolicy.getConnectionMode() == ConnectionMode.GATEWAY) { this.storeModel = this.gatewayProxy; } else { this.initializeDirectConnectivity(); @@ -281,7 +281,7 @@ private void initializeDirectConnectivity() { this.storeClientFactory = new StoreClientFactory( this.configs, - this.connectionPolicy.requestTimeoutInMillis() / 1000, + this.connectionPolicy.getRequestTimeoutInMillis() / 1000, // this.maxConcurrentConnectionOpenRequests, 0, this.userAgentContainer @@ -341,10 +341,10 @@ RxGatewayStoreModel createRxGatewayProxy(ISessionContainer sessionContainer, private HttpClient httpClient() { HttpClientConfig httpClientConfig = new HttpClientConfig(this.configs) - .withMaxIdleConnectionTimeoutInMillis(this.connectionPolicy.idleConnectionTimeoutInMillis()) - .withPoolSize(this.connectionPolicy.maxPoolSize()) - .withHttpProxy(this.connectionPolicy.proxy()) - .withRequestTimeoutInMillis(this.connectionPolicy.requestTimeoutInMillis()); + .withMaxIdleConnectionTimeoutInMillis(this.connectionPolicy.getIdleConnectionTimeoutInMillis()) + .withPoolSize(this.connectionPolicy.getMaxPoolSize()) + .withHttpProxy(this.connectionPolicy.getProxy()) + .withRequestTimeoutInMillis(this.connectionPolicy.getRequestTimeoutInMillis()); return HttpClient.createFixed(httpClientConfig); } @@ -411,7 +411,7 @@ private Flux> createDatabaseInternal(Database databas throw new IllegalArgumentException("Database"); } - logger.debug("Creating a Database. id: [{}]", database.id()); + logger.debug("Creating a Database. id: [{}]", database.getId()); validateResource(database); Map requestHeaders = this.getRequestHeaders(options); @@ -574,7 +574,7 @@ private Flux> createCollectionInternal(Stri } logger.debug("Creating a Collection. databaseLink: [{}], Collection id: [{}]", databaseLink, - collection.id()); + collection.getId()); validateResource(collection); String path = Utils.joinPath(databaseLink, Paths.COLLECTIONS_PATH_SEGMENT); @@ -589,7 +589,7 @@ private Flux> createCollectionInternal(Stri return this.create(request).map(response -> toResourceResponse(response, DocumentCollection.class)) .doOnNext(resourceResponse -> { // set the session token - this.sessionContainer.setSessionToken(resourceResponse.getResource().resourceId(), + this.sessionContainer.setSessionToken(resourceResponse.getResource().getResourceId(), getAltLink(resourceResponse.getResource()), resourceResponse.getResponseHeaders()); }); @@ -613,10 +613,10 @@ private Flux> replaceCollectionInternal(Doc throw new IllegalArgumentException("collection"); } - logger.debug("Replacing a Collection. id: [{}]", collection.id()); + logger.debug("Replacing a Collection. id: [{}]", collection.getId()); validateResource(collection); - String path = Utils.joinPath(collection.selfLink(), null); + String path = Utils.joinPath(collection.getSelfLink(), null); Map requestHeaders = this.getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, @@ -632,7 +632,7 @@ private Flux> replaceCollectionInternal(Doc .doOnNext(resourceResponse -> { if (resourceResponse.getResource() != null) { // set the session token - this.sessionContainer.setSessionToken(resourceResponse.getResource().resourceId(), + this.sessionContainer.setSessionToken(resourceResponse.getResource().getResourceId(), getAltLink(resourceResponse.getResource()), resourceResponse.getResponseHeaders()); } @@ -782,13 +782,13 @@ private static String serializeProcedureParams(Object[] objectArray) { } private static void validateResource(Resource resource) { - if (!StringUtils.isEmpty(resource.id())) { - if (resource.id().indexOf('/') != -1 || resource.id().indexOf('\\') != -1 || - resource.id().indexOf('?') != -1 || resource.id().indexOf('#') != -1) { + if (!StringUtils.isEmpty(resource.getId())) { + if (resource.getId().indexOf('/') != -1 || resource.getId().indexOf('\\') != -1 || + resource.getId().indexOf('?') != -1 || resource.getId().indexOf('#') != -1) { throw new IllegalArgumentException("Id contains illegal chars."); } - if (resource.id().endsWith(" ")) { + if (resource.getId().endsWith(" ")) { throw new IllegalArgumentException("Id ends with a space."); } } @@ -815,10 +815,10 @@ private Map getRequestHeaders(RequestOptions options) { } if (options.getAccessCondition() != null) { - if (options.getAccessCondition().type() == AccessConditionType.IF_MATCH) { - headers.put(HttpConstants.HttpHeaders.IF_MATCH, options.getAccessCondition().condition()); + if (options.getAccessCondition().getType() == AccessConditionType.IF_MATCH) { + headers.put(HttpConstants.HttpHeaders.IF_MATCH, options.getAccessCondition().getCondition()); } else { - headers.put(HttpConstants.HttpHeaders.IF_NONE_MATCH, options.getAccessCondition().condition()); + headers.put(HttpConstants.HttpHeaders.IF_NONE_MATCH, options.getAccessCondition().getCondition()); } } @@ -895,7 +895,7 @@ private void addPartitionKeyInformation(RxDocumentServiceRequest request, Docume partitionKeyInternal = BridgeInternal.getNonePartitionKey(partitionKeyDefinition); } else if (options != null && options.getPartitionKey() != null) { partitionKeyInternal = options.getPartitionKey().getInternalPartitionKey(); - } else if (partitionKeyDefinition == null || partitionKeyDefinition.paths().size() == 0) { + } else if (partitionKeyDefinition == null || partitionKeyDefinition.getPaths().size() == 0) { // For backward compatibility, if collection doesn't have partition key defined, we assume all documents // have empty value for it and user doesn't need to specify it explicitly. partitionKeyInternal = PartitionKeyInternal.getEmpty(); @@ -925,7 +925,7 @@ private static PartitionKeyInternal extractPartitionKeyValueFromDocument( Document document, PartitionKeyDefinition partitionKeyDefinition) { if (partitionKeyDefinition != null) { - String path = partitionKeyDefinition.paths().iterator().next(); + String path = partitionKeyDefinition.getPaths().iterator().next(); List parts = PathParser.getPathParts(path); if (parts.size() >= 1) { Object value = document.getObjectByPath(parts); @@ -958,10 +958,10 @@ private Mono getCreateDocumentRequest(String documentC RxDocumentClientImpl.validateResource(typedDocument); - if (typedDocument.id() == null && !disableAutomaticIdGeneration) { + if (typedDocument.getId() == null && !disableAutomaticIdGeneration) { // We are supposed to use GUID. Basically UUID is the same as GUID // when represented as a string. - typedDocument.id(UUID.randomUUID().toString()); + typedDocument.setId(UUID.randomUUID().toString()); } String path = Utils.joinPath(documentCollectionLink, Paths.DOCUMENTS_PATH_SEGMENT); Map requestHeaders = this.getRequestHeaders(options); @@ -1180,7 +1180,7 @@ private Flux> replaceDocumentInternal(String document public Flux> replaceDocument(Document document, RequestOptions options) { IDocumentClientRetryPolicy requestRetryPolicy = this.resetSessionTokenRetryPolicy.getRequestPolicy(); if (options == null || options.getPartitionKey() == null) { - String collectionLink = document.selfLink(); + String collectionLink = document.getSelfLink(); requestRetryPolicy = new PartitionKeyMismatchRetryPolicy(collectionCache, requestRetryPolicy, collectionLink, options); } IDocumentClientRetryPolicy finalRequestRetryPolicy = requestRetryPolicy; @@ -1194,7 +1194,7 @@ private Flux> replaceDocumentInternal(Document docume throw new IllegalArgumentException("document"); } - return this.replaceDocumentInternal(document.selfLink(), document, options, retryPolicyInstance); + return this.replaceDocumentInternal(document.getSelfLink(), document, options, retryPolicyInstance); } catch (Exception e) { logger.debug("Failure in replacing a database due to [{}]", e.getMessage()); @@ -1451,7 +1451,7 @@ private Flux> createStoredProcedureInternal(St try { logger.debug("Creating a StoredProcedure. collectionLink: [{}], storedProcedure id [{}]", - collectionLink, storedProcedure.id()); + collectionLink, storedProcedure.getId()); RxDocumentServiceRequest request = getStoredProcedureRequest(collectionLink, storedProcedure, options, OperationType.Create); if (retryPolicyInstance != null) { @@ -1483,7 +1483,7 @@ private Flux> upsertStoredProcedureInternal(St try { logger.debug("Upserting a StoredProcedure. collectionLink: [{}], storedProcedure id [{}]", - collectionLink, storedProcedure.id()); + collectionLink, storedProcedure.getId()); RxDocumentServiceRequest request = getStoredProcedureRequest(collectionLink, storedProcedure, options, OperationType.Upsert); if (retryPolicyInstance != null) { @@ -1513,11 +1513,11 @@ private Flux> replaceStoredProcedureInternal(S if (storedProcedure == null) { throw new IllegalArgumentException("storedProcedure"); } - logger.debug("Replacing a StoredProcedure. storedProcedure id [{}]", storedProcedure.id()); + logger.debug("Replacing a StoredProcedure. storedProcedure id [{}]", storedProcedure.getId()); RxDocumentClientImpl.validateResource(storedProcedure); - String path = Utils.joinPath(storedProcedure.selfLink(), null); + String path = Utils.joinPath(storedProcedure.getSelfLink(), null); Map requestHeaders = getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.StoredProcedure, path, storedProcedure, requestHeaders, options); @@ -1687,7 +1687,7 @@ private Flux> createTriggerInternal(String collectionL try { logger.debug("Creating a Trigger. collectionLink [{}], trigger id [{}]", collectionLink, - trigger.id()); + trigger.getId()); RxDocumentServiceRequest request = getTriggerRequest(collectionLink, trigger, options, OperationType.Create); if (retryPolicyInstance != null){ @@ -1714,7 +1714,7 @@ private Flux> upsertTriggerInternal(String collectionL try { logger.debug("Upserting a Trigger. collectionLink [{}], trigger id [{}]", collectionLink, - trigger.id()); + trigger.getId()); RxDocumentServiceRequest request = getTriggerRequest(collectionLink, trigger, options, OperationType.Upsert); if (retryPolicyInstance != null){ @@ -1762,10 +1762,10 @@ private Flux> replaceTriggerInternal(Trigger trigger, throw new IllegalArgumentException("trigger"); } - logger.debug("Replacing a Trigger. trigger id [{}]", trigger.id()); + logger.debug("Replacing a Trigger. trigger id [{}]", trigger.getId()); RxDocumentClientImpl.validateResource(trigger); - String path = Utils.joinPath(trigger.selfLink(), null); + String path = Utils.joinPath(trigger.getSelfLink(), null); Map requestHeaders = getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.Trigger, path, trigger, requestHeaders, options); @@ -1881,7 +1881,7 @@ private Flux> createUserDefinedFunctionInt // session) try { logger.debug("Creating a UserDefinedFunction. collectionLink [{}], udf id [{}]", collectionLink, - udf.id()); + udf.getId()); RxDocumentServiceRequest request = getUserDefinedFunctionRequest(collectionLink, udf, options, OperationType.Create); if (retryPolicyInstance != null){ @@ -1912,7 +1912,7 @@ private Flux> upsertUserDefinedFunctionInt // session) try { logger.debug("Upserting a UserDefinedFunction. collectionLink [{}], udf id [{}]", collectionLink, - udf.id()); + udf.getId()); RxDocumentServiceRequest request = getUserDefinedFunctionRequest(collectionLink, udf, options, OperationType.Upsert); if (retryPolicyInstance != null){ @@ -1946,10 +1946,10 @@ private Flux> replaceUserDefinedFunctionIn throw new IllegalArgumentException("udf"); } - logger.debug("Replacing a UserDefinedFunction. udf id [{}]", udf.id()); + logger.debug("Replacing a UserDefinedFunction. udf id [{}]", udf.getId()); validateResource(udf); - String path = Utils.joinPath(udf.selfLink(), null); + String path = Utils.joinPath(udf.getSelfLink(), null); Map requestHeaders = this.getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.UserDefinedFunction, path, udf, requestHeaders, options); @@ -2164,7 +2164,7 @@ public Flux> createUser(String databaseLink, User user, R private Flux> createUserInternal(String databaseLink, User user, RequestOptions options) { try { - logger.debug("Creating a User. databaseLink [{}], user id [{}]", databaseLink, user.id()); + logger.debug("Creating a User. databaseLink [{}], user id [{}]", databaseLink, user.getId()); RxDocumentServiceRequest request = getUserRequest(databaseLink, user, options, OperationType.Create); return this.create(request).map(response -> toResourceResponse(response, User.class)); @@ -2183,7 +2183,7 @@ public Flux> upsertUser(String databaseLink, User user, R private Flux> upsertUserInternal(String databaseLink, User user, RequestOptions options, IDocumentClientRetryPolicy retryPolicyInstance) { try { - logger.debug("Upserting a User. databaseLink [{}], user id [{}]", databaseLink, user.id()); + logger.debug("Upserting a User. databaseLink [{}], user id [{}]", databaseLink, user.getId()); RxDocumentServiceRequest request = getUserRequest(databaseLink, user, options, OperationType.Upsert); if (retryPolicyInstance != null) { retryPolicyInstance.onBeforeSendRequest(request); @@ -2227,10 +2227,10 @@ private Flux> replaceUserInternal(User user, RequestOptio if (user == null) { throw new IllegalArgumentException("user"); } - logger.debug("Replacing a User. user id [{}]", user.id()); + logger.debug("Replacing a User. user id [{}]", user.getId()); RxDocumentClientImpl.validateResource(user); - String path = Utils.joinPath(user.selfLink(), null); + String path = Utils.joinPath(user.getSelfLink(), null); Map requestHeaders = getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.User, path, user, requestHeaders, options); @@ -2336,7 +2336,7 @@ private Flux> createPermissionInternal(String userL RequestOptions options) { try { - logger.debug("Creating a Permission. userLink [{}], permission id [{}]", userLink, permission.id()); + logger.debug("Creating a Permission. userLink [{}], permission id [{}]", userLink, permission.getId()); RxDocumentServiceRequest request = getPermissionRequest(userLink, permission, options, OperationType.Create); return this.create(request).map(response -> toResourceResponse(response, Permission.class)); @@ -2358,7 +2358,7 @@ private Flux> upsertPermissionInternal(String userL RequestOptions options, IDocumentClientRetryPolicy retryPolicyInstance) { try { - logger.debug("Upserting a Permission. userLink [{}], permission id [{}]", userLink, permission.id()); + logger.debug("Upserting a Permission. userLink [{}], permission id [{}]", userLink, permission.getId()); RxDocumentServiceRequest request = getPermissionRequest(userLink, permission, options, OperationType.Upsert); if (retryPolicyInstance != null) { @@ -2403,10 +2403,10 @@ private Flux> replacePermissionInternal(Permission if (permission == null) { throw new IllegalArgumentException("permission"); } - logger.debug("Replacing a Permission. permission id [{}]", permission.id()); + logger.debug("Replacing a Permission. permission id [{}]", permission.getId()); RxDocumentClientImpl.validateResource(permission); - String path = Utils.joinPath(permission.selfLink(), null); + String path = Utils.joinPath(permission.getSelfLink(), null); Map requestHeaders = getRequestHeaders(options); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.Permission, path, permission, requestHeaders, options); @@ -2515,10 +2515,10 @@ private Flux> replaceOfferInternal(Offer offer) { if (offer == null) { throw new IllegalArgumentException("offer"); } - logger.debug("Replacing an Offer. offer id [{}]", offer.id()); + logger.debug("Replacing an Offer. offer id [{}]", offer.getId()); RxDocumentClientImpl.validateResource(offer); - String path = Utils.joinPath(offer.selfLink(), null); + String path = Utils.joinPath(offer.getSelfLink(), null); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Replace, ResourceType.Offer, path, offer, null, null); return this.replace(request).map(response -> toResourceResponse(response, Offer.class)); @@ -2681,7 +2681,7 @@ public Flux getDatabaseAccountFromEndpoint(URI endpoint) { logger.warn(message); }).map(rsp -> rsp.getResource(DatabaseAccount.class)) .doOnNext(databaseAccount -> { - this.useMultipleWriteLocations = this.connectionPolicy.usingMultipleWriteLocations() + this.useMultipleWriteLocations = this.connectionPolicy.getUsingMultipleWriteLocations() && BridgeInternal.isEnableMultipleWriteLocations(databaseAccount); }); }); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java index 8687dcceb840..2d1b513dbb38 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceRequest.java @@ -442,14 +442,14 @@ public static RxDocumentServiceRequest create(ResourceType resourceType, String queryText; switch (queryCompatibilityMode) { case SqlQuery: - if (querySpec.parameters() != null && querySpec.parameters().size() > 0) { + if (querySpec.getParameters() != null && querySpec.getParameters().size() > 0) { throw new IllegalArgumentException( String.format("Unsupported argument in query compatibility mode '{%s}'", queryCompatibilityMode.toString())); } operation = OperationType.SqlQuery; - queryText = querySpec.queryText(); + queryText = querySpec.getQueryText(); break; case Default: @@ -1021,7 +1021,7 @@ private static Map getProperties(Object options) { } else if (options instanceof FeedOptions) { return ((FeedOptions) options).properties(); } else if (options instanceof ChangeFeedOptions) { - return ((ChangeFeedOptions) options).properties(); + return ((ChangeFeedOptions) options).getProperties(); } else { return null; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java index e7d134931b99..18eaf7d79774 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxDocumentServiceResponse.java @@ -101,7 +101,7 @@ public T getResource(Class c) { throw new IllegalStateException("Failed to instantiate class object.", e); } if(PathsHelper.isPublicResource(resource)) { - BridgeInternal.setAltLink(resource, PathsHelper.generatePathForNameBased(resource, this.getOwnerFullName(),resource.id())); + BridgeInternal.setAltLink(resource, PathsHelper.generatePathForNameBased(resource, this.getOwnerFullName(),resource.getId())); } return resource; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java index d76d639d5036..ea951d56f794 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxGatewayStoreModel.java @@ -411,7 +411,7 @@ private Flux invokeAsyncInternal(RxDocumentServiceReq case Query: return this.query(request); default: - throw new IllegalStateException("Unknown operation type " + request.getOperationType()); + throw new IllegalStateException("Unknown operation setType " + request.getOperationType()); } } @@ -436,13 +436,13 @@ public Flux processMessage(RxDocumentServiceRequest r } if ((!ReplicatedResourceClientUtils.isMasterResource(request.getResourceType())) && - (dce.statusCode() == HttpConstants.StatusCodes.PRECONDITION_FAILED || - dce.statusCode() == HttpConstants.StatusCodes.CONFLICT || + (dce.getStatusCode() == HttpConstants.StatusCodes.PRECONDITION_FAILED || + dce.getStatusCode() == HttpConstants.StatusCodes.CONFLICT || ( - dce.statusCode() == HttpConstants.StatusCodes.NOTFOUND && + dce.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND && !Exceptions.isSubStatusCode(dce, HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE)))) { - this.captureSessionToken(request, dce.responseHeaders()); + this.captureSessionToken(request, dce.getResponseHeaders()); } return Flux.error(dce); @@ -498,4 +498,4 @@ private void applySessionToken(RxDocumentServiceRequest request) { headers.put(HttpConstants.HttpHeaders.SESSION_TOKEN, sessionToken); } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxStoreModel.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxStoreModel.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/RxStoreModel.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionContainer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionContainer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionContainer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java index aac7089214b5..ebb09a508dfd 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/SessionTokenHelper.java @@ -36,7 +36,7 @@ public static void setOriginalSessionToken(RxDocumentServiceRequest request, Str public static void setPartitionLocalSessionToken(RxDocumentServiceRequest request, ISessionContainer sessionContainer) throws CosmosClientException { String originalSessionToken = request.getHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); - String partitionKeyRangeId = request.requestContext.resolvedPartitionKeyRange.id(); + String partitionKeyRangeId = request.requestContext.resolvedPartitionKeyRange.getId(); if (Strings.isNullOrEmpty(partitionKeyRangeId)) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java index 698183c88b7f..e4dfaee1af9d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedure.java @@ -36,8 +36,8 @@ public StoredProcedure(String jsonString) { * @param id the name of the resource. * @return the current stored procedure */ - public StoredProcedure id(String id){ - super.id(id); + public StoredProcedure setId(String id){ + super.setId(id); return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedureResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedureResponse.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedureResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/StoredProcedureResponse.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Strings.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Strings.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Strings.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Strings.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/TestConfigurations.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/TestConfigurations.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/TestConfigurations.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/TestConfigurations.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Trigger.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Trigger.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Trigger.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Trigger.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Undefined.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Undefined.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Undefined.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Undefined.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java index bc1f77e8778a..412fc44a1e7d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/User.java @@ -31,8 +31,8 @@ public User(String jsonString) { * @param id the name of the resource. * @return the current instance of User */ - public User id(String id){ - super.id(id); + public User setId(String id){ + super.setId(id); return this; } @@ -42,7 +42,7 @@ public User id(String id){ * @return the permissions link. */ public String getPermissionsLink() { - String selfLink = this.selfLink(); + String selfLink = this.getSelfLink(); if (selfLink.endsWith("/")) { return selfLink + super.getString(Constants.Properties.PERMISSIONS_LINK); } else { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserAgentContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserAgentContainer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserAgentContainer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserAgentContainer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserDefinedFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserDefinedFunction.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserDefinedFunction.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/UserDefinedFunction.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java index 5f7d08012be4..8139279de910 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/Utils.java @@ -310,8 +310,8 @@ public static Boolean isCollectionPartitioned(DocumentCollection collection) { } return collection.getPartitionKey() != null - && collection.getPartitionKey().paths() != null - && collection.getPartitionKey().paths().size() > 0; + && collection.getPartitionKey().getPaths() != null + && collection.getPartitionKey().getPaths().size() > 0; } public static boolean isCollectionChild(ResourceType type) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/VectorSessionToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/VectorSessionToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/VectorSessionToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/VectorSessionToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/WebExceptionRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/WebExceptionRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/WebExceptionRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/WebExceptionRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncCache.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncCache.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncLazy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncLazy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncLazy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/AsyncLazy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IEqualityComparer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IEqualityComparer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IEqualityComparer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IEqualityComparer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IPartitionKeyRangeCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IPartitionKeyRangeCache.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IPartitionKeyRangeCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/IPartitionKeyRangeCache.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxClientCollectionCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxClientCollectionCache.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxClientCollectionCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxClientCollectionCache.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java index a3c707a02f80..3ba229bd85e6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxCollectionCache.java @@ -60,12 +60,12 @@ public Mono resolveCollectionAsync( return collectionInfoRes.flatMap(collection -> { // TODO: how to async log this? // logger.debug( - // "Mapped resourceName {} to resourceId {}.", + // "Mapped resourceName {} to getResourceId {}.", // request.getResourceAddress(), - // collectionInfo.resourceId()); + // collectionInfo.getResourceId()); - request.setResourceId(collection.resourceId()); - request.requestContext.resolvedCollectionRid = collection.resourceId(); + request.setResourceId(collection.getResourceId()); + request.requestContext.resolvedCollectionRid = collection.getResourceId(); return Mono.just(collection); }); @@ -91,7 +91,7 @@ public void refresh(String resourceAddress, Map properties) { resourceFullName, () -> { Mono collectionObs = this.getByNameAsync(resourceFullName, properties); - return collectionObs.doOnSuccess(collection -> this.collectionInfoByIdCache.set(collection.resourceId(), collection)); + return collectionObs.doOnSuccess(collection -> this.collectionInfoByIdCache.set(collection.getResourceId(), collection)); }); } } @@ -140,7 +140,7 @@ private Mono resolveByNameAsync( null, () -> { Mono collectionObs = this.getByNameAsync(resourceFullName, properties); - return collectionObs.doOnSuccess(collection -> this.collectionInfoByIdCache.set(collection.resourceId(), collection)); + return collectionObs.doOnSuccess(collection -> this.collectionInfoByIdCache.set(collection.getResourceId(), collection)); }); } @@ -153,7 +153,7 @@ private Mono refreshAsync(RxDocumentServiceRequest request) { if (request.requestContext.resolvedCollectionRid != null) { // Here we will issue backend call only if cache wasn't already refreshed (if whatever is there corresponds to previously resolved collection rid). DocumentCollection obsoleteValue = new DocumentCollection(); - obsoleteValue.resourceId(request.requestContext.resolvedCollectionRid); + obsoleteValue.setResourceId(request.requestContext.resolvedCollectionRid); mono = this.collectionInfoByNameCache.getAsync( resourceFullName, @@ -161,7 +161,7 @@ private Mono refreshAsync(RxDocumentServiceRequest request) { () -> { Mono collectionObs = this.getByNameAsync(resourceFullName, request.properties); return collectionObs.doOnSuccess(collection -> { - this.collectionInfoByIdCache.set(collection.resourceId(), collection); + this.collectionInfoByIdCache.set(collection.getResourceId(), collection); }); }).then(); } else { @@ -183,7 +183,7 @@ public boolean areEqual(DocumentCollection left, DocumentCollection right) { return false; } - return StringUtils.equals(left.resourceId(), right.resourceId()); + return StringUtils.equals(left.getResourceId(), right.getResourceId()); } } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java index 92d0c6f90ec6..cfa43b4ac31b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/caches/RxPartitionKeyRangeCache.java @@ -166,7 +166,7 @@ private Mono getRoutingMapForCollectionAsync( Set goneRanges = new HashSet<>(ranges.stream().flatMap(range -> CollectionUtils.emptyIfNull(range.getParents()).stream()).collect(Collectors.toSet())); routingMap = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap( - rangesTuples.stream().filter(tuple -> !goneRanges.contains(tuple.left.id())).collect(Collectors.toList()), + rangesTuples.stream().filter(tuple -> !goneRanges.contains(tuple.left.getId())).collect(Collectors.toList()), collectionRid); } else @@ -201,9 +201,9 @@ private Mono> getPartitionKeyRange(String collectionRid, if (properties != null) { feedOptions.properties(properties); } - return client.readPartitionKeyRanges(coll.selfLink(), feedOptions) - // maxConcurrent = 1 to makes it in the right order - .flatMap(p -> Flux.fromIterable(p.results()), 1).collectList(); + return client.readPartitionKeyRanges(coll.getSelfLink(), feedOptions) + // maxConcurrent = 1 to makes it in the right getOrder + .flatMap(p -> Flux.fromIterable(p.getResults()), 1).collectList(); }); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Bootstrapper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Bootstrapper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Bootstrapper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Bootstrapper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationTokenSource.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationTokenSource.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationTokenSource.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CancellationTokenSource.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java similarity index 69% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java index fb97b0cf5510..731bfd96de24 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedContextClient.java @@ -2,21 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed; -import com.azure.data.cosmos.ChangeFeedOptions; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.CosmosDatabaseResponse; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.PartitionKeyRange; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -43,7 +30,7 @@ public interface ChangeFeedContextClient { * @param feedOptions The options for processing the query results feed. * @return an {@link Flux} containing one or several feed response pages of the obtained items or an error. */ - Flux> createDocumentChangeFeedQuery(CosmosContainer collectionLink, ChangeFeedOptions feedOptions); + Flux> createDocumentChangeFeedQuery(CosmosAsyncContainer collectionLink, ChangeFeedOptions feedOptions); /** * Reads a database. @@ -52,19 +39,19 @@ public interface ChangeFeedContextClient { * @param options the {@link CosmosContainerRequestOptions} for this request; it can be set as null. * @return an {@link Mono} containing the single cosmos database response with the read database or an error. */ - Mono readDatabase(CosmosDatabase database, CosmosDatabaseRequestOptions options); + Mono readDatabase(CosmosAsyncDatabase database, CosmosDatabaseRequestOptions options); /** - * Reads a {@link CosmosContainer}. + * Reads a {@link CosmosAsyncContainer}. * * @param containerLink a reference to the container. * @param options the {@link CosmosContainerRequestOptions} for this request; it can be set as null. * @return an {@link Mono} containing the single cosmos container response with the read container or an error. */ - Mono readContainer(CosmosContainer containerLink, CosmosContainerRequestOptions options); + Mono readContainer(CosmosAsyncContainer containerLink, CosmosContainerRequestOptions options); /** - * Creates a {@link CosmosItem}. + * Creates a {@link CosmosAsyncItem}. * * @param containerLink the reference to the parent container. * @param document the document represented as a POJO or Document object. @@ -72,36 +59,36 @@ public interface ChangeFeedContextClient { * @param disableAutomaticIdGeneration the flag for disabling automatic id generation. * @return an {@link Mono} containing the single resource response with the created cosmos item or an error. */ - Mono createItem(CosmosContainer containerLink, Object document, CosmosItemRequestOptions options, - boolean disableAutomaticIdGeneration); + Mono createItem(CosmosAsyncContainer containerLink, Object document, CosmosItemRequestOptions options, + boolean disableAutomaticIdGeneration); /** - * DELETE a {@link CosmosItem}. + * DELETE a {@link CosmosAsyncItem}. * * @param itemLink the item reference. * @param options the request options. * @return an {@link Mono} containing the cosmos item resource response with the deleted item or an error. */ - Mono deleteItem(CosmosItem itemLink, CosmosItemRequestOptions options); + Mono deleteItem(CosmosAsyncItem itemLink, CosmosItemRequestOptions options); /** - * Replaces a {@link CosmosItem}. + * Replaces a {@link CosmosAsyncItem}. * * @param itemLink the item reference. * @param document the document represented as a POJO or Document object. * @param options the request options. * @return an {@link Mono} containing the cosmos item resource response with the replaced item or an error. */ - Mono replaceItem(CosmosItem itemLink, Object document, CosmosItemRequestOptions options); + Mono replaceItem(CosmosAsyncItem itemLink, Object document, CosmosItemRequestOptions options); /** - * Reads a {@link CosmosItem} + * Reads a {@link CosmosAsyncItem} * * @param itemLink the item reference. * @param options the request options. * @return an {@link Mono} containing the cosmos item resource response with the read item or an error. */ - Mono readItem(CosmosItem itemLink, CosmosItemRequestOptions options); + Mono readItem(CosmosAsyncItem itemLink, CosmosItemRequestOptions options); /** * Query for items in a document container. @@ -111,7 +98,7 @@ Mono createItem(CosmosContainer containerLink, Object docume * @param options the feed options. * @return an {@link Flux} containing one or several feed response pages of the obtained items or an error. */ - Flux> queryItems(CosmosContainer containerLink, SqlQuerySpec querySpec, FeedOptions options); + Flux> queryItems(CosmosAsyncContainer containerLink, SqlQuerySpec querySpec, FeedOptions options); /** * @return the Cosmos client's service endpoint. @@ -125,17 +112,17 @@ Mono createItem(CosmosContainer containerLink, Object docume * @param options the {@link CosmosContainerRequestOptions} for this request; it can be set as null. * @return an {@link Mono} containing the read container properties. */ - Mono readContainerSettings(CosmosContainer containerLink, CosmosContainerRequestOptions options); + Mono readContainerSettings(CosmosAsyncContainer containerLink, CosmosContainerRequestOptions options); /** * @return the Cosmos container client. */ - CosmosContainer getContainerClient(); + CosmosAsyncContainer getContainerClient(); /** * @return the Cosmos database client. */ - CosmosDatabase getDatabaseClient(); + CosmosAsyncDatabase getDatabaseClient(); /** * Closes the document client instance and cleans up the resources. diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserver.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserver.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverCloseReason.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverCloseReason.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverCloseReason.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverCloseReason.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverContext.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverContext.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ChangeFeedObserverFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CheckpointFrequency.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CheckpointFrequency.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CheckpointFrequency.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/CheckpointFrequency.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitor.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitor.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitor.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitoringRecord.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitoringRecord.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitoringRecord.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/HealthMonitoringRecord.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Lease.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Lease.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Lease.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/Lease.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseCheckpointer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseCheckpointer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseCheckpointer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseCheckpointer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseContainer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseContainer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseContainer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseManager.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseManager.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseManager.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseRenewer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseRenewer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseRenewer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseRenewer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStore.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStore.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStore.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStore.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java index 25faa43d6519..b196dc8e4ca5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManager.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed; -import com.azure.data.cosmos.CosmosContainer; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.changefeed.implementation.LeaseStoreManagerImpl; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -15,7 +15,7 @@ public interface LeaseStoreManager extends LeaseContainer, LeaseManager, LeaseStore, LeaseCheckpointer { /** - * Provides flexible way to build lease manager constructor parameters. + * Provides flexible way to buildAsyncClient lease manager constructor parameters. * For the actual creation of lease manager instance, delegates to lease manager factory. */ interface LeaseStoreManagerBuilderDefinition { @@ -23,7 +23,7 @@ interface LeaseStoreManagerBuilderDefinition { LeaseStoreManagerBuilderDefinition leasePrefix(String leasePrefix); - LeaseStoreManagerBuilderDefinition leaseCollectionLink(CosmosContainer leaseCollectionLink); + LeaseStoreManagerBuilderDefinition leaseCollectionLink(CosmosAsyncContainer leaseCollectionLink); LeaseStoreManagerBuilderDefinition requestOptionsFactory(RequestOptionsFactory requestOptionsFactory); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java similarity index 83% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java index ae8f6ca544d7..456e42489d96 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/LeaseStoreManagerSettings.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed; -import com.azure.data.cosmos.CosmosContainer; +import com.azure.data.cosmos.CosmosAsyncContainer; /** * Captures LeaseStoreManager properties. @@ -10,7 +10,7 @@ public class LeaseStoreManagerSettings { String containerNamePrefix; - CosmosContainer leaseCollectionLink; + CosmosAsyncContainer leaseCollectionLink; String hostName; @@ -23,11 +23,11 @@ public LeaseStoreManagerSettings withContainerNamePrefix(String containerNamePre return this; } - public CosmosContainer getLeaseCollectionLink() { + public CosmosAsyncContainer getLeaseCollectionLink() { return this.leaseCollectionLink; } - public LeaseStoreManagerSettings withLeaseCollectionLink(CosmosContainer collectionLink) { + public LeaseStoreManagerSettings withLeaseCollectionLink(CosmosAsyncContainer collectionLink) { this.leaseCollectionLink = collectionLink; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionCheckpointer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionCheckpointer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionCheckpointer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionCheckpointer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionController.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionController.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionController.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionController.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancingStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancingStrategy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancingStrategy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionLoadBalancingStrategy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionManager.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionManager.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionManager.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessor.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessor.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessor.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessorFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessorFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessorFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionProcessorFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisor.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisor.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisor.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisorFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisorFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisorFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSupervisorFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSynchronizer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSynchronizer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSynchronizer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/PartitionSynchronizer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java index 20894cd7ad51..7fcf643a28f5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ProcessorSettings.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed; -import com.azure.data.cosmos.CosmosContainer; +import com.azure.data.cosmos.CosmosAsyncContainer; import java.time.Duration; import java.time.OffsetDateTime; @@ -11,7 +11,7 @@ * Implementation for the partition processor properties. */ public class ProcessorSettings { - private CosmosContainer collectionSelfLink; + private CosmosAsyncContainer collectionSelfLink; private String partitionKeyRangeId; private Integer maxItemCount; private Duration feedPollDelay; @@ -19,11 +19,11 @@ public class ProcessorSettings { private OffsetDateTime startTime; // private STRING sessionToken; - public CosmosContainer getCollectionSelfLink() { + public CosmosAsyncContainer getCollectionSelfLink() { return this.collectionSelfLink; } - public ProcessorSettings withCollectionLink(CosmosContainer collectionLink) { + public ProcessorSettings withCollectionLink(CosmosAsyncContainer collectionLink) { this.collectionSelfLink = collectionLink; return this; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingPartitionWork.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingPartitionWork.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingPartitionWork.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingPartitionWork.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingWorkEstimator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingWorkEstimator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingWorkEstimator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RemainingWorkEstimator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RequestOptionsFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RequestOptionsFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RequestOptionsFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/RequestOptionsFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java index c989c823b5d0..5cb1f912d904 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLease.java @@ -193,8 +193,8 @@ public String getConcurrencyToken() { public static ServiceItemLease fromDocument(Document document) { ServiceItemLease lease = new ServiceItemLease() - .withId(document.id()) - .withEtag(document.etag()) + .withId(document.getId()) + .withEtag(document.getETag()) .withTs(document.getString(Constants.Properties.LAST_MODIFIED)) .withOwner(document.getString("Owner")) .withLeaseToken(document.getString("LeaseToken")) @@ -210,8 +210,8 @@ public static ServiceItemLease fromDocument(Document document) { public static ServiceItemLease fromDocument(CosmosItemProperties document) { ServiceItemLease lease = new ServiceItemLease() - .withId(document.id()) - .withEtag(document.etag()) + .withId(document.getId()) + .withEtag(document.getETag()) .withTs(document.getString(Constants.Properties.LAST_MODIFIED)) .withOwner(document.getString("Owner")) .withLeaseToken(document.getString("LeaseToken")) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java similarity index 65% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java index 2dfbca01ff7d..a87582279e47 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/ServiceItemLeaseUpdater.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed; -import com.azure.data.cosmos.CosmosItem; +import com.azure.data.cosmos.CosmosAsyncItem; import com.azure.data.cosmos.CosmosItemRequestOptions; import reactor.core.publisher.Mono; @@ -12,5 +12,5 @@ * Interface for service lease updater. */ public interface ServiceItemLeaseUpdater { - Mono updateLease(Lease cachedLease, CosmosItem itemLink, CosmosItemRequestOptions requestOptions, Function updateLease); + Mono updateLease(Lease cachedLease, CosmosAsyncItem itemLink, CosmosItemRequestOptions requestOptions, Function updateLease); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/LeaseLostException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/LeaseLostException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/LeaseLostException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/LeaseLostException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/ObserverException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/ObserverException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/ObserverException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/ObserverException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionNotFoundException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionNotFoundException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionNotFoundException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionNotFoundException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionSplitException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionSplitException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionSplitException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/PartitionSplitException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/TaskCancelledException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/TaskCancelledException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/TaskCancelledException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/exceptions/TaskCancelledException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/AutoCheckpointer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/AutoCheckpointer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/AutoCheckpointer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/AutoCheckpointer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/BootstrapperImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/BootstrapperImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/BootstrapperImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/BootstrapperImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java similarity index 65% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java index 0f28122fa5be..2815df4e6a52 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedContextClientImpl.java @@ -2,22 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; +import com.azure.data.cosmos.*; import com.azure.data.cosmos.internal.AsyncDocumentClient; -import com.azure.data.cosmos.ChangeFeedOptions; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.CosmosDatabaseResponse; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.PartitionKeyRange; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; import org.slf4j.Logger; @@ -38,14 +25,14 @@ public class ChangeFeedContextClientImpl implements ChangeFeedContextClient { private final Logger logger = LoggerFactory.getLogger(ChangeFeedContextClientImpl.class); private final AsyncDocumentClient documentClient; - private final CosmosContainer cosmosContainer; + private final CosmosAsyncContainer cosmosContainer; private Scheduler rxScheduler; /** * Initializes a new instance of the {@link ChangeFeedContextClient} interface. * @param cosmosContainer existing client. */ - public ChangeFeedContextClientImpl(CosmosContainer cosmosContainer) { + public ChangeFeedContextClientImpl(CosmosAsyncContainer cosmosContainer) { if (cosmosContainer == null) { throw new IllegalArgumentException("cosmosContainer"); } @@ -60,7 +47,7 @@ public ChangeFeedContextClientImpl(CosmosContainer cosmosContainer) { * @param cosmosContainer existing client. * @param rxScheduler the RX Java scheduler to observe on. */ - public ChangeFeedContextClientImpl(CosmosContainer cosmosContainer, Scheduler rxScheduler) { + public ChangeFeedContextClientImpl(CosmosAsyncContainer cosmosContainer, Scheduler rxScheduler) { if (cosmosContainer == null) { throw new IllegalArgumentException("cosmosContainer"); } @@ -78,25 +65,25 @@ public Flux> readPartitionKeyRangeFeed(String pa } @Override - public Flux> createDocumentChangeFeedQuery(CosmosContainer collectionLink, ChangeFeedOptions feedOptions) { + public Flux> createDocumentChangeFeedQuery(CosmosAsyncContainer collectionLink, ChangeFeedOptions feedOptions) { return collectionLink.queryChangeFeedItems(feedOptions) .publishOn(this.rxScheduler); } @Override - public Mono readDatabase(CosmosDatabase database, CosmosDatabaseRequestOptions options) { + public Mono readDatabase(CosmosAsyncDatabase database, CosmosDatabaseRequestOptions options) { return database.read() .publishOn(this.rxScheduler); } @Override - public Mono readContainer(CosmosContainer containerLink, CosmosContainerRequestOptions options) { + public Mono readContainer(CosmosAsyncContainer containerLink, CosmosContainerRequestOptions options) { return containerLink.read(options) .publishOn(this.rxScheduler); } @Override - public Mono createItem(CosmosContainer containerLink, Object document, CosmosItemRequestOptions options, boolean disableAutomaticIdGeneration) { + public Mono createItem(CosmosAsyncContainer containerLink, Object document, CosmosItemRequestOptions options, boolean disableAutomaticIdGeneration) { if (options != null) { return containerLink.createItem(document, options) .publishOn(this.rxScheduler); @@ -107,25 +94,25 @@ public Mono createItem(CosmosContainer containerLink, Object } @Override - public Mono deleteItem(CosmosItem itemLink, CosmosItemRequestOptions options) { + public Mono deleteItem(CosmosAsyncItem itemLink, CosmosItemRequestOptions options) { return itemLink.delete(options) .publishOn(this.rxScheduler); } @Override - public Mono replaceItem(CosmosItem itemLink, Object document, CosmosItemRequestOptions options) { + public Mono replaceItem(CosmosAsyncItem itemLink, Object document, CosmosItemRequestOptions options) { return itemLink.replace(document, options) .publishOn(this.rxScheduler); } @Override - public Mono readItem(CosmosItem itemLink, CosmosItemRequestOptions options) { + public Mono readItem(CosmosAsyncItem itemLink, CosmosItemRequestOptions options) { return itemLink.read(options) .publishOn(this.rxScheduler); } @Override - public Flux> queryItems(CosmosContainer containerLink, SqlQuerySpec querySpec, FeedOptions options) { + public Flux> queryItems(CosmosAsyncContainer containerLink, SqlQuerySpec querySpec, FeedOptions options) { return containerLink.queryItems(querySpec, options) .publishOn(this.rxScheduler); } @@ -136,18 +123,18 @@ public URI getServiceEndpoint() { } @Override - public Mono readContainerSettings(CosmosContainer containerLink, CosmosContainerRequestOptions options) { + public Mono readContainerSettings(CosmosAsyncContainer containerLink, CosmosContainerRequestOptions options) { return containerLink.read(options) - .map(cosmosContainerResponse -> cosmosContainerResponse.properties()); + .map(cosmosContainerResponse -> cosmosContainerResponse.getProperties()); } @Override - public CosmosContainer getContainerClient() { + public CosmosAsyncContainer getContainerClient() { return this.cosmosContainer; } @Override - public CosmosDatabase getDatabaseClient() { + public CosmosAsyncDatabase getDatabaseClient() { return this.cosmosContainer.getDatabase(); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java index d15d45a486c0..440cb3c88eb4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverContextImpl.java @@ -41,7 +41,7 @@ public ChangeFeedObserverContextImpl(String leaseToken, FeedResponse checkpoint() { - this.responseContinuation = this.feedResponse.continuationToken(); + this.responseContinuation = this.feedResponse.getContinuationToken(); return this.checkpointer.checkpointPartition(this.responseContinuation); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverFactoryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverFactoryImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverFactoryImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedObserverFactoryImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java index dfcbaddadcf1..31d4f407861c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ChangeFeedProcessorBuilderImpl.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.ChangeFeedProcessor; import com.azure.data.cosmos.ChangeFeedProcessorOptions; -import com.azure.data.cosmos.CosmosContainer; import com.azure.data.cosmos.CosmosItemProperties; import com.azure.data.cosmos.internal.changefeed.Bootstrapper; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; @@ -31,20 +31,20 @@ import java.util.function.Consumer; /** - * Helper class to build {@link ChangeFeedProcessor} instances + * Helper class to buildAsyncClient {@link ChangeFeedProcessor} instances * as logical representation of the Azure Cosmos DB database service. * *
  * {@code
  *  ChangeFeedProcessor.Builder()
- *     .hostName(hostName)
- *     .feedContainer(feedContainer)
- *     .leaseContainer(leaseContainer)
- *     .handleChanges(docs -> {
+ *     .setHostName(setHostName)
+ *     .setFeedContainer(setFeedContainer)
+ *     .setLeaseContainer(setLeaseContainer)
+ *     .setHandleChanges(docs -> {
  *         // Implementation for handling and processing CosmosItemProperties list goes here
  *      })
  *     .observer(SampleObserverImpl.class)
- *     .build();
+ *     .buildAsyncClient();
  * }
  * 
*/ @@ -114,19 +114,19 @@ public Mono stop() { * @return current Builder. */ @Override - public ChangeFeedProcessorBuilderImpl hostName(String hostName) { + public ChangeFeedProcessorBuilderImpl setHostName(String hostName) { this.hostName = hostName; return this; } /** - * Sets and existing {@link CosmosContainer} to be used to read from the monitored collection. + * Sets and existing {@link CosmosAsyncContainer} to be used to read from the monitored collection. * - * @param feedDocumentClient the instance of {@link CosmosContainer} to be used. + * @param feedDocumentClient the instance of {@link CosmosAsyncContainer} to be used. * @return current Builder. */ @Override - public ChangeFeedProcessorBuilderImpl feedContainer(CosmosContainer feedDocumentClient) { + public ChangeFeedProcessorBuilderImpl setFeedContainer(CosmosAsyncContainer feedDocumentClient) { if (feedDocumentClient == null) { throw new IllegalArgumentException("feedContextClient"); } @@ -142,7 +142,7 @@ public ChangeFeedProcessorBuilderImpl feedContainer(CosmosContainer feedDocument * @return current Builder. */ @Override - public ChangeFeedProcessorBuilderImpl options(ChangeFeedProcessorOptions changeFeedProcessorOptions) { + public ChangeFeedProcessorBuilderImpl setOptions(ChangeFeedProcessorOptions changeFeedProcessorOptions) { if (changeFeedProcessorOptions == null) { throw new IllegalArgumentException("changeFeedProcessorOptions"); } @@ -183,7 +183,7 @@ public ChangeFeedProcessorBuilderImpl observer(Class> consumer) { + public ChangeFeedProcessorBuilderImpl setHandleChanges(Consumer> consumer) { return this.observerFactory(new DefaultObserverFactory(consumer)); } @@ -209,13 +209,13 @@ public ChangeFeedProcessorBuilderImpl withCollectionResourceId(String collection } /** - * Sets an existing {@link CosmosContainer} to be used to read from the leases collection. + * Sets an existing {@link CosmosAsyncContainer} to be used to read from the leases collection. * - * @param leaseDocumentClient the instance of {@link CosmosContainer} to use. + * @param leaseDocumentClient the instance of {@link CosmosAsyncContainer} to use. * @return current Builder. */ @Override - public ChangeFeedProcessorBuilderImpl leaseContainer(CosmosContainer leaseDocumentClient) { + public ChangeFeedProcessorBuilderImpl setLeaseContainer(CosmosAsyncContainer leaseDocumentClient) { if (leaseDocumentClient == null) { throw new IllegalArgumentException("leaseContextClient"); } @@ -323,13 +323,13 @@ private Mono initializeCollectionPropertiesForBuild() { return this.feedContextClient .readDatabase(this.feedContextClient.getDatabaseClient(), null) .map( databaseResourceResponse -> { - this.databaseResourceId = databaseResourceResponse.database().id(); + this.databaseResourceId = databaseResourceResponse.getDatabase().getId(); return this.databaseResourceId; }) .flatMap( id -> this.feedContextClient .readContainer(this.feedContextClient.getContainerClient(), null) .map(documentCollectionResourceResponse -> { - this.collectionResourceId = documentCollectionResourceResponse.container().id(); + this.collectionResourceId = documentCollectionResourceResponse.getContainer().getId(); return this; })); } @@ -340,10 +340,10 @@ private Mono getLeaseStoreManager() { return this.leaseContextClient.readContainerSettings(this.leaseContextClient.getContainerClient(), null) .flatMap( collectionSettings -> { boolean isPartitioned = - collectionSettings.partitionKeyDefinition() != null && - collectionSettings.partitionKeyDefinition().paths() != null && - collectionSettings.partitionKeyDefinition().paths().size() > 0; - if (!isPartitioned || (collectionSettings.partitionKeyDefinition().paths().size() != 1 || !collectionSettings.partitionKeyDefinition().paths().get(0).equals("/id"))) { + collectionSettings.getPartitionKeyDefinition() != null && + collectionSettings.getPartitionKeyDefinition().getPaths() != null && + collectionSettings.getPartitionKeyDefinition().getPaths().size() > 0; + if (!isPartitioned || (collectionSettings.getPartitionKeyDefinition().getPaths().size() != 1 || !collectionSettings.getPartitionKeyDefinition().getPaths().get(0).equals("/id"))) { // throw new IllegalArgumentException("The lease collection, if partitioned, must have partition key equal to id."); return Mono.error(new IllegalArgumentException("The lease collection must have partition key equal to id.")); } @@ -370,7 +370,7 @@ private Mono getLeaseStoreManager() { } private String getLeasePrefix() { - String optionsPrefix = this.changeFeedProcessorOptions.leasePrefix(); + String optionsPrefix = this.changeFeedProcessorOptions.getLeasePrefix(); if (optionsPrefix == null) { optionsPrefix = ""; @@ -414,9 +414,9 @@ private Mono buildPartitionManager(LeaseStoreManager leaseStor if (this.loadBalancingStrategy == null) { this.loadBalancingStrategy = new EqualPartitionsBalancingStrategy( this.hostName, - this.changeFeedProcessorOptions.minScaleCount(), - this.changeFeedProcessorOptions.maxScaleCount(), - this.changeFeedProcessorOptions.leaseExpirationInterval()); + this.changeFeedProcessorOptions.getMinScaleCount(), + this.changeFeedProcessorOptions.getMaxScaleCount(), + this.changeFeedProcessorOptions.getLeaseExpirationInterval()); } PartitionController partitionController = new PartitionControllerImpl(leaseStoreManager, leaseStoreManager, partitionSupervisorFactory, synchronizer, scheduler); @@ -431,7 +431,7 @@ private Mono buildPartitionManager(LeaseStoreManager leaseStor partitionController2, leaseStoreManager, this.loadBalancingStrategy, - this.changeFeedProcessorOptions.leaseAcquireInterval(), + this.changeFeedProcessorOptions.getLeaseAcquireInterval(), this.scheduler ); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/CheckpointerObserverFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/CheckpointerObserverFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/CheckpointerObserverFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/CheckpointerObserverFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/Constants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/Constants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/Constants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/Constants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserver.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserver.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserverFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserverFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserverFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DefaultObserverFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java similarity index 76% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java index 8e29ae6f4112..0e78b0784dca 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseStore.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; -import com.azure.data.cosmos.AccessCondition; -import com.azure.data.cosmos.AccessConditionType; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; import com.azure.data.cosmos.internal.changefeed.LeaseStore; import com.azure.data.cosmos.internal.changefeed.RequestOptionsFactory; @@ -24,7 +18,7 @@ class DocumentServiceLeaseStore implements LeaseStore { private ChangeFeedContextClient client; private String containerNamePrefix; - private CosmosContainer leaseCollectionLink; + private CosmosAsyncContainer leaseCollectionLink; private RequestOptionsFactory requestOptionsFactory; private volatile String lockETag; @@ -32,7 +26,7 @@ class DocumentServiceLeaseStore implements LeaseStore { public DocumentServiceLeaseStore( ChangeFeedContextClient client, String containerNamePrefix, - CosmosContainer leaseCollectionLink, + CosmosAsyncContainer leaseCollectionLink, RequestOptionsFactory requestOptionsFactory) { this.client = client; @@ -46,18 +40,18 @@ public Mono isInitialized() { String markerDocId = this.getStoreMarkerName(); CosmosItemProperties doc = new CosmosItemProperties(); - doc.id(markerDocId); + doc.setId(markerDocId); CosmosItemRequestOptions requestOptions = this.requestOptionsFactory.createRequestOptions( ServiceItemLease.fromDocument(doc)); - CosmosItem docItem = this.client.getContainerClient().getItem(markerDocId, "/id"); + CosmosAsyncItem docItem = this.client.getContainerClient().getItem(markerDocId, "/id"); return this.client.readItem(docItem, requestOptions) - .flatMap(documentResourceResponse -> Mono.just(documentResourceResponse.item() != null)) + .flatMap(documentResourceResponse -> Mono.just(documentResourceResponse.getItem() != null)) .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { return Mono.just(false); } } @@ -69,14 +63,14 @@ public Mono isInitialized() { public Mono markInitialized() { String markerDocId = this.getStoreMarkerName(); CosmosItemProperties containerDocument = new CosmosItemProperties(); - containerDocument.id(markerDocId); + containerDocument.setId(markerDocId); return this.client.createItem(this.leaseCollectionLink, containerDocument, null, false) .map( item -> true) .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { return Mono.just(true); } } @@ -88,13 +82,13 @@ public Mono markInitialized() { public Mono acquireInitializationLock(Duration lockExpirationTime) { String lockId = this.getStoreLockName(); CosmosItemProperties containerDocument = new CosmosItemProperties(); - containerDocument.id(lockId); + containerDocument.setId(lockId); BridgeInternal.setProperty(containerDocument, com.azure.data.cosmos.internal.Constants.Properties.TTL, Long.valueOf(lockExpirationTime.getSeconds()).intValue()); return this.client.createItem(this.leaseCollectionLink, containerDocument, null, false) .map(documentResourceResponse -> { - if (documentResourceResponse.item() != null) { - this.lockETag = documentResourceResponse.properties().etag(); + if (documentResourceResponse.getItem() != null) { + this.lockETag = documentResourceResponse.getProperties().getETag(); return true; } else { return false; @@ -103,7 +97,7 @@ public Mono acquireInitializationLock(Duration lockExpirationTime) { .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { return Mono.just(false); } } @@ -115,7 +109,7 @@ public Mono acquireInitializationLock(Duration lockExpirationTime) { public Mono releaseInitializationLock() { String lockId = this.getStoreLockName(); CosmosItemProperties doc = new CosmosItemProperties(); - doc.id(lockId); + doc.setId(lockId); CosmosItemRequestOptions requestOptions = this.requestOptionsFactory.createRequestOptions( ServiceItemLease.fromDocument(doc)); @@ -125,14 +119,14 @@ public Mono releaseInitializationLock() { } AccessCondition accessCondition = new AccessCondition(); - accessCondition.type(AccessConditionType.IF_MATCH); - accessCondition.condition(this.lockETag); - requestOptions.accessCondition(accessCondition); + accessCondition.setType(AccessConditionType.IF_MATCH); + accessCondition.setCondition(this.lockETag); + requestOptions.setAccessCondition(accessCondition); - CosmosItem docItem = this.client.getContainerClient().getItem(lockId, "/id"); + CosmosAsyncItem docItem = this.client.getContainerClient().getItem(lockId, "/id"); return this.client.deleteItem(docItem, requestOptions) .map(documentResourceResponse -> { - if (documentResourceResponse.item() != null) { + if (documentResourceResponse.getItem() != null) { this.lockETag = null; return true; } else { @@ -142,7 +136,7 @@ public Mono releaseInitializationLock() { .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) throwable; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { return Mono.just(false); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java index e28c13cbf500..fda514eaf3d8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/DocumentServiceLeaseUpdaterImpl.java @@ -2,12 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; -import com.azure.data.cosmos.AccessCondition; -import com.azure.data.cosmos.AccessConditionType; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncItem; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; import com.azure.data.cosmos.internal.changefeed.Lease; import com.azure.data.cosmos.internal.changefeed.ServiceItemLease; @@ -42,7 +38,7 @@ public DocumentServiceLeaseUpdaterImpl(ChangeFeedContextClient client) { } @Override - public Mono updateLease(Lease cachedLease, CosmosItem itemLink, CosmosItemRequestOptions requestOptions, Function updateLease) { + public Mono updateLease(Lease cachedLease, CosmosAsyncItem itemLink, CosmosItemRequestOptions requestOptions, Function updateLease) { Lease arrayLease[] = {cachedLease}; arrayLease[0] = updateLease.apply(cachedLease); @@ -67,7 +63,7 @@ public Mono updateLease(Lease cachedLease, CosmosItem itemLink, CosmosIte .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException ex = (CosmosClientException) throwable; - if (ex.statusCode() == HTTP_STATUS_CODE_NOT_FOUND) { + if (ex.getStatusCode() == HTTP_STATUS_CODE_NOT_FOUND) { // Partition lease no longer exists throw new LeaseLostException(arrayLease[0]); } @@ -75,7 +71,7 @@ public Mono updateLease(Lease cachedLease, CosmosItem itemLink, CosmosIte return Mono.error(throwable); }) .map(cosmosItemResponse -> { - CosmosItemProperties document = cosmosItemResponse.properties(); + CosmosItemProperties document = cosmosItemResponse.getProperties(); ServiceItemLease serverLease = ServiceItemLease.fromDocument(document); logger.info( "Partition {} update failed because the lease with token '{}' was updated by host '{}' with token '{}'.", @@ -96,13 +92,13 @@ public Mono updateLease(Lease cachedLease, CosmosItem itemLink, CosmosIte }); } - private Mono tryReplaceLease(Lease lease, CosmosItem itemLink) throws LeaseLostException { + private Mono tryReplaceLease(Lease lease, CosmosAsyncItem itemLink) throws LeaseLostException { return this.client.replaceItem(itemLink, lease, this.getCreateIfMatchOptions(lease)) - .map(cosmosItemResponse -> cosmosItemResponse.properties()) + .map(cosmosItemResponse -> cosmosItemResponse.getProperties()) .onErrorResume(re -> { if (re instanceof CosmosClientException) { CosmosClientException ex = (CosmosClientException) re; - switch (ex.statusCode()) { + switch (ex.getStatusCode()) { case HTTP_STATUS_CODE_PRECONDITION_FAILED: { return Mono.empty(); } @@ -123,11 +119,11 @@ private Mono tryReplaceLease(Lease lease, CosmosItem itemL private CosmosItemRequestOptions getCreateIfMatchOptions(Lease lease) { AccessCondition ifMatchCondition = new AccessCondition(); - ifMatchCondition.type(AccessConditionType.IF_MATCH); - ifMatchCondition.condition(lease.getConcurrencyToken()); + ifMatchCondition.setType(AccessConditionType.IF_MATCH); + ifMatchCondition.setCondition(lease.getConcurrencyToken()); CosmosItemRequestOptions createIfMatchOptions = new CosmosItemRequestOptions(); - createIfMatchOptions.accessCondition(ifMatchCondition); + createIfMatchOptions.setAccessCondition(ifMatchCondition); return createIfMatchOptions; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/EqualPartitionsBalancingStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/EqualPartitionsBalancingStrategy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/EqualPartitionsBalancingStrategy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/EqualPartitionsBalancingStrategy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java similarity index 68% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java index cdf19f79d55d..bb3050f01d71 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ExceptionClassifier.java @@ -21,17 +21,17 @@ class ExceptionClassifier { public static StatusCodeErrorType classifyClientException(CosmosClientException clientException) { - Integer subStatusCode = clientException.subStatusCode(); + Integer subStatusCode = clientException.getSubStatusCode(); - if (clientException.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND && subStatusCode != SubStatusCode_ReadSessionNotAvailable) { + if (clientException.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND && subStatusCode != SubStatusCode_ReadSessionNotAvailable) { return StatusCodeErrorType.PARTITION_NOT_FOUND; } - if (clientException.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_GONE && (subStatusCode == SubStatusCode_PartitionKeyRangeGone || subStatusCode == SubStatusCode_Splitting)) { + if (clientException.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_GONE && (subStatusCode == SubStatusCode_PartitionKeyRangeGone || subStatusCode == SubStatusCode_Splitting)) { return StatusCodeErrorType.PARTITION_SPLIT; } - if (clientException.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_TOO_MANY_REQUESTS || clientException.statusCode() >= ChangeFeedHelper.HTTP_STATUS_CODE_INTERNAL_SERVER_ERROR) { + if (clientException.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_TOO_MANY_REQUESTS || clientException.getStatusCode() >= ChangeFeedHelper.HTTP_STATUS_CODE_INTERNAL_SERVER_ERROR) { return StatusCodeErrorType.TRANSIENT_ERROR; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/HealthMonitoringPartitionControllerDecorator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/HealthMonitoringPartitionControllerDecorator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/HealthMonitoringPartitionControllerDecorator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/HealthMonitoringPartitionControllerDecorator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseRenewerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseRenewerImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseRenewerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseRenewerImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java index 593860803120..5208862325ef 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/LeaseStoreManagerImpl.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; +import com.azure.data.cosmos.CosmosAsyncContainer; +import com.azure.data.cosmos.CosmosAsyncItem; import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItem; import com.azure.data.cosmos.CosmosItemProperties; import com.azure.data.cosmos.FeedResponse; import com.azure.data.cosmos.SqlParameter; @@ -27,7 +27,7 @@ import java.time.Duration; /** - * Provides flexible way to build lease manager constructor parameters. + * Provides flexible way to buildAsyncClient lease manager constructor parameters. * For the actual creation of lease manager instance, delegates to lease manager factory. */ public class LeaseStoreManagerImpl implements LeaseStoreManager, LeaseStoreManager.LeaseStoreManagerBuilderDefinition { @@ -70,7 +70,7 @@ public LeaseStoreManagerBuilderDefinition leasePrefix(String leasePrefix) { } @Override - public LeaseStoreManagerBuilderDefinition leaseCollectionLink(CosmosContainer leaseCollectionLink) { + public LeaseStoreManagerBuilderDefinition leaseCollectionLink(CosmosAsyncContainer leaseCollectionLink) { if (leaseCollectionLink == null) { throw new IllegalArgumentException("leaseCollectionLink"); } @@ -174,7 +174,7 @@ public Mono createLeaseIfNotExist(String leaseToken, String continuationT .onErrorResume( ex -> { if (ex instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) ex; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_CONFLICT) { logger.info("Some other host created lease for {}.", leaseToken); return Mono.empty(); } @@ -187,13 +187,13 @@ public Mono createLeaseIfNotExist(String leaseToken, String continuationT return null; } - CosmosItemProperties document = documentResourceResponse.properties(); + CosmosItemProperties document = documentResourceResponse.getProperties(); logger.info("Created lease for partition {}.", leaseToken); return documentServiceLease - .withId(document.id()) - .withEtag(document.etag()) + .withId(document.getId()) + .withEtag(document.getETag()) .withTs(document.getString(Constants.Properties.LAST_MODIFIED)); }); } @@ -204,14 +204,14 @@ public Mono delete(Lease lease) { throw new IllegalArgumentException("lease"); } - CosmosItem itemForLease = this.createItemForLease(lease.getId()); + CosmosAsyncItem itemForLease = this.createItemForLease(lease.getId()); return this.leaseDocumentClient .deleteItem(itemForLease, this.requestOptionsFactory.createRequestOptions(lease)) .onErrorResume( ex -> { if (ex instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) ex; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { // Ignore - document was already deleted. return Mono.empty(); } @@ -254,13 +254,13 @@ public Mono release(Lease lease) { throw new IllegalArgumentException("lease"); } - CosmosItem itemForLease = this.createItemForLease(lease.getId()); + CosmosAsyncItem itemForLease = this.createItemForLease(lease.getId()); return this.leaseDocumentClient.readItem(itemForLease, this.requestOptionsFactory.createRequestOptions(lease)) .onErrorResume( ex -> { if (ex instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) ex; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { logger.info("Partition {} failed to renew lease. The lease is gone already.", lease.getLeaseToken()); throw new LeaseLostException(lease); } @@ -268,7 +268,7 @@ public Mono release(Lease lease) { return Mono.error(ex); }) - .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.properties())) + .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.getProperties())) .flatMap( refreshedLease -> this.leaseUpdater.updateLease( refreshedLease, this.createItemForLease(refreshedLease.getId()), @@ -297,13 +297,13 @@ public Mono renew(Lease lease) { // Get fresh lease. The assumption here is that check-pointing is done with higher frequency than lease renewal so almost // certainly the lease was updated in between. - CosmosItem itemForLease = this.createItemForLease(lease.getId()); + CosmosAsyncItem itemForLease = this.createItemForLease(lease.getId()); return this.leaseDocumentClient.readItem(itemForLease, this.requestOptionsFactory.createRequestOptions(lease)) .onErrorResume( ex -> { if (ex instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) ex; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { logger.info("Partition {} failed to renew lease. The lease is gone already.", lease.getLeaseToken()); throw new LeaseLostException(lease); } @@ -311,7 +311,7 @@ public Mono renew(Lease lease) { return Mono.error(ex); }) - .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.properties())) + .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.getProperties())) .flatMap( refreshedLease -> this.leaseUpdater.updateLease( refreshedLease, this.createItemForLease(refreshedLease.getId()), @@ -363,10 +363,10 @@ public Mono checkpoint(Lease lease, String continuationToken) { throw new IllegalArgumentException("continuationToken must be a non-empty string"); } - CosmosItem itemForLease = this.createItemForLease(lease.getId()); + CosmosAsyncItem itemForLease = this.createItemForLease(lease.getId()); return this.leaseDocumentClient.readItem(itemForLease, this.requestOptionsFactory.createRequestOptions(lease)) - .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.properties())) + .map( documentResourceResponse -> ServiceItemLease.fromDocument(documentResourceResponse.getProperties())) .flatMap( refreshedLease -> this.leaseUpdater.updateLease( refreshedLease, this.createItemForLease(lease.getId()), @@ -403,13 +403,13 @@ public Mono releaseInitializationLock() { } private Mono tryGetLease(Lease lease) { - CosmosItem itemForLease = this.createItemForLease(lease.getId()); + CosmosAsyncItem itemForLease = this.createItemForLease(lease.getId()); return this.leaseDocumentClient.readItem(itemForLease, this.requestOptionsFactory.createRequestOptions(lease)) .onErrorResume( ex -> { if (ex instanceof CosmosClientException) { CosmosClientException e = (CosmosClientException) ex; - if (e.statusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { + if (e.getStatusCode() == ChangeFeedHelper.HTTP_STATUS_CODE_NOT_FOUND) { return Mono.empty(); } } @@ -418,7 +418,7 @@ private Mono tryGetLease(Lease lease) { }) .map( documentResourceResponse -> { if (documentResourceResponse == null) return null; - return ServiceItemLease.fromDocument(documentResourceResponse.properties()); + return ServiceItemLease.fromDocument(documentResourceResponse.getProperties()); }); } @@ -428,8 +428,8 @@ private Flux listDocuments(String prefix) { } SqlParameter param = new SqlParameter(); - param.name("@PartitionLeasePrefix"); - param.value(prefix); + param.setName("@PartitionLeasePrefix"); + param.setValue(prefix); SqlQuerySpec querySpec = new SqlQuerySpec( "SELECT * FROM c WHERE STARTSWITH(c.id, @PartitionLeasePrefix)", new SqlParameterList(param)); @@ -439,7 +439,7 @@ private Flux listDocuments(String prefix) { querySpec, this.requestOptionsFactory.createFeedOptions()); - return query.flatMap( documentFeedResponse -> Flux.fromIterable(documentFeedResponse.results())) + return query.flatMap( documentFeedResponse -> Flux.fromIterable(documentFeedResponse.getResults())) .map(ServiceItemLease::fromDocument); } @@ -452,7 +452,7 @@ private String getPartitionLeasePrefix() { return this.settings.getContainerNamePrefix() + LEASE_STORE_MANAGER_LEASE_SUFFIX; } - private CosmosItem createItemForLease(String leaseId) { + private CosmosAsyncItem createItemForLease(String leaseId) { return this.leaseDocumentClient.getContainerClient().getItem(leaseId, "/id"); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ObserverExceptionWrappingChangeFeedObserverDecorator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ObserverExceptionWrappingChangeFeedObserverDecorator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ObserverExceptionWrappingChangeFeedObserverDecorator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/ObserverExceptionWrappingChangeFeedObserverDecorator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionCheckpointerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionCheckpointerImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionCheckpointerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionCheckpointerImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionControllerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionControllerImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionControllerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionControllerImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionLoadBalancerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionLoadBalancerImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionLoadBalancerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionLoadBalancerImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionManagerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionManagerImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionManagerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionManagerImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java index e508129d91f8..227dd127b905 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorFactoryImpl.java @@ -3,7 +3,7 @@ package com.azure.data.cosmos.internal.changefeed.implementation; import com.azure.data.cosmos.ChangeFeedProcessorOptions; -import com.azure.data.cosmos.CosmosContainer; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; import com.azure.data.cosmos.internal.changefeed.ChangeFeedObserver; import com.azure.data.cosmos.internal.changefeed.Lease; @@ -20,13 +20,13 @@ class PartitionProcessorFactoryImpl implements PartitionProcessorFactory { private final ChangeFeedContextClient documentClient; private final ChangeFeedProcessorOptions changeFeedProcessorOptions; private final LeaseCheckpointer leaseCheckpointer; - private final CosmosContainer collectionSelfLink; + private final CosmosAsyncContainer collectionSelfLink; public PartitionProcessorFactoryImpl( ChangeFeedContextClient documentClient, ChangeFeedProcessorOptions changeFeedProcessorOptions, LeaseCheckpointer leaseCheckpointer, - CosmosContainer collectionSelfLink) { + CosmosAsyncContainer collectionSelfLink) { if (documentClient == null) { throw new IllegalArgumentException("documentClient"); @@ -63,17 +63,17 @@ public PartitionProcessor create(Lease lease, ChangeFeedObserver observer) { String startContinuation = lease.getContinuationToken(); if (startContinuation == null || startContinuation.isEmpty()) { - startContinuation = this.changeFeedProcessorOptions.startContinuation(); + startContinuation = this.changeFeedProcessorOptions.getStartContinuation(); } ProcessorSettings settings = new ProcessorSettings() .withCollectionLink(this.collectionSelfLink) .withStartContinuation(startContinuation) .withPartitionKeyRangeId(lease.getLeaseToken()) - .withFeedPollDelay(this.changeFeedProcessorOptions.feedPollDelay()) - .withMaxItemCount(this.changeFeedProcessorOptions.maxItemCount()) - .withStartFromBeginning(this.changeFeedProcessorOptions.startFromBeginning()) - .withStartTime(this.changeFeedProcessorOptions.startTime()); // .sessionToken(this.changeFeedProcessorOptions.sessionToken()); + .withFeedPollDelay(this.changeFeedProcessorOptions.getFeedPollDelay()) + .withMaxItemCount(this.changeFeedProcessorOptions.getMaxItemCount()) + .withStartFromBeginning(this.changeFeedProcessorOptions.getStartFromBeginning()) + .withStartTime(this.changeFeedProcessorOptions.getStartTime()); // .getSessionToken(this.changeFeedProcessorOptions.getSessionToken()); PartitionCheckpointer checkpointer = new PartitionCheckpointerImpl(this.leaseCheckpointer, lease); return new PartitionProcessorImpl(observer, this.documentClient, settings, checkpointer); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java index 6a2960a59e7e..257810f64215 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionProcessorImpl.java @@ -51,12 +51,12 @@ public PartitionProcessorImpl(ChangeFeedObserver observer, ChangeFeedContextClie this.checkpointer = checkpointer; this.options = new ChangeFeedOptions(); - this.options.maxItemCount(settings.getMaxItemCount()); + this.options.setMaxItemCount(settings.getMaxItemCount()); partitionKeyRangeIdInternal(this.options, settings.getPartitionKeyRangeId()); - // this.options.sessionToken(properties.sessionToken()); - this.options.startFromBeginning(settings.isStartFromBeginning()); - this.options.requestContinuation(settings.getStartContinuation()); - this.options.startDateTime(settings.getStartTime()); + // this.setOptions.getSessionToken(getProperties.getSessionToken()); + this.options.setStartFromBeginning(settings.isStartFromBeginning()); + this.options.setRequestContinuation(settings.getStartContinuation()); + this.options.setStartDateTime(settings.getStartTime()); } @Override @@ -64,7 +64,7 @@ public Mono run(CancellationToken cancellationToken) { this.lastContinuation = this.settings.getStartContinuation(); this.isFirstQueryForChangeFeeds = true; - this.options.requestContinuation(this.lastContinuation); + this.options.setRequestContinuation(this.lastContinuation); return Flux.just(this) .flatMap( value -> { @@ -92,16 +92,16 @@ public Mono run(CancellationToken cancellationToken) { .flatMap(documentFeedResponse -> { if (cancellationToken.isCancellationRequested()) return Flux.error(new TaskCancelledException()); - this.lastContinuation = documentFeedResponse.continuationToken(); - if (documentFeedResponse.results() != null && documentFeedResponse.results().size() > 0) { + this.lastContinuation = documentFeedResponse.getContinuationToken(); + if (documentFeedResponse.getResults() != null && documentFeedResponse.getResults().size() > 0) { return this.dispatchChanges(documentFeedResponse) .doFinally( (Void) -> { - this.options.requestContinuation(this.lastContinuation); + this.options.setRequestContinuation(this.lastContinuation); if (cancellationToken.isCancellationRequested()) throw new TaskCancelledException(); }).flux(); } - this.options.requestContinuation(this.lastContinuation); + this.options.setRequestContinuation(this.lastContinuation); if (cancellationToken.isCancellationRequested()) { return Flux.error(new TaskCancelledException()); @@ -110,15 +110,15 @@ public Mono run(CancellationToken cancellationToken) { return Flux.empty(); }) .doOnComplete(() -> { - if (this.options.maxItemCount().compareTo(this.settings.getMaxItemCount()) != 0) { - this.options.maxItemCount(this.settings.getMaxItemCount()); // Reset after successful execution. + if (this.options.getMaxItemCount().compareTo(this.settings.getMaxItemCount()) != 0) { + this.options.setMaxItemCount(this.settings.getMaxItemCount()); // Reset after successful execution. } }) .onErrorResume(throwable -> { if (throwable instanceof CosmosClientException) { CosmosClientException clientException = (CosmosClientException) throwable; - this.logger.warn("Exception: partition {}", this.options.partitionKey().getInternalPartitionKey(), clientException); + this.logger.warn("Exception: partition {}", this.options.getPartitionKey().getInternalPartitionKey(), clientException); StatusCodeErrorType docDbError = ExceptionClassifier.classifyClientException(clientException); switch (docDbError) { @@ -132,19 +132,19 @@ public Mono run(CancellationToken cancellationToken) { this.resultException = new RuntimeException(clientException); } case MAX_ITEM_COUNT_TOO_LARGE: { - if (this.options.maxItemCount() == null) { - this.options.maxItemCount(DefaultMaxItemCount); - } else if (this.options.maxItemCount() <= 1) { - this.logger.error("Cannot reduce maxItemCount further as it's already at {}", this.options.maxItemCount(), clientException); + if (this.options.getMaxItemCount() == null) { + this.options.setMaxItemCount(DefaultMaxItemCount); + } else if (this.options.getMaxItemCount() <= 1) { + this.logger.error("Cannot reduce getMaxItemCount further as it's already at {}", this.options.getMaxItemCount(), clientException); this.resultException = new RuntimeException(clientException); } - this.options.maxItemCount(this.options.maxItemCount() / 2); - this.logger.warn("Reducing maxItemCount, new value: {}", this.options.maxItemCount()); + this.options.setMaxItemCount(this.options.getMaxItemCount() / 2); + this.logger.warn("Reducing getMaxItemCount, new getValue: {}", this.options.getMaxItemCount()); return Flux.empty(); } default: { - this.logger.error("Unrecognized DocDbError enum value {}", docDbError, clientException); + this.logger.error("Unrecognized DocDbError enum getValue {}", docDbError, clientException); this.resultException = new RuntimeException(clientException); } } @@ -174,6 +174,6 @@ public RuntimeException getResultException() { private Mono dispatchChanges(FeedResponse response) { ChangeFeedObserverContext context = new ChangeFeedObserverContextImpl(this.settings.getPartitionKeyRangeId(), response, this.checkpointer); - return this.observer.processChanges(context, response.results()); + return this.observer.processChanges(context, response.getResults()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java index e6101e43b80d..3dc70e536361 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorFactoryImpl.java @@ -14,8 +14,6 @@ import com.azure.data.cosmos.internal.changefeed.PartitionSupervisorFactory; import reactor.core.scheduler.Scheduler; -import java.util.concurrent.ExecutorService; - /** * Implementation for the partition supervisor factory. */ @@ -65,7 +63,7 @@ public PartitionSupervisor create(Lease lease) { ChangeFeedObserver changeFeedObserver = this.observerFactory.createObserver(); PartitionProcessor processor = this.partitionProcessorFactory.create(lease, changeFeedObserver); - LeaseRenewer renewer = new LeaseRenewerImpl(lease, this.leaseManager, this.changeFeedProcessorOptions.leaseRenewInterval()); + LeaseRenewer renewer = new LeaseRenewerImpl(lease, this.leaseManager, this.changeFeedProcessorOptions.getLeaseRenewInterval()); return new PartitionSupervisorImpl(lease, changeFeedObserver, processor, renewer, this.scheduler); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSupervisorImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java index 8811f075c514..da3f9aea967e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionSynchronizerImpl.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.changefeed.implementation; -import com.azure.data.cosmos.CosmosContainer; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.FeedOptions; import com.azure.data.cosmos.internal.PartitionKeyRange; import com.azure.data.cosmos.internal.changefeed.ChangeFeedContextClient; @@ -26,7 +26,7 @@ class PartitionSynchronizerImpl implements PartitionSynchronizer { private final Logger logger = LoggerFactory.getLogger(PartitionSynchronizerImpl.class); private final ChangeFeedContextClient documentClient; - private final CosmosContainer collectionSelfLink; + private final CosmosAsyncContainer collectionSelfLink; private final LeaseContainer leaseContainer; private final LeaseManager leaseManager; private final int degreeOfParallelism; @@ -34,7 +34,7 @@ class PartitionSynchronizerImpl implements PartitionSynchronizer { public PartitionSynchronizerImpl( ChangeFeedContextClient documentClient, - CosmosContainer collectionSelfLink, + CosmosAsyncContainer collectionSelfLink, LeaseContainer leaseContainer, LeaseManager leaseManager, int degreeOfParallelism, @@ -52,8 +52,8 @@ public PartitionSynchronizerImpl( public Mono createMissingLeases() { return this.enumPartitionKeyRanges() .map(partitionKeyRange -> { - // TODO: log the partition key ID found. - return partitionKeyRange.id(); + // TODO: log the partition getKey ID found. + return partitionKeyRange.getId(); }) .collectList() .flatMap( partitionKeyRangeIds -> { @@ -80,7 +80,7 @@ public Flux splitPartition(Lease lease) { // After a split, the children are either all or none available return this.enumPartitionKeyRanges() .filter(range -> range != null && range.getParents() != null && range.getParents().contains(leaseToken)) - .map(PartitionKeyRange::id) + .map(PartitionKeyRange::getId) .collectList() .flatMapMany(addedLeaseTokens -> { if (addedLeaseTokens.size() == 0) { @@ -106,7 +106,7 @@ private Flux enumPartitionKeyRanges() { feedOptions.requestContinuation(null); return this.documentClient.readPartitionKeyRangeFeed(partitionKeyRangesPath, feedOptions) - .map(partitionKeyRangeFeedResponse -> partitionKeyRangeFeedResponse.results()) + .map(partitionKeyRangeFeedResponse -> partitionKeyRangeFeedResponse.getResults()) .flatMap(partitionKeyRangeList -> Flux.fromIterable(partitionKeyRangeList)) .onErrorResume(throwable -> { // TODO: Log the exception. diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java similarity index 78% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java index 423747a66f47..b1f749913d8b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/PartitionedByIdCollectionRequestOptionsFactory.java @@ -9,13 +9,13 @@ import com.azure.data.cosmos.internal.changefeed.RequestOptionsFactory; /** - * Used to create request options for partitioned lease collections, when partition key is defined as /id. + * Used to create request setOptions for partitioned lease collections, when partition getKey is defined as /getId. */ class PartitionedByIdCollectionRequestOptionsFactory implements RequestOptionsFactory { @Override public CosmosItemRequestOptions createRequestOptions(Lease lease) { CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); - requestOptions.partitionKey(new PartitionKey(lease.getId())); + requestOptions.setPartitionKey(new PartitionKey(lease.getId())); return requestOptions; } @@ -23,7 +23,7 @@ public CosmosItemRequestOptions createRequestOptions(Lease lease) { @Override public FeedOptions createFeedOptions() { FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); return feedOptions; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingPartitionWorkImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingPartitionWorkImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingPartitionWorkImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingPartitionWorkImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingWorkEstimatorImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingWorkEstimatorImpl.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingWorkEstimatorImpl.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/RemainingWorkEstimatorImpl.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/StatusCodeErrorType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/StatusCodeErrorType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/StatusCodeErrorType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/StatusCodeErrorType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/TraceHealthMonitor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/TraceHealthMonitor.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/TraceHealthMonitor.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/TraceHealthMonitor.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/WorkerTask.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/WorkerTask.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/WorkerTask.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/changefeed/implementation/WorkerTask.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Address.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Address.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Address.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Address.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressInformation.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressInformation.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressInformation.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressInformation.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java index d5af634a825a..bf7724f9d91b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolver.java @@ -89,13 +89,13 @@ private static boolean isSameCollection(PartitionKeyRange initiallyResolved, Par return false; } - if (Strings.areEqual(initiallyResolved.id(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID) && - Strings.areEqual(newlyResolved.id(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID)) { + if (Strings.areEqual(initiallyResolved.getId(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID) && + Strings.areEqual(newlyResolved.getId(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID)) { return true; } - if (Strings.areEqual(initiallyResolved.id(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID) - || Strings.areEqual(newlyResolved.id(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID)) { + if (Strings.areEqual(initiallyResolved.getId(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID) + || Strings.areEqual(newlyResolved.getId(), PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID)) { String message = "Request was resolved to master partition and then to server partition."; assert false : message; @@ -103,14 +103,14 @@ private static boolean isSameCollection(PartitionKeyRange initiallyResolved, Par return false; } - if (ResourceId.parse(initiallyResolved.resourceId()).getDocumentCollection() - != ResourceId.parse(newlyResolved.resourceId()).getDocumentCollection()) { + if (ResourceId.parse(initiallyResolved.getResourceId()).getDocumentCollection() + != ResourceId.parse(newlyResolved.getResourceId()).getDocumentCollection()) { return false; } - if (!Strings.areEqual(initiallyResolved.id(), newlyResolved.id()) && - !(newlyResolved.getParents() != null && newlyResolved.getParents().contains(initiallyResolved.id()))) { - // the above condition should be always false in current codebase. + if (!Strings.areEqual(initiallyResolved.getId(), newlyResolved.getId()) && + !(newlyResolved.getParents() != null && newlyResolved.getParents().contains(initiallyResolved.getId()))) { + // the above getCondition should be always false in current codebase. // We don't need to refresh any caches if we resolved to a range which is child of previously resolved range. // Quorum reads should be handled transparently as child partitions share LSNs with parent partitions which are gone. String message = @@ -172,7 +172,7 @@ private static void ensureRoutingMapPresent( if (routingMap == null) { logger.debug( "Routing map was not found although collection cache is upto date for collection {}", - collection.resourceId()); + collection.getResourceId()); // Routing map not found although collection was resolved correctly. NotFoundException e = new NotFoundException(); BridgeInternal.setResourceAddress(e, request.getResourceAddress()); @@ -235,13 +235,13 @@ private Mono tryResolveServerPartitionAsync( Mono addressesObs = this.addressCache.tryGetAddresses( request, - new PartitionKeyRangeIdentity(collection.resourceId(), range.id()), + new PartitionKeyRangeIdentity(collection.getResourceId(), range.getId()), forceRefreshPartitionAddresses); return addressesObs.flatMap(addresses -> Mono.just(new ResolutionResult(range, addresses))).switchIfEmpty(Mono.defer(() -> { logger.info( "Could not resolve addresses for identity {}/{}. Potentially collection cache or routing map cache is outdated. Return empty - upper logic will refresh and retry. ", - new PartitionKeyRangeIdentity(collection.resourceId(), range.id())); + new PartitionKeyRangeIdentity(collection.getResourceId(), range.getId())); return Mono.empty(); })); @@ -289,12 +289,12 @@ private Mono resolveMasterResourceAddress(RxDocumentServiceReq return addressesObs.flatMap(addresses -> { PartitionKeyRange partitionKeyRange = new PartitionKeyRange(); - partitionKeyRange.id(PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID); + partitionKeyRange.setId(PartitionKeyRange.MASTER_PARTITION_KEY_RANGE_ID); return Mono.just(new ResolutionResult(partitionKeyRange, addresses)); }).switchIfEmpty(Mono.defer(() -> { logger.warn("Could not get addresses for master partition"); - // return Observable.error() + // return Observable.getError() NotFoundException e = new NotFoundException(); BridgeInternal.setResourceAddress(e, request.getResourceAddress()); return Mono.error(e); @@ -323,7 +323,7 @@ private Mono getOrRefreshRoutingMap(RxDocumentServiceRequest reque Mono stateObs = collectionObs.flatMap(collection -> { state.collection = collection; Mono routingMapObs = - this.collectionRoutingMapCache.tryLookupAsync(collection.resourceId(), null, request.forceCollectionRoutingMapRefresh, request.properties); + this.collectionRoutingMapCache.tryLookupAsync(collection.getResourceId(), null, request.forceCollectionRoutingMapRefresh, request.properties); final DocumentCollection underlyingCollection = collection; return routingMapObs.flatMap(routingMap -> { state.routingMap = routingMap; @@ -332,7 +332,7 @@ private Mono getOrRefreshRoutingMap(RxDocumentServiceRequest reque state.collectionRoutingMapCacheIsUptoDate = true; request.forcePartitionKeyRangeRefresh = false; if (routingMap != null) { - return this.collectionRoutingMapCache.tryLookupAsync(underlyingCollection.resourceId(), routingMap, request.properties) + return this.collectionRoutingMapCache.tryLookupAsync(underlyingCollection.getResourceId(), routingMap, request.properties) .map(newRoutingMap -> { state.routingMap = newRoutingMap; return state; @@ -364,7 +364,7 @@ private Mono getOrRefreshRoutingMap(RxDocumentServiceRequest reque return newCollectionObs.flatMap(collection -> { newState.collection = collection; Mono newRoutingMapObs = this.collectionRoutingMapCache.tryLookupAsync( - collection.resourceId(), + collection.getResourceId(), null, request.properties); @@ -437,7 +437,7 @@ private Mono resolveAddressesAndIdentityAsync( // InvalidPartitionException if we reach wrong collection. // Also this header will be used by backend to inject collection rid into metrics for // throttled requests. - request.getHeaders().put(WFConstants.BackendHeaders.COLLECTION_RID, state.collection.resourceId()); + request.getHeaders().put(WFConstants.BackendHeaders.COLLECTION_RID, state.collection.getResourceId()); } return Mono.just(funcResolutionResult); @@ -450,7 +450,7 @@ private Mono resolveAddressesAndIdentityAsync( if (!funcState.collectionRoutingMapCacheIsUptoDate) { funcState.collectionRoutingMapCacheIsUptoDate = true; Mono newRoutingMapObs = this.collectionRoutingMapCache.tryLookupAsync( - funcState.collection.resourceId(), + funcState.collection.getResourceId(), funcState.routingMap, request.properties); @@ -501,12 +501,12 @@ private Mono resolveAddressesAndIdentityAsync( Mono newRefreshStateObs = newCollectionObs.flatMap(collection -> { state.collection = collection; - if (collection.resourceId() != state.routingMap.getCollectionUniqueId()) { + if (collection.getResourceId() != state.routingMap.getCollectionUniqueId()) { // Collection cache was stale. We resolved to new Rid. routing map cache is potentially stale // for this new collection rid. Mark it as such. state.collectionRoutingMapCacheIsUptoDate = false; Mono newRoutingMap = this.collectionRoutingMapCache.tryLookupAsync( - collection.resourceId(), + collection.getResourceId(), null, request.properties); @@ -575,7 +575,7 @@ private Mono tryResolveServerPartitionByPartitionKeyRangeIdAsy Mono addressesObs = this.addressCache.tryGetAddresses( request, - new PartitionKeyRangeIdentity(collection.resourceId(), request.getPartitionKeyRangeIdentity().getPartitionKeyRangeId()), + new PartitionKeyRangeIdentity(collection.getResourceId(), request.getPartitionKeyRangeIdentity().getPartitionKeyRangeId()), forceRefreshPartitionAddresses); return addressesObs.flatMap(addresses -> Mono.just(new ResolutionResult(partitionKeyRange, addresses))).switchIfEmpty(Mono.defer(() -> { @@ -625,9 +625,9 @@ private PartitionKeyRange tryResolveServerPartitionByPartitionKey( throw new InternalServerErrorException(String.format("partition key is null '%s'", partitionKeyString)); } - if (partitionKey.equals(PartitionKeyInternal.Empty) || partitionKey.getComponents().size() == collection.getPartitionKey().paths().size()) { - // Although we can compute effective partition key here, in general case this GATEWAY can have outdated - // partition key definition cached - like if collection with same name but with RANGE partitioning is created. + if (partitionKey.equals(PartitionKeyInternal.Empty) || partitionKey.getComponents().size() == collection.getPartitionKey().getPaths().size()) { + // Although we can compute effective partition getKey here, in general case this GATEWAY can have outdated + // partition getKey definition cached - like if collection with same getName but with RANGE partitioning is created. // In this case server will not pass x-ms-documentdb-collection-rid check and will return back InvalidPartitionException. // GATEWAY will refresh its cache and retry. String effectivePartitionKey = PartitionKeyInternalHelper.getEffectivePartitionKeyString(partitionKey, collection.getPartitionKey()); @@ -638,7 +638,7 @@ private PartitionKeyRange tryResolveServerPartitionByPartitionKey( if (collectionCacheUptoDate) { BadRequestException badRequestException = BridgeInternal.setResourceAddress(new BadRequestException(RMResources.PartitionKeyMismatch), request.getResourceAddress()); - badRequestException.responseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.PARTITION_KEY_MISMATCH)); + badRequestException.getResponseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.PARTITION_KEY_MISMATCH)); throw badRequestException; } @@ -656,8 +656,8 @@ private PartitionKeyRange tryResolveServerPartitionByPartitionKey( // refresh name routing cache - this will refresh partition key definition as well, and retry. logger.debug( - "Cannot compute effective partition key. Definition has '{}' paths, values supplied has '{}' paths. Will refresh cache and retry.", - collection.getPartitionKey().paths().size(), + "Cannot compute effective partition getKey. Definition has '{}' getPaths, values supplied has '{}' getPaths. Will refresh cache and retry.", + collection.getPartitionKey().getPaths().size(), partitionKey.getComponents().size()); return null; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelector.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelector.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelector.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelector.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java index 842a463ab336..818f42e6c168 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReader.java @@ -310,7 +310,7 @@ private Mono readSessionAsync(RxDocumentServiceRequest entity, && responses.get(0).sessionToken != null && !entity.requestContext.sessionToken.isValid(responses.get(0).sessionToken)) { logger.warn("Convert to session read exception, request {} SESSION Lsn {}, responseLSN {}", entity.getResourceAddress(), entity.requestContext.sessionToken.convertToString(), responses.get(0).lsn); - notFoundException.responseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE)); + notFoundException.getResponseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE)); } return Mono.error(notFoundException); } catch (CosmosClientException e) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java index c4a38cf2abde..e788c72cd337 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriter.java @@ -171,7 +171,7 @@ Mono writePrivateAsync( } catch (CosmosClientException e) { logger.error("Error occurred while recording response", e); } - String value = ex.responseHeaders().get(HttpConstants.HttpHeaders.WRITE_REQUEST_TRIGGER_ADDRESS_REFRESH); + String value = ex.getResponseHeaders().get(HttpConstants.HttpHeaders.WRITE_REQUEST_TRIGGER_ADDRESS_REFRESH); if (!Strings.isNullOrWhiteSpace(value)) { Integer result = Integers.tryParse(value); if (result != null && result == 1) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/CustomHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/CustomHeaders.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/CustomHeaders.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/CustomHeaders.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ErrorUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ErrorUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ErrorUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ErrorUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java index e9427767cf87..9d46648d18a9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCache.java @@ -463,7 +463,7 @@ public Mono openAsync( RxDocumentServiceRequest request = RxDocumentServiceRequest.create( OperationType.Read, // collection.AltLink, - collection.resourceId(), + collection.getResourceId(), ResourceType.DocumentCollection, // AuthorizationTokenType.PrimaryMasterKey Collections.emptyMap()); @@ -475,7 +475,7 @@ public Mono openAsync( tasks.add(this.getServerAddressesViaGatewayAsync( request, - collection.resourceId(), + collection.getResourceId(), partitionKeyRangeIdentities.subList(i, endIndex). stream().map(PartitionKeyRangeIdentity::getPartitionKeyRangeId).collect(Collectors.toList()), @@ -487,12 +487,12 @@ public Mono openAsync( List> addressInfos = list.stream() .filter(addressInfo -> this.protocolScheme.equals(addressInfo.getProtocolScheme())) .collect(Collectors.groupingBy(Address::getParitionKeyRangeId)) - .values().stream().map(addresses -> toPartitionAddressAndRange(collection.resourceId(), addresses)) + .values().stream().map(addresses -> toPartitionAddressAndRange(collection.getResourceId(), addresses)) .collect(Collectors.toList()); for (Pair addressInfo : addressInfos) { this.serverPartitionAddressCache.set( - new PartitionKeyRangeIdentity(collection.resourceId(), addressInfo.getLeft().getPartitionKeyRangeId()), + new PartitionKeyRangeIdentity(collection.getResourceId(), addressInfo.getLeft().getPartitionKeyRangeId()), addressInfo.getRight()); } }).then(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java index 33397da58c6d..656f58a9f302 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReader.java @@ -101,7 +101,7 @@ private Mono getDatabaseAccountAsync(URI serviceEndpoint) { httpHeaders.set(HttpConstants.HttpHeaders.VERSION, HttpConstants.Versions.CURRENT_VERSION); UserAgentContainer userAgentContainer = new UserAgentContainer(); - String userAgentSuffix = this.connectionPolicy.userAgentSuffix(); + String userAgentSuffix = this.connectionPolicy.getUserAgentSuffix(); if (userAgentSuffix != null && userAgentSuffix.length() > 0) { userAgentContainer.setSuffix(userAgentSuffix); } @@ -133,7 +133,7 @@ public Mono initializeReaderAsync() { try { return GlobalEndpointManager.getDatabaseAccountFromAnyLocationsAsync(this.serviceEndpoint.toURL(), - new ArrayList<>(this.connectionPolicy.preferredLocations()), url -> { + new ArrayList<>(this.connectionPolicy.getPreferredLocations()), url -> { try { return getDatabaseAccountAsync(url.toURI()); } catch (URISyntaxException e) { @@ -143,7 +143,7 @@ public Mono initializeReaderAsync() { userReplicationPolicy = BridgeInternal.getReplicationPolicy(databaseAccount); systemReplicationPolicy = BridgeInternal.getSystemReplicationPolicy(databaseAccount); queryEngineConfiguration = BridgeInternal.getQueryEngineConfiuration(databaseAccount); - consistencyLevel = BridgeInternal.getConsistencyPolicy(databaseAccount).defaultConsistencyLevel(); + consistencyLevel = BridgeInternal.getConsistencyPolicy(databaseAccount).getDefaultConsistencyLevel(); initialized = true; }); } catch (MalformedURLException e) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java index 082df288f118..4c8d1e33e823 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolver.java @@ -65,8 +65,8 @@ public GlobalAddressResolver( this.routingMapProvider = routingMapProvider; this.serviceConfigReader = serviceConfigReader; - int maxBackupReadEndpoints = (connectionPolicy.enableReadRequestsFallback() == null || connectionPolicy.enableReadRequestsFallback()) ? GlobalAddressResolver.MaxBackupReadRegions : 0; - this.maxEndpoints = maxBackupReadEndpoints + 2; // for write and alternate write endpoint (during failover) + int maxBackupReadEndpoints = (connectionPolicy.getEnableReadRequestsFallback() == null || connectionPolicy.getEnableReadRequestsFallback()) ? GlobalAddressResolver.MaxBackupReadRegions : 0; + this.maxEndpoints = maxBackupReadEndpoints + 2; // for write and alternate write getEndpoint (during failover) this.addressCacheByEndpoint = new ConcurrentHashMap<>(); for (URL endpoint : endpointManager.getWriteEndpoints()) { @@ -78,11 +78,11 @@ public GlobalAddressResolver( } Mono openAsync(DocumentCollection collection) { - Mono routingMap = this.routingMapProvider.tryLookupAsync(collection.id(), null, null); + Mono routingMap = this.routingMapProvider.tryLookupAsync(collection.getId(), null, null); return routingMap.flatMap(collectionRoutingMap -> { List ranges = ((List)collectionRoutingMap.getOrderedPartitionKeyRanges()).stream().map(range -> - new PartitionKeyRangeIdentity(collection.resourceId(), range.id())).collect(Collectors.toList()); + new PartitionKeyRangeIdentity(collection.getResourceId(), range.getId())).collect(Collectors.toList()); List> tasks = new ArrayList<>(); for (EndpointCache endpointCache : this.addressCacheByEndpoint.values()) { tasks.add(endpointCache.addressCache.openAsync(collection, ranges)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicy.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicy.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicy.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java index d33d6792e55a..7b157c0bc886 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClient.java @@ -187,8 +187,8 @@ public Mono invokeStoreAsync( exception, null, physicalAddress.toString()); - serviceUnavailableException.responseHeaders().put(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE, "1"); - serviceUnavailableException.responseHeaders().put(HttpConstants.HttpHeaders.WRITE_REQUEST_TRIGGER_ADDRESS_REFRESH, "1"); + serviceUnavailableException.getResponseHeaders().put(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE, "1"); + serviceUnavailableException.getResponseHeaders().put(HttpConstants.HttpHeaders.WRITE_REQUEST_TRIGGER_ADDRESS_REFRESH, "1"); return Mono.error(serviceUnavailableException); }}) .doOnSuccess(httpClientResponse -> { @@ -669,9 +669,9 @@ private Mono processHttpResponse(String resourceAddress, HttpRequ RMResources.InvalidBackendResponse), null, physicalAddress); - exception.responseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, + exception.getResponseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, activityId); - exception.responseHeaders().put(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE, "1"); + exception.getResponseHeaders().put(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE, "1"); return Mono.error(exception); } @@ -755,7 +755,7 @@ private Mono createErrorResponseFromHttpResponse(String resourceA RMResources.ExceptionMessage, RMResources.Gone), request.uri().toString()); - exception.responseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, + exception.getResponseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, activityId); break; @@ -849,7 +849,7 @@ private Mono createErrorResponseFromHttpResponse(String resourceA response.headers(), request.uri()); - exception.responseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, + exception.getResponseHeaders().put(HttpConstants.HttpHeaders.ACTIVITY_ID, activityId); break; } @@ -937,7 +937,7 @@ private Mono createErrorResponseFromHttpResponse(String resourceA if (values == null || values.isEmpty()) { logger.warn("RequestRateTooLargeException being thrown without RetryAfter."); } else { - exception.responseHeaders().put(HttpConstants.HttpHeaders.RETRY_AFTER_IN_MILLISECONDS, values.get(0)); + exception.getResponseHeaders().put(HttpConstants.HttpHeaders.RETRY_AFTER_IN_MILLISECONDS, values.get(0)); } break; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressCache.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressCache.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressResolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressResolver.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressResolver.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IAddressResolver.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IStoreClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IStoreClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IStoreClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/IStoreClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Protocol.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Protocol.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Protocol.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/Protocol.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QueryRequestPerformanceActivity.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QueryRequestPerformanceActivity.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QueryRequestPerformanceActivity.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QueryRequestPerformanceActivity.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java index 8f182a850053..f1eb73556d0f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReader.java @@ -787,4 +787,4 @@ private enum PrimaryReadOutcome { QuorumInconclusive, // Secondary replicas are available. Must read R secondary's to deduce current quorum. QuorumMet, } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReadMode.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReadMode.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReadMode.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReadMode.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RequestHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RequestHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RequestHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RequestHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResourceOperation.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResourceOperation.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResourceOperation.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResourceOperation.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResponseUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResponseUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResponseUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ResponseUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerProperties.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerProperties.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerProperties.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerStoreModel.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerStoreModel.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServerStoreModel.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServiceConfig.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServiceConfig.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServiceConfig.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/ServiceConfig.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java index e41245c011c1..76f6a1938f33 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClient.java @@ -114,12 +114,12 @@ public Mono processMessageAsync(RxDocumentServiceRequ } private void handleUnsuccessfulStoreResponse(RxDocumentServiceRequest request, CosmosClientException exception) { - this.updateResponseHeader(request, exception.responseHeaders()); + this.updateResponseHeader(request, exception.getResponseHeaders()); if ((!ReplicatedResourceClient.isMasterResource(request.getResourceType())) && (Exceptions.isStatusCode(exception, HttpConstants.StatusCodes.PRECONDITION_FAILED) || Exceptions.isStatusCode(exception, HttpConstants.StatusCodes.CONFLICT) || (Exceptions.isStatusCode(exception, HttpConstants.StatusCodes.NOTFOUND) && !Exceptions.isSubStatusCode(exception, HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE)))) { - this.captureSessionToken(request, exception.responseHeaders()); + this.captureSessionToken(request, exception.getResponseHeaders()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClientFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClientFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClientFactory.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreClientFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java index 35f97b27fea2..d395d45653bb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreReader.java @@ -74,7 +74,7 @@ public Mono> readMultipleReplicaAsync( * @param replicaCountToRead number of replicas to read from * @param requiresValidLsn flag to indicate whether a valid lsn is required to consider a response as valid * @param useSessionToken flag to indicate whether to use session token - * @param readMode READ mode + * @param readMode READ getMode * @param checkMinLSN set minimum required session lsn * @param forceReadAll reads from all available replicas to gather result from readsToRead number of replicas * @return ReadReplicaResult which indicates the LSN and whether Quorum was Met / Not Met etc @@ -319,7 +319,7 @@ private ReadReplicaResult createReadReplicaResult(List responseResu * @param replicaCountToRead number of replicas to read from * @param requiresValidLsn flag to indicate whether a valid lsn is required to consider a response as valid * @param useSessionToken flag to indicate whether to use session token - * @param readMode READ mode + * @param readMode READ getMode * @param checkMinLSN set minimum required session lsn * @param forceReadAll will read from all available replicas to put together result from readsToRead number of replicas * @return ReadReplicaResult which indicates the LSN and whether Quorum was Met / Not Met etc @@ -633,7 +633,7 @@ private Pair, URI> readFromStoreAsync( } default: - throw new IllegalStateException(String.format("Unexpected operation type {%s}", request.getOperationType())); + throw new IllegalStateException(String.format("Unexpected operation setType {%s}", request.getOperationType())); } } @@ -699,7 +699,7 @@ StoreResult createStoreResult(StoreResponse storeResponse, } ISessionToken sessionToken = null; - // SESSION token response header is introduced from version HttpConstants.Versions.v2018_06_18 onwards. + // SESSION token response header is introduced from getVersion HttpConstants.Versions.v2018_06_18 onwards. // Previously it was only a request header if ((headerValue = storeResponse.getHeaderValue(HttpConstants.HttpHeaders.SESSION_TOKEN)) != null) { sessionToken = SessionTokenHelper.parse(headerValue); @@ -711,7 +711,7 @@ StoreResult createStoreResult(StoreResponse storeResponse, /* partitionKeyRangeId: */ storeResponse.getPartitionKeyRangeId(), /* lsn: */ lsn, /* quorumAckedLsn: */ quorumAckedLSN, - /* requestCharge: */ requestCharge, + /* getRequestCharge: */ requestCharge, /* currentReplicaSetSize: */ currentReplicaSetSize, /* currentWriteQuorum: */ currentWriteQuorum, /* isValid: */true, @@ -719,7 +719,7 @@ StoreResult createStoreResult(StoreResponse storeResponse, /* globalCommittedLSN: */ globalCommittedLSN, /* numberOfReadRegions: */ numberOfReadRegions, /* itemLSN: */ itemLSN, - /* sessionToken: */ sessionToken); + /* getSessionToken: */ sessionToken); } else { CosmosClientException cosmosClientException = Utils.as(responseException, CosmosClientException.class); if (cosmosClientException != null) { @@ -729,40 +729,40 @@ StoreResult createStoreResult(StoreResponse storeResponse, int currentWriteQuorum = -1; long globalCommittedLSN = -1; int numberOfReadRegions = -1; - String headerValue = cosmosClientException.responseHeaders().get(useLocalLSNBasedHeaders ? WFConstants.BackendHeaders.QUORUM_ACKED_LOCAL_LSN : WFConstants.BackendHeaders.QUORUM_ACKED_LSN); + String headerValue = cosmosClientException.getResponseHeaders().get(useLocalLSNBasedHeaders ? WFConstants.BackendHeaders.QUORUM_ACKED_LOCAL_LSN : WFConstants.BackendHeaders.QUORUM_ACKED_LSN); if (!Strings.isNullOrEmpty(headerValue)) { quorumAckedLSN = Long.parseLong(headerValue); } - headerValue = cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.CURRENT_REPLICA_SET_SIZE); + headerValue = cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.CURRENT_REPLICA_SET_SIZE); if (!Strings.isNullOrEmpty(headerValue)) { currentReplicaSetSize = Integer.parseInt(headerValue); } - headerValue = cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.CURRENT_WRITE_QUORUM); + headerValue = cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.CURRENT_WRITE_QUORUM); if (!Strings.isNullOrEmpty(headerValue)) { currentReplicaSetSize = Integer.parseInt(headerValue); } double requestCharge = 0; - headerValue = cosmosClientException.responseHeaders().get(HttpConstants.HttpHeaders.REQUEST_CHARGE); + headerValue = cosmosClientException.getResponseHeaders().get(HttpConstants.HttpHeaders.REQUEST_CHARGE); if (!Strings.isNullOrEmpty(headerValue)) { requestCharge = Double.parseDouble(headerValue); } - headerValue = cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.NUMBER_OF_READ_REGIONS); + headerValue = cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.NUMBER_OF_READ_REGIONS); if (!Strings.isNullOrEmpty(headerValue)) { numberOfReadRegions = Integer.parseInt(headerValue); } - headerValue = cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN); + headerValue = cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN); if (!Strings.isNullOrEmpty(headerValue)) { globalCommittedLSN = Integer.parseInt(headerValue); } long lsn = -1; if (useLocalLSNBasedHeaders) { - headerValue = cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.LOCAL_LSN); + headerValue = cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.LOCAL_LSN); if (!Strings.isNullOrEmpty(headerValue)) { lsn = Long.parseLong(headerValue); } @@ -772,9 +772,9 @@ StoreResult createStoreResult(StoreResponse storeResponse, ISessionToken sessionToken = null; - // SESSION token response header is introduced from version HttpConstants.Versions.v2018_06_18 onwards. + // SESSION token response header is introduced from getVersion HttpConstants.Versions.v2018_06_18 onwards. // Previously it was only a request header - headerValue = cosmosClientException.responseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); + headerValue = cosmosClientException.getResponseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); if (!Strings.isNullOrEmpty(headerValue)) { sessionToken = SessionTokenHelper.parse(headerValue); } @@ -785,11 +785,11 @@ StoreResult createStoreResult(StoreResponse storeResponse, /* partitionKeyRangeId: */BridgeInternal.getPartitionKeyRangeId(cosmosClientException), /* lsn: */ lsn, /* quorumAckedLsn: */ quorumAckedLSN, - /* requestCharge: */ requestCharge, + /* getRequestCharge: */ requestCharge, /* currentReplicaSetSize: */ currentReplicaSetSize, /* currentWriteQuorum: */ currentWriteQuorum, /* isValid: */!requiresValidLsn - || ((cosmosClientException.statusCode() != HttpConstants.StatusCodes.GONE || isSubStatusCode(cosmosClientException, HttpConstants.SubStatusCodes.NAME_CACHE_IS_STALE)) + || ((cosmosClientException.getStatusCode() != HttpConstants.StatusCodes.GONE || isSubStatusCode(cosmosClientException, HttpConstants.SubStatusCodes.NAME_CACHE_IS_STALE)) && lsn >= 0), // TODO: verify where exception.RequestURI is supposed to be set in .Net /* storePhysicalAddress: */ storePhysicalAddress == null ? BridgeInternal.getRequestUri(cosmosClientException) : storePhysicalAddress, @@ -805,7 +805,7 @@ StoreResult createStoreResult(StoreResponse storeResponse, /* partitionKeyRangeId: */ (String) null, /* lsn: */ -1, /* quorumAckedLsn: */ -1, - /* requestCharge: */ 0, + /* getRequestCharge: */ 0, /* currentReplicaSetSize: */ 0, /* currentWriteQuorum: */ 0, /* isValid: */ false, @@ -813,7 +813,7 @@ StoreResult createStoreResult(StoreResponse storeResponse, /* globalCommittedLSN: */-1, /* numberOfReadRegions: */ 0, /* itemLSN: */ -1, - /* sessionToken: */ null); + /* getSessionToken: */ null); } } } @@ -848,7 +848,7 @@ static void verifyCanContinueOnException(CosmosClientException ex) throws Cosmos throw ex; } - String value = ex.responseHeaders().get(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE); + String value = ex.getResponseHeaders().get(HttpConstants.HttpHeaders.REQUEST_VALIDATION_FAILURE); if (Strings.isNullOrWhiteSpace(value)) { return; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponse.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponse.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java index c478df189252..deda87bee668 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/StoreResult.java @@ -63,8 +63,8 @@ public StoreResult( this.currentReplicaSetSize = currentReplicaSetSize; this.currentWriteQuorum = currentWriteQuorum; this.isValid = isValid; - this.isGoneException = this.exception != null && this.exception.statusCode() == HttpConstants.StatusCodes.GONE; - this.isNotFoundException = this.exception != null && this.exception.statusCode() == HttpConstants.StatusCodes.NOTFOUND; + this.isGoneException = this.exception != null && this.exception.getStatusCode() == HttpConstants.StatusCodes.GONE; + this.isNotFoundException = this.exception != null && this.exception.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND; this.isInvalidPartitionException = this.exception != null && Exceptions.isNameCacheStale(this.exception); this.storePhysicalAddress = storePhysicalAddress; @@ -112,7 +112,7 @@ public StoreResponse toResponse(RequestChargeTracker requestChargeTracker) throw private static void setRequestCharge(StoreResponse response, CosmosClientException cosmosClientException, double totalRequestCharge) { if (cosmosClientException != null) { - cosmosClientException.responseHeaders().put(HttpConstants.HttpHeaders.REQUEST_CHARGE, + cosmosClientException.getResponseHeaders().put(HttpConstants.HttpHeaders.REQUEST_CHARGE, Double.toString(totalRequestCharge)); } // Set total charge as final charge for the response. @@ -137,8 +137,8 @@ public String toString() { statusCode = this.storeResponse.getStatus(); subStatusCode = this.storeResponse.getSubStatusCode(); } else if (this.exception != null) { - statusCode = this.exception.statusCode(); - subStatusCode = this.exception.subStatusCode(); + statusCode = this.exception.getStatusCode(); + subStatusCode = this.exception.getSubStatusCode(); } return "storePhysicalAddress: " + this.storePhysicalAddress + diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/TransportException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WFConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WFConstants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WFConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WFConstants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtility.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtility.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtility.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtility.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdConstants.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdConstants.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdConstants.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContext.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContext.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextDecoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextDecoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextDecoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextException.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextNegotiator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextNegotiator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextNegotiator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextNegotiator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestDecoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestDecoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestDecoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestEncoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestEncoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestEncoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdContextRequestEncoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdFramer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdFramer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdFramer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdFramer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdHealthCheckRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdHealthCheckRequest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdHealthCheckRequest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdHealthCheckRequest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestArgs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestArgs.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestArgs.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestArgs.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFrame.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFrame.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFrame.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFrame.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFramer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFramer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFramer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestFramer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestHeaders.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestHeaders.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestHeaders.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseDecoder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseDecoder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseDecoder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseStatus.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseStatus.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseStatus.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseStatus.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdUUID.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdUUID.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdUUID.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdUUID.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/BufferedHttpResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/BufferedHttpResponse.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/BufferedHttpResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/BufferedHttpResponse.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClientConfig.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClientConfig.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClientConfig.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpClientConfig.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeader.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeader.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeader.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeaders.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeaders.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpHeaders.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpRequest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpRequest.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpRequest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpResponse.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpResponse.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/HttpResponse.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/ReactorNettyClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/ReactorNettyClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/ReactorNettyClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/http/ReactorNettyClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java index 52458c3a3e83..244693f44302 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/AggregateDocumentQueryExecutionContext.java @@ -76,14 +76,14 @@ public Flux> drainAsync(int maxPageSize) { for(FeedResponse page : superList) { - if (page.results().size() == 0) { + if (page.getResults().size() == 0) { headers.put(HttpConstants.HttpHeaders.REQUEST_CHARGE, Double.toString(requestCharge)); FeedResponse frp = BridgeInternal.createFeedResponse(aggregateResults, headers); return (FeedResponse) frp; } - Document doc = ((Document)page.results().get(0)); - requestCharge += page.requestCharge(); + Document doc = ((Document)page.getResults().get(0)); + requestCharge += page.getRequestCharge(); QueryItem values = new QueryItem(doc.toJson()); this.aggregator.aggregate(values.getItem()); for(String key : BridgeInternal.queryMetricsFromFeedResponse(page).keySet()) { @@ -127,4 +127,4 @@ public IDocumentQueryExecutionComponent getComponent() { return this.component; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/CompositeContinuationToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/CompositeContinuationToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/CompositeContinuationToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/CompositeContinuationToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java index 2d24f4915e1a..b4257dc2f98f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DefaultDocumentQueryExecutionContext.java @@ -98,7 +98,7 @@ public Flux> executeAsync() { if (isClientSideContinuationToken(originalContinuation)) { // At this point we know we want back a query plan newFeedOptions.requestContinuation(null); - newFeedOptions.maxDegreeOfParallelism(Integer.MAX_VALUE); + newFeedOptions.setMaxDegreeOfParallelism(Integer.MAX_VALUE); } int maxPageSize = newFeedOptions.maxItemCount() != null ? newFeedOptions.maxItemCount() : Constants.Properties.DEFAULT_MAX_PAGE_SIZE; @@ -146,20 +146,20 @@ protected Function>> executeInter }, finalRetryPolicyInstance).flux() .map(tFeedResponse -> { this.fetchSchedulingMetrics.stop(); - this.fetchExecutionRangeAccumulator.endFetchRange(tFeedResponse.activityId(), - tFeedResponse.results().size(), + this.fetchExecutionRangeAccumulator.endFetchRange(tFeedResponse.getActivityId(), + tFeedResponse.getResults().size(), this.retries); ImmutablePair schedulingTimeSpanMap = new ImmutablePair<>(DEFAULT_PARTITION_KEY_RANGE_ID, this.fetchSchedulingMetrics.getElapsedTime()); - if (!StringUtils.isEmpty(tFeedResponse.responseHeaders().get(HttpConstants.HttpHeaders.QUERY_METRICS))) { + if (!StringUtils.isEmpty(tFeedResponse.getResponseHeaders().get(HttpConstants.HttpHeaders.QUERY_METRICS))) { QueryMetrics qm = - BridgeInternal.createQueryMetricsFromDelimitedStringAndClientSideMetrics(tFeedResponse.responseHeaders() + BridgeInternal.createQueryMetricsFromDelimitedStringAndClientSideMetrics(tFeedResponse.getResponseHeaders() .get(HttpConstants.HttpHeaders.QUERY_METRICS), new ClientSideMetrics(this.retries, - tFeedResponse.requestCharge(), + tFeedResponse.getRequestCharge(), this.fetchExecutionRangeAccumulator.getExecutionRanges(), Arrays.asList(schedulingTimeSpanMap)), - tFeedResponse.activityId()); + tFeedResponse.getActivityId()); BridgeInternal.putQueryMetricsIntoMap(tFeedResponse, DEFAULT_PARTITION_KEY_RANGE_ID, qm); } return tFeedResponse; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java index 8a43928e6b71..58d756d4f4db 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentProducer.java @@ -63,19 +63,19 @@ class DocumentProducerFeedResponse { } void populatePartitionedQueryMetrics() { - String queryMetricsDelimitedString = pageResult.responseHeaders().get(HttpConstants.HttpHeaders.QUERY_METRICS); + String queryMetricsDelimitedString = pageResult.getResponseHeaders().get(HttpConstants.HttpHeaders.QUERY_METRICS); if (!StringUtils.isEmpty(queryMetricsDelimitedString)) { - queryMetricsDelimitedString += String.format(";%s=%.2f", QueryMetricsConstants.RequestCharge, pageResult.requestCharge()); + queryMetricsDelimitedString += String.format(";%s=%.2f", QueryMetricsConstants.RequestCharge, pageResult.getRequestCharge()); ImmutablePair schedulingTimeSpanMap = - new ImmutablePair<>(targetRange.id(), fetchSchedulingMetrics.getElapsedTime()); + new ImmutablePair<>(targetRange.getId(), fetchSchedulingMetrics.getElapsedTime()); QueryMetrics qm =BridgeInternal.createQueryMetricsFromDelimitedStringAndClientSideMetrics(queryMetricsDelimitedString, new ClientSideMetrics(retries, - pageResult.requestCharge(), + pageResult.getRequestCharge(), fetchExecutionRangeAccumulator.getExecutionRanges(), Arrays.asList(schedulingTimeSpanMap) - ), pageResult.activityId()); - BridgeInternal.putQueryMetricsIntoMap(pageResult, targetRange.id(), qm); + ), pageResult.getActivityId()); + BridgeInternal.putQueryMetricsIntoMap(pageResult, targetRange.getId(), qm); } } } @@ -119,7 +119,7 @@ public DocumentProducer( this.fetchSchedulingMetrics = new SchedulingStopwatch(); this.fetchSchedulingMetrics.ready(); - this.fetchExecutionRangeAccumulator = new FetchExecutionRangeAccumulator(targetRange.id()); + this.fetchExecutionRangeAccumulator = new FetchExecutionRangeAccumulator(targetRange.getId()); this.executeRequestFuncWithRetries = request -> { retries = -1; @@ -166,9 +166,9 @@ public Flux produceAsync() { top, pageSize) .map(rsp -> { - lastResponseContinuationToken = rsp.continuationToken(); - this.fetchExecutionRangeAccumulator.endFetchRange(rsp.activityId(), - rsp.results().size(), + lastResponseContinuationToken = rsp.getContinuationToken(); + this.fetchExecutionRangeAccumulator.endFetchRange(rsp.getActivityId(), + rsp.getResults().size(), this.retries); this.fetchSchedulingMetrics.stop(); return rsp;}); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java index 982b81e2d9e0..9f8de788cc1f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextBase.java @@ -123,7 +123,7 @@ public Map createCommonHeadersAsync(FeedOptions feedOptions) { ConsistencyLevel defaultConsistencyLevel = this.client.getDefaultConsistencyLevelAsync(); ConsistencyLevel desiredConsistencyLevel = this.client.getDesiredConsistencyLevelAsync(); - if (!Strings.isNullOrEmpty(feedOptions.sessionToken()) + if (!Strings.isNullOrEmpty(feedOptions.getSessionToken()) && !ReplicatedResourceClientUtils.isReadingFromMaster(this.resourceTypeEnum, OperationType.ReadFeed)) { if (defaultConsistencyLevel == ConsistencyLevel.SESSION || (desiredConsistencyLevel == ConsistencyLevel.SESSION)) { @@ -141,7 +141,7 @@ public Map createCommonHeadersAsync(FeedOptions feedOptions) { // irrespective of the chosen replica. // For server resources, which don't span partitions, specify the session token // for correct replica to be chosen for servicing the query result. - requestHeaders.put(HttpConstants.HttpHeaders.SESSION_TOKEN, feedOptions.sessionToken()); + requestHeaders.put(HttpConstants.HttpHeaders.SESSION_TOKEN, feedOptions.getSessionToken()); } } @@ -153,24 +153,24 @@ public Map createCommonHeadersAsync(FeedOptions feedOptions) { requestHeaders.put(HttpConstants.HttpHeaders.PAGE_SIZE, Strings.toString(feedOptions.maxItemCount())); } - if (feedOptions.enableCrossPartitionQuery() != null) { + if (feedOptions.getEnableCrossPartitionQuery() != null) { requestHeaders.put(HttpConstants.HttpHeaders.ENABLE_CROSS_PARTITION_QUERY, - Strings.toString(feedOptions.enableCrossPartitionQuery())); + Strings.toString(feedOptions.getEnableCrossPartitionQuery())); } - if (feedOptions.maxDegreeOfParallelism() != 0) { + if (feedOptions.getMaxDegreeOfParallelism() != 0) { requestHeaders.put(HttpConstants.HttpHeaders.PARALLELIZE_CROSS_PARTITION_QUERY, Strings.toString(true)); } - if (this.feedOptions.enableCrossPartitionQuery() != null) { + if (this.feedOptions.getEnableCrossPartitionQuery() != null) { requestHeaders.put(HttpConstants.HttpHeaders.ENABLE_SCAN_IN_QUERY, - Strings.toString(this.feedOptions.enableCrossPartitionQuery())); + Strings.toString(this.feedOptions.getEnableCrossPartitionQuery())); } - if (this.feedOptions.responseContinuationTokenLimitInKb() > 0) { + if (this.feedOptions.setResponseContinuationTokenLimitInKb() > 0) { requestHeaders.put(HttpConstants.HttpHeaders.RESPONSE_CONTINUATION_TOKEN_LIMIT_IN_KB, - Strings.toString(feedOptions.responseContinuationTokenLimitInKb())); + Strings.toString(feedOptions.setResponseContinuationTokenLimitInKb())); } if (desiredConsistencyLevel != null) { @@ -207,7 +207,7 @@ public void populatePartitionKeyRangeInfo(RxDocumentServiceRequest request, Part } if (this.resourceTypeEnum.isPartitioned()) { - request.routeTo(new PartitionKeyRangeIdentity(collectionRid, range.id())); + request.routeTo(new PartitionKeyRangeIdentity(collectionRid, range.getId())); } } @@ -218,7 +218,7 @@ private RxDocumentServiceRequest createQueryDocumentServiceRequest(Map 0, "query.parameters", "Unsupported argument in query compatibility mode '%s'", this.client.getQueryCompatibilityMode().toString()); @@ -229,7 +229,7 @@ private RxDocumentServiceRequest createQueryDocumentServiceRequest(Map Flux collectionObs = Flux.empty(); - + if (resourceTypeEnum.isCollectionChild()) { collectionObs = resolveCollection(client, query, resourceTypeEnum, resourceLink).flux(); } @@ -108,8 +108,8 @@ public static Flux 0, "MaxItemCount", "INVALID MaxItemCount %s", initialPageSize); + BadRequestException validationError = Utils.checkRequestOrReturnException( + initialPageSize > 0 || initialPageSize == -1, "MaxItemCount", "Invalid MaxItemCount %s", initialPageSize); if (validationError != null) { return Flux.error(validationError); } @@ -144,7 +144,7 @@ public static Flux Flux> nextPage() { } private void updateState(FeedResponse response) { - continuationToken = response.continuationToken(); + continuationToken = response.getContinuationToken(); if (top != -1) { - top -= response.results().size(); + top -= response.getResults().size(); if (top < 0) { // this shouldn't happen // this means backend retrieved more items than requested diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryClient.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryClient.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryClient.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionContext.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/IDocumentQueryExecutionContext.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemComparator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemComparator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemComparator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemComparator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java index feb77f937a9b..2ad0fff7c348 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ItemTypeHelper.java @@ -29,4 +29,4 @@ public static ItemType getOrderByItemType(Object obj) { throw new IllegalArgumentException(String.format("Unexpected type: %s", obj.getClass().toString())); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByContinuationToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByContinuationToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByContinuationToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByContinuationToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentProducer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentProducer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentProducer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentProducer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java index a6ac400083c5..3af333069f1f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByDocumentQueryExecutionContext.java @@ -132,9 +132,9 @@ private void initialize( super.initialize(collectionRid, partitionKeyRangeToContinuationToken, initialPageSize, - new SqlQuerySpec(querySpec.queryText().replace(FormatPlaceHolder, + new SqlQuerySpec(querySpec.getQueryText().replace(FormatPlaceHolder, True), - querySpec.parameters())); + querySpec.getParameters())); } else { // Check to see if order by continuation token is a valid JSON. OrderByContinuationToken orderByContinuationToken; @@ -223,9 +223,9 @@ private void initializeRangeWithContinuationTokenAndFilter( super.initialize(collectionRid, partitionKeyRangeToContinuationToken, initialPageSize, - new SqlQuerySpec(querySpec.queryText().replace(FormatPlaceHolder, + new SqlQuerySpec(querySpec.getQueryText().replace(FormatPlaceHolder, filter), - querySpec.parameters())); + querySpec.getParameters())); } private ImmutablePair GetFiltersForPartitions( @@ -412,10 +412,10 @@ private static Map headerResponse( private FeedResponse> addOrderByContinuationToken( FeedResponse> page, String orderByContinuationToken) { - Map headers = new HashMap<>(page.responseHeaders()); + Map headers = new HashMap<>(page.getResponseHeaders()); headers.put(HttpConstants.HttpHeaders.CONTINUATION, orderByContinuationToken); - return BridgeInternal.createFeedResponseWithQueryMetrics(page.results(), + return BridgeInternal.createFeedResponseWithQueryMetrics(page.getResults(), headers, BridgeInternal.queryMetricsFromFeedResponse(page)); } @@ -469,7 +469,7 @@ public Flux> apply(Flux> source) { FeedResponse> next = currentNext.right; FeedResponse> page; - if (next.results().size() == 0) { + if (next.getResults().size() == 0) { // No more pages no send current page with null continuation token page = current; page = this.addOrderByContinuationToken(page, @@ -478,7 +478,7 @@ public Flux> apply(Flux> source) { // Give the first page but use the first value in the next page to generate the // continuation token page = current; - List> results = next.results(); + List> results = next.getResults(); OrderByRowResult firstElementInNextPage = results.get(0); String orderByContinuationToken = this.orderByContinuationTokenCallback .apply(firstElementInNextPage); @@ -490,12 +490,12 @@ public Flux> apply(Flux> source) { }).map(feedOfOrderByRowResults -> { // FeedResponse> to FeedResponse List unwrappedResults = new ArrayList(); - for (OrderByRowResult orderByRowResult : feedOfOrderByRowResults.results()) { + for (OrderByRowResult orderByRowResult : feedOfOrderByRowResults.getResults()) { unwrappedResults.add(orderByRowResult.getPayload()); } return BridgeInternal.createFeedResponseWithQueryMetrics(unwrappedResults, - feedOfOrderByRowResults.responseHeaders(), + feedOfOrderByRowResults.getResponseHeaders(), BridgeInternal.queryMetricsFromFeedResponse(feedOfOrderByRowResults)); }).switchIfEmpty(Flux.defer(() -> { // create an empty page if there is no result @@ -552,7 +552,7 @@ public Flux> executeAsync() { private String getContinuationToken( OrderByRowResult orderByRowResult) { // rid - String rid = orderByRowResult.resourceId(); + String rid = orderByRowResult.getResourceId(); // CompositeContinuationToken String backendContinuationToken = orderByRowResult.getSourceBackendContinuationToken(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java index e708c7399d5c..f2f1a181951d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/OrderByUtils.java @@ -76,8 +76,8 @@ public Flux> apply(Flux.DocumentProducer queryMetricsMap.put(key, BridgeInternal.queryMetricsFromFeedResponse(documentProducerFeedResponse.pageResult).get(key)); } } - List results = documentProducerFeedResponse.pageResult.results(); - OrderByContinuationToken orderByContinuationToken = targetRangeToOrderByContinuationTokenMap.get(documentProducerFeedResponse.sourcePartitionKeyRange.id()); + List results = documentProducerFeedResponse.pageResult.getResults(); + OrderByContinuationToken orderByContinuationToken = targetRangeToOrderByContinuationTokenMap.get(documentProducerFeedResponse.sourcePartitionKeyRange.getId()); if (orderByContinuationToken != null) { Pair booleanResourceIdPair = ResourceId.tryParse(orderByContinuationToken.getRid()); if (!booleanResourceIdPair.getLeft()) { @@ -117,7 +117,7 @@ public Flux> apply(Flux.DocumentProducer // If there is a tie in the sort order the documents should be in _rid order in the same direction as the first order by field. // So if it's ORDER BY c.age ASC, c.name DESC the _rids are ASC // If ti's ORDER BY c.age DESC, c.name DESC the _rids are DESC - cmp = (continuationTokenRid.getDocument() - ResourceId.tryParse(tOrderByRowResult.resourceId()).getRight().getDocument()); + cmp = (continuationTokenRid.getDocument() - ResourceId.tryParse(tOrderByRowResult.getResourceId()).getRight().getDocument()); if (sortOrders.iterator().next().equals(SortOrder.Descending)) { cmp = -cmp; @@ -131,14 +131,14 @@ public Flux> apply(Flux.DocumentProducer } - tracker.addCharge(documentProducerFeedResponse.pageResult.requestCharge()); + tracker.addCharge(documentProducerFeedResponse.pageResult.getRequestCharge()); Flux x = Flux.fromIterable(results); return x.map(r -> new OrderByRowResult( klass, r.toJson(), documentProducerFeedResponse.sourcePartitionKeyRange, - documentProducerFeedResponse.pageResult.continuationToken())); + documentProducerFeedResponse.pageResult.getContinuationToken())); }, 1); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java index 5a35e07e15a0..35162baa466b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/Paginator.java @@ -26,7 +26,7 @@ public static Flux> getPaginatedChangeFeedQ ChangeFeedOptions feedOptions, BiFunction createRequestFunc, Function>> executeFunc, Class resourceType, int maxPageSize) { - return getPaginatedQueryResultAsObservable(feedOptions.requestContinuation(), createRequestFunc, executeFunc, resourceType, + return getPaginatedQueryResultAsObservable(feedOptions.getRequestContinuation(), createRequestFunc, executeFunc, resourceType, -1, maxPageSize, true); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java index cd84e15bca88..d0340df73b65 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContext.java @@ -185,12 +185,12 @@ private DocumentProducer.DocumentProducerFeedResponse plusCharge( DocumentProducer.DocumentProducerFeedResponse documentProducerFeedResponse, double charge) { FeedResponse page = documentProducerFeedResponse.pageResult; - Map headers = new HashMap<>(page.responseHeaders()); - double pageCharge = page.requestCharge(); + Map headers = new HashMap<>(page.getResponseHeaders()); + double pageCharge = page.getRequestCharge(); pageCharge += charge; headers.put(HttpConstants.HttpHeaders.REQUEST_CHARGE, String.valueOf(pageCharge)); - FeedResponse newPage = BridgeInternal.createFeedResponseWithQueryMetrics(page.results(), + FeedResponse newPage = BridgeInternal.createFeedResponseWithQueryMetrics(page.getResults(), headers, BridgeInternal.queryMetricsFromFeedResponse(page)); documentProducerFeedResponse.pageResult = newPage; @@ -201,10 +201,10 @@ private DocumentProducer.DocumentProducerFeedResponse addCompositeContinuatio DocumentProducer.DocumentProducerFeedResponse documentProducerFeedResponse, String compositeContinuationToken) { FeedResponse page = documentProducerFeedResponse.pageResult; - Map headers = new HashMap<>(page.responseHeaders()); + Map headers = new HashMap<>(page.getResponseHeaders()); headers.put(HttpConstants.HttpHeaders.CONTINUATION, compositeContinuationToken); - FeedResponse newPage = BridgeInternal.createFeedResponseWithQueryMetrics(page.results(), + FeedResponse newPage = BridgeInternal.createFeedResponseWithQueryMetrics(page.getResults(), headers, BridgeInternal.queryMetricsFromFeedResponse(page)); documentProducerFeedResponse.pageResult = newPage; @@ -222,9 +222,9 @@ public Flux> apply(Flux.DocumentProducerFeed // Emit an empty page so the downstream observables know when there are no more // results. return source.filter(documentProducerFeedResponse -> { - if (documentProducerFeedResponse.pageResult.results().isEmpty()) { + if (documentProducerFeedResponse.pageResult.getResults().isEmpty()) { // filter empty pages and accumulate charge - tracker.addCharge(documentProducerFeedResponse.pageResult.requestCharge()); + tracker.addCharge(documentProducerFeedResponse.pageResult.getRequestCharge()); return false; } return true; @@ -253,7 +253,7 @@ public Flux> apply(Flux.DocumentProducerFeed DocumentProducer.DocumentProducerFeedResponse next = currentNext.right; String compositeContinuationToken; - String backendContinuationToken = current.pageResult.continuationToken(); + String backendContinuationToken = current.pageResult.getContinuationToken(); if (backendContinuationToken == null) { // We just finished reading the last document from a partition if (next == null) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java index e63832fb0f3b..d342f09ade96 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelDocumentQueryExecutionContextBase.java @@ -50,7 +50,7 @@ protected ParallelDocumentQueryExecutionContextBase(IDocumentQueryClient client, this.partitionKeyRanges = partitionKeyRanges; if (!Strings.isNullOrEmpty(rewrittenQuery)) { - this.querySpec = new SqlQuerySpec(rewrittenQuery, super.query.parameters()); + this.querySpec = new SqlQuerySpec(rewrittenQuery, super.query.getParameters()); } else { this.querySpec = super.query; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelQueryConfig.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelQueryConfig.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelQueryConfig.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ParallelQueryConfig.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfo.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfo.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfo.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfo.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfoInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfoInternal.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfoInternal.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PartitionedQueryExecutionInfoInternal.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PipelinedDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PipelinedDocumentQueryExecutionContext.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PipelinedDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/PipelinedDocumentQueryExecutionContext.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java index 9f9310935921..06b33b5d011a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/ProxyDocumentQueryExecutionContext.java @@ -95,14 +95,14 @@ public Flux> executeAsync() { CosmosClientException dce = (CosmosClientException) t; PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = new - PartitionedQueryExecutionInfo(dce.error().getPartitionedQueryExecutionInfo()); + PartitionedQueryExecutionInfo(dce.getError().getPartitionedQueryExecutionInfo()); logger.debug("Query Plan from gateway {}", partitionedQueryExecutionInfo); DefaultDocumentQueryExecutionContext queryExecutionContext = (DefaultDocumentQueryExecutionContext) this.innerExecutionContext; - Mono> partitionKeyRanges = queryExecutionContext.getTargetPartitionKeyRanges(collection.resourceId(), + Mono> partitionKeyRanges = queryExecutionContext.getTargetPartitionKeyRanges(collection.getResourceId(), partitionedQueryExecutionInfo.getQueryRanges()); Flux> exContext = partitionKeyRanges.flux() @@ -116,7 +116,7 @@ public Flux> executeAsync() { isContinuationExpected, partitionedQueryExecutionInfo, pkranges, - this.collection.resourceId(), + this.collection.getResourceId(), this.correlatedActivityId)); return exContext.flatMap(IDocumentQueryExecutionContext::executeAsync); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java index b610cf6630c4..5c641f6044ce 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryInfo.java @@ -68,4 +68,4 @@ public Collection getOrderByExpressions() { ? this.orderByExpressions : (this.orderByExpressions = super.getCollection("orderByExpressions", String.class)); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryItem.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryItem.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryItem.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/QueryItem.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java index 8f53f4bb0ae5..de628dda0d04 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/SortOrder.java @@ -8,4 +8,4 @@ */ public enum SortOrder { Ascending, Descending, -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TakeContinuationToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TakeContinuationToken.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TakeContinuationToken.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TakeContinuationToken.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java index 72e708d7641f..f9b9541ab6a4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TopDocumentQueryExecutionContext.java @@ -79,7 +79,7 @@ public Flux> drainAsync(int maxPageSize) { @Override public boolean test(FeedResponse frp) { - fetchedItems += frp.results().size(); + fetchedItems += frp.getResults().size(); // take until we have at least top many elements fetched return fetchedItems >= top; @@ -92,13 +92,13 @@ public boolean test(FeedResponse frp) { @Override public FeedResponse apply(FeedResponse t) { - if (collectedItems + t.results().size() <= top) { - collectedItems += t.results().size(); + if (collectedItems + t.getResults().size() <= top) { + collectedItems += t.getResults().size(); - Map headers = new HashMap<>(t.responseHeaders()); + Map headers = new HashMap<>(t.getResponseHeaders()); if (top != collectedItems) { // Add Take Continuation Token - String sourceContinuationToken = t.continuationToken(); + String sourceContinuationToken = t.getContinuationToken(); TakeContinuationToken takeContinuationToken = new TakeContinuationToken(top - collectedItems, sourceContinuationToken); headers.put(HttpConstants.HttpHeaders.CONTINUATION, takeContinuationToken.toJson()); @@ -107,7 +107,7 @@ public FeedResponse apply(FeedResponse t) { headers.put(HttpConstants.HttpHeaders.CONTINUATION, null); } - return BridgeInternal.createFeedResponseWithQueryMetrics(t.results(), headers, + return BridgeInternal.createFeedResponseWithQueryMetrics(t.getResults(), headers, BridgeInternal.queryMetricsFromFeedResponse(t)); } else { assert lastPage == false; @@ -116,10 +116,10 @@ public FeedResponse apply(FeedResponse t) { collectedItems += lastPageSize; // Null out the continuation token - Map headers = new HashMap<>(t.responseHeaders()); + Map headers = new HashMap<>(t.getResponseHeaders()); headers.put(HttpConstants.HttpHeaders.CONTINUATION, null); - return BridgeInternal.createFeedResponseWithQueryMetrics(t.results().subList(0, lastPageSize), + return BridgeInternal.createFeedResponseWithQueryMetrics(t.getResults().subList(0, lastPageSize), headers, BridgeInternal.queryMetricsFromFeedResponse(t)); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java index fc4772ad8e94..ea7d4b59e7ca 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/TriFunction.java @@ -20,4 +20,4 @@ public interface TriFunction { * @return the function result */ R apply(T t, U u, V v); -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AggregateOperator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AggregateOperator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AggregateOperator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AggregateOperator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/Aggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/Aggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/Aggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/Aggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AverageAggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AverageAggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AverageAggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/AverageAggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/CountAggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/CountAggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/CountAggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/CountAggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MaxAggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MaxAggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MaxAggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MaxAggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MinAggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MinAggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MinAggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/MinAggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/SumAggregator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/SumAggregator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/SumAggregator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/aggregation/SumAggregator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/ClientSideMetrics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/ClientSideMetrics.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/ClientSideMetrics.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/ClientSideMetrics.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRange.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRange.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRange.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRange.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRangeAccumulator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRangeAccumulator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRangeAccumulator.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/FetchExecutionRangeAccumulator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsTextWriter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsTextWriter.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsTextWriter.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsTextWriter.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsWriter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsWriter.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsWriter.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/QueryMetricsWriter.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingStopwatch.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingStopwatch.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingStopwatch.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingStopwatch.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingTimeSpan.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingTimeSpan.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingTimeSpan.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/SchedulingTimeSpan.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/TextTable.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/TextTable.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/TextTable.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/metrics/TextTable.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java index 20b232162b41..4f3c0df07ce4 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderByRowResult.java @@ -46,4 +46,4 @@ public PartitionKeyRange getSourcePartitionKeyRange() { public String getSourceBackendContinuationToken() { return this.backendContinuationToken; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderbyRowComparer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderbyRowComparer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderbyRowComparer.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/orderbyquery/OrderbyRowComparer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/BoolPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/BoolPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/BoolPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/BoolPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CaseInsensitiveHashMap.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CaseInsensitiveHashMap.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CaseInsensitiveHashMap.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CaseInsensitiveHashMap.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CollectionRoutingMap.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CollectionRoutingMap.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CollectionRoutingMap.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/CollectionRoutingMap.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IServerIdentity.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IServerIdentity.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IServerIdentity.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/IServerIdentity.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java index 05a1516a95c3..f8e1137f407e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMap.java @@ -57,7 +57,7 @@ public static InMemoryCollectionRoutingMap tryCreateCompleteRoutingMap( new HashMap<>(); for (ImmutablePair range: ranges) { - rangeById.put(range.left.id(), range); + rangeById.put(range.left.getId(), range); } List> sortedRanges = new ArrayList<>(rangeById.values()); @@ -215,11 +215,11 @@ public CollectionRoutingMap tryCombine( newGoneRanges.addAll(this.goneRanges); Map> newRangeById = - this.rangeById.values().stream().filter(tuple -> !newGoneRanges.contains(tuple.left.id())).collect(Collectors. - toMap(tuple -> tuple.left.id(), tuple -> tuple)); + this.rangeById.values().stream().filter(tuple -> !newGoneRanges.contains(tuple.left.getId())).collect(Collectors. + toMap(tuple -> tuple.left.getId(), tuple -> tuple)); - for (ImmutablePair tuple : ranges.stream().filter(tuple -> !newGoneRanges.contains(tuple.getLeft().id())).collect(Collectors.toList())) { - newRangeById.put(tuple.getLeft().id(), tuple); + for (ImmutablePair tuple : ranges.stream().filter(tuple -> !newGoneRanges.contains(tuple.getLeft().getId())).collect(Collectors.toList())) { + newRangeById.put(tuple.getLeft().getId(), tuple); } List> sortedRanges = newRangeById.values().stream().collect(Collectors.toList()); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InfinityPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InfinityPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InfinityPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/InfinityPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Int128.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Int128.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Int128.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Int128.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java index ba0596c8e5f5..bcaac3877ba7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationCache.java @@ -119,8 +119,8 @@ public void markEndpointUnavailableForWrite(URL endpoint) { */ public void onDatabaseAccountRead(DatabaseAccount databaseAccount) { this.updateLocationCache( - databaseAccount.writableLocations(), - databaseAccount.readableLocations(), + databaseAccount.getWritableLocations(), + databaseAccount.getReadableLocations(), null, BridgeInternal.isEnableMultipleWriteLocations(databaseAccount)); } @@ -138,15 +138,15 @@ void onLocationPreferenceChanged(UnmodifiableList preferredLocations) { * Once the endpoint is marked unavailable, it is moved to the end of available write endpoint. Current request will * be retried on next preferred available write endpoint. * (ii) For all other resources, always resolve to first/second (regardless of preferred locations) - * write endpoint in {@link DatabaseAccount#writableLocations()}. - * Endpoint of first write location in {@link DatabaseAccount#writableLocations()} is the only endpoint that supports + * write getEndpoint in {@link DatabaseAccount#getWritableLocations()}. + * Endpoint of first write location in {@link DatabaseAccount#getWritableLocations()} is the only getEndpoint that supports * write operation on all resource types (except during that region's failover). - * Only during manual failover, client would retry write on second write location in {@link DatabaseAccount#writableLocations()}. - * (b) Else resolve the request to first write endpoint in {@link DatabaseAccount#writableLocations()} OR - * second write endpoint in {@link DatabaseAccount#writableLocations()} in case of manual failover of that location. - * 2. Else resolve the request to most preferred available read endpoint (automatic failover for read requests) - * @param request Request for which endpoint is to be resolved - * @return Resolved endpoint + * Only during manual failover, client would retry write on second write location in {@link DatabaseAccount#getWritableLocations()}. + * (b) Else resolve the request to first write getEndpoint in {@link DatabaseAccount#getWritableLocations()} OR + * second write getEndpoint in {@link DatabaseAccount#getWritableLocations()} in case of manual failover of that location. + * 2. Else resolve the request to most preferred available read getEndpoint (getAutomatic failover for read requests) + * @param request Request for which getEndpoint is to be resolved + * @return Resolved getEndpoint */ public URL resolveServiceEndpoint(RxDocumentServiceRequest request) { if(request.requestContext != null && request.requestContext.locationEndpointToRoute != null) { @@ -440,16 +440,16 @@ private UnmodifiableMap getEndpointByLocation(Iterable parsedLocations = new ArrayList<>(); for (DatabaseAccountLocation location: locations) { - if (!Strings.isNullOrEmpty(location.name())) { + if (!Strings.isNullOrEmpty(location.getName())) { try { - URL endpoint = new URL(location.endpoint().toLowerCase()); - endpointsByLocation.put(location.name().toLowerCase(), endpoint); - parsedLocations.add(location.name()); + URL endpoint = new URL(location.getEndpoint().toLowerCase()); + endpointsByLocation.put(location.getName().toLowerCase(), endpoint); + parsedLocations.add(location.getName()); } catch (Exception e) { logger.warn("GetAvailableEndpointsByLocation() - skipping add for location = [{}] as it is location name is either empty or endpoint is malformed [{}]", - location.name(), - location.endpoint()); + location.getName(), + location.getEndpoint()); } } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/LocationHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxNumberPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxNumberPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxNumberPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxNumberPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxStringPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxStringPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxStringPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MaxStringPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinNumberPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinNumberPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinNumberPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinNumberPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinStringPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinStringPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinStringPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MinStringPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_128.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_128.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_128.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_128.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_32.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_32.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_32.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/MurmurHash3_32.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NullPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NullPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NullPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NullPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NumberPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NumberPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NumberPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/NumberPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyAndResourceTokenPair.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyAndResourceTokenPair.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyAndResourceTokenPair.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyAndResourceTokenPair.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyComponentType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyComponentType.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyComponentType.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyComponentType.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternal.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternal.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternal.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java index 3ba39702b54c..a879d5980cfb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalHelper.java @@ -132,15 +132,15 @@ public static String getEffectivePartitionKeyString(PartitionKeyInternal partiti return MaximumExclusiveEffectivePartitionKey; } - if (partitionKeyInternal.components.size() < partitionKeyDefinition.paths().size()) { + if (partitionKeyInternal.components.size() < partitionKeyDefinition.getPaths().size()) { throw new IllegalArgumentException(RMResources.TooFewPartitionKeyComponents); } - if (partitionKeyInternal.components.size() > partitionKeyDefinition.paths().size() && strict) { + if (partitionKeyInternal.components.size() > partitionKeyDefinition.getPaths().size() && strict) { throw new IllegalArgumentException(RMResources.TooManyPartitionKeyComponents); } - PartitionKind kind = partitionKeyDefinition.kind(); + PartitionKind kind = partitionKeyDefinition.getKind(); if (kind == null) { kind = PartitionKind.HASH; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyRangeIdentity.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyRangeIdentity.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyRangeIdentity.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/PartitionKeyRangeIdentity.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Range.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Range.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Range.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/Range.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProvider.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProvider.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProvider.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelper.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UInt128.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UInt128.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UInt128.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UInt128.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UndefinedPartitionKeyComponent.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UndefinedPartitionKeyComponent.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UndefinedPartitionKeyComponent.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/internal/routing/UndefinedPartitionKeyComponent.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/package-info.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/package-info.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/package-info.java rename to sdk/cosmos/azure-cosmos/src/main/java/com/azure/data/cosmos/package-info.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java index 6dde420a393d..343baff8e539 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/BridgeUtils.java @@ -35,17 +35,17 @@ public static ConflictResolutionPolicy createConflictResolutionPolicy() { } public static ConflictResolutionPolicy setMode(ConflictResolutionPolicy policy, ConflictResolutionMode mode) { - policy.mode(mode); + policy.setMode(mode); return policy; } public static ConflictResolutionPolicy setPath(ConflictResolutionPolicy policy, String path) { - policy.conflictResolutionPath(path); + policy.setConflictResolutionPath(path); return policy; } public static ConflictResolutionPolicy setStoredProc(ConflictResolutionPolicy policy, String storedProcLink) { - policy.conflictResolutionProcedure(storedProcLink); + policy.setConflictResolutionProcedure(storedProcLink); return policy; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java similarity index 51% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java index ae651447b7ef..2058135de74f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ClientUnderTestBuilder.java @@ -12,29 +12,29 @@ public class ClientUnderTestBuilder extends CosmosClientBuilder { public ClientUnderTestBuilder(CosmosClientBuilder builder) { this.configs(builder.configs()); - this.connectionPolicy(builder.connectionPolicy()); - this.consistencyLevel(builder.consistencyLevel()); - this.key(builder.key()); - this.endpoint(builder.endpoint()); - this.cosmosKeyCredential(builder.cosmosKeyCredential()); + this.setConnectionPolicy(builder.getConnectionPolicy()); + this.setConsistencyLevel(builder.getConsistencyLevel()); + this.setKey(builder.getKey()); + this.setEndpoint(builder.getEndpoint()); + this.setCosmosKeyCredential(builder.getCosmosKeyCredential()); } @Override - public CosmosClient build() { + public CosmosAsyncClient buildAsyncClient() { RxDocumentClientUnderTest rxClient; try { rxClient = new RxDocumentClientUnderTest( - new URI(this.endpoint()), - this.key(), - this.connectionPolicy(), - this.consistencyLevel(), + new URI(this.getEndpoint()), + this.getKey(), + this.getConnectionPolicy(), + this.getConsistencyLevel(), this.configs(), - this.cosmosKeyCredential()); + this.getCosmosKeyCredential()); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } - CosmosClient cosmosClient = super.build(); - ReflectionUtils.setAsyncDocumentClient(cosmosClient, rxClient); - return cosmosClient; + CosmosAsyncClient cosmosAsyncClient = super.buildAsyncClient(); + ReflectionUtils.setAsyncDocumentClient(cosmosAsyncClient, rxClient); + return cosmosAsyncClient; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java index 56cb39d2da3a..3c8099ff3921 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConflictTests.java @@ -44,9 +44,9 @@ public void getResourceType() { public void getResource() { Conflict conf = new Conflict(conflictAsString); Document doc = conf.getResource(Document.class); - assertThat(doc.id()).isEqualTo("0007312a-a1c5-4b54-9e39-35de2367fa33"); + assertThat(doc.getId()).isEqualTo("0007312a-a1c5-4b54-9e39-35de2367fa33"); assertThat(doc.getInt("regionId")).isEqualTo(2); - assertThat(doc.resourceId()).isEqualTo("k6d9ALgBmD+ChB4AAAAAAA=="); - assertThat(doc.etag()).isEqualTo("\"00000200-0000-0000-0000-5b6e214b0000\""); + assertThat(doc.getResourceId()).isEqualTo("k6d9ALgBmD+ChB4AAAAAAA=="); + assertThat(doc.getETag()).isEqualTo("\"00000200-0000-0000-0000-5b6e214b0000\""); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java index cb45aedccc22..aa4b682f46b7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ConnectionPolicyTest.java @@ -22,9 +22,9 @@ public Object[][] connectionModeArgProvider() { @Test(groups = { "unit" }, dataProvider = "connectionModeArgProvider") public void connectionMode(ConnectionMode connectionMode) { ConnectionPolicy policy = new ConnectionPolicy(); - policy.connectionMode(connectionMode); + policy.setConnectionMode(connectionMode); - assertThat(policy.connectionMode()).isEqualTo(connectionMode); + assertThat(policy.getConnectionMode()).isEqualTo(connectionMode); } @DataProvider(name = "connectionProtocolModeArgProvider") diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosAsyncClientTest.java similarity index 75% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosAsyncClientTest.java index e85587ff8e22..a812433b251c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosAsyncClientTest.java @@ -10,16 +10,16 @@ import java.lang.reflect.Method; -public abstract class CosmosClientTest implements ITest { +public abstract class CosmosAsyncClientTest implements ITest { private final CosmosClientBuilder clientBuilder; private String testName; - public CosmosClientTest() { + public CosmosAsyncClientTest() { this(new CosmosClientBuilder()); } - public CosmosClientTest(CosmosClientBuilder clientBuilder) { + public CosmosAsyncClientTest(CosmosClientBuilder clientBuilder) { this.clientBuilder = clientBuilder; } @@ -38,15 +38,15 @@ public final void setTestName(Method method) { method.getDeclaringClass().getSimpleName(), method.getName()); - if (this.clientBuilder.connectionPolicy() != null && this.clientBuilder.configs() != null) { - String connectionMode = this.clientBuilder.connectionPolicy().connectionMode() == ConnectionMode.DIRECT + if (this.clientBuilder.getConnectionPolicy() != null && this.clientBuilder.configs() != null) { + String connectionMode = this.clientBuilder.getConnectionPolicy().getConnectionMode() == ConnectionMode.DIRECT ? "Direct " + this.clientBuilder.configs().getProtocol() : "Gateway"; this.testName = Strings.lenientFormat("%s[%s with %s consistency]", testClassAndMethodName, connectionMode, - clientBuilder.consistencyLevel()); + clientBuilder.getConsistencyLevel()); } else { this.testName = testClassAndMethodName; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java similarity index 66% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java index 1f3fa5e09c88..e4a327b0edcb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosClientExceptionTest.java @@ -15,50 +15,50 @@ public class CosmosClientExceptionTest { @Test(groups = { "unit" }) public void headerNotNull1() { CosmosClientException dce = BridgeInternal.createCosmosClientException(0); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull2() { CosmosClientException dce = BridgeInternal.createCosmosClientException(0, "dummy"); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull3() { CosmosClientException dce = BridgeInternal.createCosmosClientException(0, new RuntimeException()); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull4() { CosmosClientException dce = BridgeInternal.createCosmosClientException(0, (CosmosError) null, (Map) null); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull5() { CosmosClientException dce = BridgeInternal.createCosmosClientException((String) null, 0, (CosmosError) null, (Map) null); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull6() { CosmosClientException dce = BridgeInternal.createCosmosClientException((String) null, (Exception) null, (Map) null, 0, (String) null); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).isEmpty(); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).isEmpty(); } @Test(groups = { "unit" }) public void headerNotNull7() { - ImmutableMap respHeaders = ImmutableMap.of("key", "value"); + ImmutableMap respHeaders = ImmutableMap.of("key", "getValue"); CosmosClientException dce = BridgeInternal.createCosmosClientException((String) null, (Exception) null, respHeaders, 0, (String) null); - assertThat(dce.responseHeaders()).isNotNull(); - assertThat(dce.responseHeaders()).contains(respHeaders.entrySet().iterator().next()); + assertThat(dce.getResponseHeaders()).isNotNull(); + assertThat(dce.getResponseHeaders()).contains(respHeaders.entrySet().iterator().next()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncContainerTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosContainerTest.java similarity index 70% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncContainerTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosContainerTest.java index 99db89263599..67d128cd6248 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncContainerTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosContainerTest.java @@ -4,19 +4,8 @@ * */ -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.IndexingMode; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.data.cosmos.PartitionKeyDefinition; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.internal.HttpConstants; import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; @@ -31,21 +20,21 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosSyncContainerTest extends TestSuiteBase { +public class CosmosContainerTest extends TestSuiteBase { private String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private List databases = new ArrayList<>(); - private CosmosSyncClient client; - private CosmosSyncDatabase createdDatabase; + private CosmosClient client; + private CosmosDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") - public CosmosSyncContainerTest(CosmosClientBuilder clientBuilder) { + public CosmosContainerTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @BeforeClass(groups = {"emulator"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().buildSyncClient(); + client = clientBuilder().buildClient(); createdDatabase = createSyncDatabase(client, preExistingDatabaseId); } @@ -62,7 +51,7 @@ private CosmosContainerProperties getCollectionDefinition(String collectionName) PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties( collectionName, @@ -76,7 +65,7 @@ public void createContainer_withProperties() throws Exception { String collectionName = UUID.randomUUID().toString(); CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); validateContainerResponse(containerProperties, containerResponse); } @@ -85,14 +74,14 @@ public void createContainer_alreadyExists() throws Exception { String collectionName = UUID.randomUUID().toString(); CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); validateContainerResponse(containerProperties, containerResponse); try { createdDatabase.createContainer(containerProperties); } catch (Exception e) { assertThat(e).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) e).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(((CosmosClientException) e).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } } @@ -102,7 +91,7 @@ public void createContainer_withThroughput() throws Exception { CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); int throughput = 1000; - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, throughput); validateContainerResponse(containerProperties, containerResponse); } @@ -113,7 +102,7 @@ public void createContainer_withOptions() throws Exception { CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, options); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, options); validateContainerResponse(containerProperties, containerResponse); } @@ -124,7 +113,7 @@ public void createContainer_withThroughputAndOptions() throws Exception { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); int throughput = 1000; - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties, throughput, options); validateContainerResponse(containerProperties, containerResponse); } @@ -134,7 +123,7 @@ public void createContainer_withNameAndPartitoinKeyPath() throws Exception { String collectionName = UUID.randomUUID().toString(); String partitionKeyPath = "/mypk"; - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(collectionName, partitionKeyPath); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(collectionName, partitionKeyPath); validateContainerResponse(new CosmosContainerProperties(collectionName, partitionKeyPath), containerResponse); } @@ -144,7 +133,7 @@ public void createContainer_withNamePartitionPathAndThroughput() throws Exceptio String partitionKeyPath = "/mypk"; int throughput = 1000; - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(collectionName, + CosmosContainerResponse containerResponse = createdDatabase.createContainer(collectionName, partitionKeyPath, throughput); validateContainerResponse(new CosmosContainerProperties(collectionName, partitionKeyPath), containerResponse); } @@ -155,14 +144,14 @@ public void readContainer() throws Exception { CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); - CosmosSyncContainer syncContainer = createdDatabase.getContainer(collectionName); + CosmosContainer syncContainer = createdDatabase.getContainer(collectionName); - CosmosSyncContainerResponse read = syncContainer.read(); + CosmosContainerResponse read = syncContainer.read(); validateContainerResponse(containerProperties, read); - CosmosSyncContainerResponse read1 = syncContainer.read(options); + CosmosContainerResponse read1 = syncContainer.read(options); validateContainerResponse(containerProperties, read1); } @@ -171,10 +160,10 @@ public void deleteContainer() throws Exception { String collectionName = UUID.randomUUID().toString(); CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); - CosmosSyncContainer syncContainer = createdDatabase.getContainer(collectionName); - CosmosSyncContainerResponse deleteResponse = syncContainer.delete(); + CosmosContainer syncContainer = createdDatabase.getContainer(collectionName); + CosmosContainerResponse deleteResponse = syncContainer.delete(); } @@ -183,10 +172,10 @@ public void deleteContainer_withOptions() throws Exception { String collectionName = UUID.randomUUID().toString(); CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); - CosmosSyncContainer syncContainer = createdDatabase.getContainer(collectionName); - CosmosSyncContainerResponse deleteResponse = syncContainer.delete(options); + CosmosContainer syncContainer = createdDatabase.getContainer(collectionName); + CosmosContainerResponse deleteResponse = syncContainer.delete(options); } @@ -197,22 +186,22 @@ public void replace() throws Exception { CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); validateContainerResponse(containerProperties, containerResponse); - assertThat(containerResponse.properties().indexingPolicy().indexingMode()).isEqualTo(IndexingMode.CONSISTENT); + assertThat(containerResponse.getProperties().getIndexingPolicy().getIndexingMode()).isEqualTo(IndexingMode.CONSISTENT); - CosmosSyncContainerResponse replaceResponse = containerResponse.container() - .replace(containerResponse.properties().indexingPolicy( - new IndexingPolicy().indexingMode(IndexingMode.LAZY))); - assertThat(replaceResponse.properties().indexingPolicy().indexingMode()) + CosmosContainerResponse replaceResponse = containerResponse.getContainer() + .replace(containerResponse.getProperties().setIndexingPolicy( + new IndexingPolicy().setIndexingMode(IndexingMode.LAZY))); + assertThat(replaceResponse.getProperties().getIndexingPolicy().getIndexingMode()) .isEqualTo(IndexingMode.LAZY); - CosmosSyncContainerResponse replaceResponse1 = containerResponse.container() - .replace(containerResponse.properties().indexingPolicy( - new IndexingPolicy().indexingMode(IndexingMode.CONSISTENT)), + CosmosContainerResponse replaceResponse1 = containerResponse.getContainer() + .replace(containerResponse.getProperties().setIndexingPolicy( + new IndexingPolicy().setIndexingMode(IndexingMode.CONSISTENT)), options); - assertThat(replaceResponse1.properties().indexingPolicy().indexingMode()) + assertThat(replaceResponse1.getProperties().getIndexingPolicy().getIndexingMode()) .isEqualTo(IndexingMode.CONSISTENT); } @@ -223,7 +212,7 @@ public void readAllContainers() throws Exception{ CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); Iterator> feedResponseIterator = createdDatabase.readAllContainers(); // Very basic validation assertThat(feedResponseIterator.hasNext()).isTrue(); @@ -240,7 +229,7 @@ public void queryContainer() throws Exception{ CosmosContainerProperties containerProperties = getCollectionDefinition(collectionName); CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - CosmosSyncContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); + CosmosContainerResponse containerResponse = createdDatabase.createContainer(containerProperties); String query = String.format("SELECT * from c where c.id = '%s'", collectionName); FeedOptions feedOptions = new FeedOptions(); @@ -264,12 +253,12 @@ public void queryContainer() throws Exception{ } private void validateContainerResponse(CosmosContainerProperties containerProperties, - CosmosSyncContainerResponse createResponse) { + CosmosContainerResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(containerProperties.id()); + .isEqualTo(containerProperties.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java index 75672b63dd4d..36997bfbd51b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseForTest.java @@ -25,9 +25,9 @@ public class CosmosDatabaseForTest { private static DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"); public LocalDateTime createdTime; - public CosmosDatabase createdDatabase; + public CosmosAsyncDatabase createdDatabase; - private CosmosDatabaseForTest(CosmosDatabase db, LocalDateTime createdTime) { + private CosmosDatabaseForTest(CosmosAsyncDatabase db, LocalDateTime createdTime) { this.createdDatabase = db; this.createdTime = createdTime; } @@ -44,12 +44,12 @@ public static String generateId() { return SHARED_DB_ID_PREFIX + DELIMITER + TIME_FORMATTER.format(LocalDateTime.now()) + DELIMITER + RandomStringUtils.randomAlphabetic(3); } - private static CosmosDatabaseForTest from(CosmosDatabase db) { - if (db == null || db.id() == null || db.getLink() == null) { + private static CosmosDatabaseForTest from(CosmosAsyncDatabase db) { + if (db == null || db.getId() == null || db.getLink() == null) { return null; } - String id = db.id(); + String id = db.getId(); if (id == null) { return null; } @@ -73,7 +73,7 @@ private static CosmosDatabaseForTest from(CosmosDatabase db) { public static CosmosDatabaseForTest create(DatabaseManager client) { CosmosDatabaseProperties dbDef = new CosmosDatabaseProperties(generateId()); - CosmosDatabase db = client.createDatabase(dbDef).block().database(); + CosmosAsyncDatabase db = client.createDatabase(dbDef).block().getDatabase(); CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.from(db); assertThat(dbForTest).isNotNull(); return dbForTest; @@ -84,16 +84,16 @@ public static void cleanupStaleTestDatabases(DatabaseManager client) { List dbs = client.queryDatabases( new SqlQuerySpec("SELECT * FROM c WHERE STARTSWITH(c.id, @PREFIX)", new SqlParameterList(new SqlParameter("@PREFIX", CosmosDatabaseForTest.SHARED_DB_ID_PREFIX)))) - .flatMap(page -> Flux.fromIterable(page.results())).collectList().block(); + .flatMap(page -> Flux.fromIterable(page.getResults())).collectList().block(); for (CosmosDatabaseProperties db : dbs) { - assertThat(db.id()).startsWith(CosmosDatabaseForTest.SHARED_DB_ID_PREFIX); + assertThat(db.getId()).startsWith(CosmosDatabaseForTest.SHARED_DB_ID_PREFIX); - CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.from(client.getDatabase(db.id())); + CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.from(client.getDatabase(db.getId())); if (db != null && dbForTest.isStale()) { - logger.info("Deleting database {}", db.id()); - dbForTest.deleteDatabase(db.id()); + logger.info("Deleting database {}", db.getId()); + dbForTest.deleteDatabase(db.getId()); } } } @@ -104,7 +104,7 @@ private void deleteDatabase(String id) { public interface DatabaseManager { Flux> queryDatabases(SqlQuerySpec query); - Mono createDatabase(CosmosDatabaseProperties databaseDefinition); - CosmosDatabase getDatabase(String id); + Mono createDatabase(CosmosDatabaseProperties databaseDefinition); + CosmosAsyncDatabase getDatabase(String id); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseTest.java similarity index 68% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseTest.java index 3dcbc2e0a7ee..9e335a0671ff 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosDatabaseTest.java @@ -4,16 +4,8 @@ * */ -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.internal.HttpConstants; import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; @@ -27,20 +19,20 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosSyncDatabaseTest extends TestSuiteBase { +public class CosmosDatabaseTest extends TestSuiteBase { private String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private List databases = new ArrayList<>(); - private CosmosSyncClient client; - private CosmosSyncDatabase createdDatabase; + private CosmosClient client; + private CosmosDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") - public CosmosSyncDatabaseTest(CosmosClientBuilder clientBuilder) { + public CosmosDatabaseTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @BeforeClass(groups = {"emulator"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().buildSyncClient(); + client = clientBuilder().buildClient(); createdDatabase = createSyncDatabase(client, preExistingDatabaseId); } @@ -57,9 +49,9 @@ public void afterClass() { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withPropertiesAndOptions() throws CosmosClientException { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseDefinition, + CosmosDatabaseResponse createResponse = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); validateDatabaseResponse(databaseDefinition, createResponse); @@ -68,26 +60,26 @@ public void createDatabase_withPropertiesAndOptions() throws CosmosClientExcepti @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withProperties() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); validateDatabaseResponse(databaseDefinition, createResponse); } @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_alreadyExists() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); validateDatabaseResponse(databaseDefinition, createResponse); try { client.createDatabase(databaseProperties); } catch (Exception e) { assertThat(e).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) e).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(((CosmosClientException) e).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } } @@ -95,35 +87,35 @@ public void createDatabase_alreadyExists() throws Exception { public void createDatabase_withId() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseDefinition.id()); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseDefinition.getId()); validateDatabaseResponse(databaseDefinition, createResponse); } @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withPropertiesThroughputAndOptions() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); CosmosDatabaseRequestOptions requestOptions = new CosmosDatabaseRequestOptions(); int throughput = 400; try { - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties, throughput, requestOptions); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties, throughput, requestOptions); validateDatabaseResponse(databaseDefinition, createResponse); } catch (CosmosClientException ex) { - assertThat(ex.statusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); + assertThat(ex.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); } } @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withPropertiesAndThroughput() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); int throughput = 1000; try { - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties, throughput); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties, throughput); validateDatabaseResponse(databaseDefinition, createResponse); } catch (Exception ex) { if (ex instanceof CosmosClientException) { - assertThat(((CosmosClientException) ex).statusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); + assertThat(((CosmosClientException) ex).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); } else { throw ex; } @@ -135,11 +127,11 @@ public void createDatabase_withIdAndThroughput() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); int throughput = 1000; try { - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseDefinition.id(), throughput); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseDefinition.getId(), throughput); validateDatabaseResponse(databaseDefinition, createResponse); } catch (Exception ex) { if (ex instanceof CosmosClientException) { - assertThat(((CosmosClientException) ex).statusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); + assertThat(((CosmosClientException) ex).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.FORBIDDEN); } else { throw ex; } @@ -148,14 +140,14 @@ public void createDatabase_withIdAndThroughput() throws Exception { @Test public void readDatabase() throws Exception { - CosmosSyncDatabase database = client.getDatabase(createdDatabase.id()); - CosmosDatabaseProperties properties = new CosmosDatabaseProperties(createdDatabase.id()); + CosmosDatabase database = client.getDatabase(createdDatabase.getId()); + CosmosDatabaseProperties properties = new CosmosDatabaseProperties(createdDatabase.getId()); CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions(); - CosmosSyncDatabaseResponse read = database.read(); + CosmosDatabaseResponse read = database.read(); validateDatabaseResponse(properties, read); - CosmosSyncDatabaseResponse read1 = database.read(options); + CosmosDatabaseResponse read1 = database.read(options); validateDatabaseResponse(properties, read1); } @@ -177,7 +169,7 @@ public void readAllDatabases() throws Exception { public void queryAllDatabases() throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(2); - String query = String.format("SELECT * from c where c.id = '%s'", createdDatabase.id()); + String query = String.format("SELECT * from c where c.getId = '%s'", createdDatabase.getId()); FeedOptions feedOptions = new FeedOptions(); Iterator> queryIterator = client.queryDatabases(query, options); @@ -194,28 +186,28 @@ public void queryAllDatabases() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void deleteDatabase() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); - client.getDatabase(databaseDefinition.id()).delete(); + client.getDatabase(databaseDefinition.getId()).delete(); } @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void deleteDatabase_withOptions() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.id()); - CosmosSyncDatabaseResponse createResponse = client.createDatabase(databaseProperties); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); + CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions(); - client.getDatabase(databaseDefinition.id()).delete(options); + client.getDatabase(databaseDefinition.getId()).delete(options); } - private void validateDatabaseResponse(CosmosDatabaseProperties databaseDefinition, CosmosSyncDatabaseResponse createResponse) { + private void validateDatabaseResponse(CosmosDatabaseProperties databaseDefinition, CosmosDatabaseResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(databaseDefinition.id()); + .isEqualTo(databaseDefinition.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncItemTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosItemTest.java similarity index 65% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncItemTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosItemTest.java index 095c8bad2e5e..58adf4b568f2 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncItemTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosItemTest.java @@ -4,19 +4,8 @@ * */ -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.internal.HttpConstants; import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; @@ -31,15 +20,15 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosSyncItemTest extends TestSuiteBase { +public class CosmosItemTest extends TestSuiteBase { private String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private List databases = new ArrayList<>(); - private CosmosSyncClient client; - private CosmosSyncContainer container; + private CosmosClient client; + private CosmosContainer container; @Factory(dataProvider = "clientBuilders") - public CosmosSyncItemTest(CosmosClientBuilder clientBuilder) { + public CosmosItemTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @@ -47,9 +36,9 @@ public CosmosSyncItemTest(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = clientBuilder().buildSyncClient(); - CosmosContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); - container = client.getDatabase(asyncContainer.getDatabase().id()).getContainer(asyncContainer.id()); + this.client = clientBuilder().buildClient(); + CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); + container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); } @AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -61,11 +50,11 @@ public void afterClass() { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void createItem() throws Exception { CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); validateItemResponse(properties, itemResponse); properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse1 = container.createItem(properties, new CosmosItemRequestOptions()); + CosmosItemResponse itemResponse1 = container.createItem(properties, new CosmosItemRequestOptions()); validateItemResponse(properties, itemResponse1); } @@ -73,11 +62,11 @@ public void createItem() throws Exception { @Test(groups = {"simple"}, timeOut = TIMEOUT) public void createItem_alreadyExists() throws Exception { CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); validateItemResponse(properties, itemResponse); properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse1 = container.createItem(properties, new CosmosItemRequestOptions()); + CosmosItemResponse itemResponse1 = container.createItem(properties, new CosmosItemRequestOptions()); validateItemResponse(properties, itemResponse1); // Test for conflict @@ -85,18 +74,18 @@ public void createItem_alreadyExists() throws Exception { container.createItem(properties, new CosmosItemRequestOptions()); } catch (Exception e) { assertThat(e).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) e).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(((CosmosClientException) e).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readItem() throws Exception { CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); - CosmosSyncItemResponse readResponse1 = itemResponse.item() + CosmosItemResponse readResponse1 = itemResponse.getItem() .read(new CosmosItemRequestOptions() - .partitionKey(new PartitionKey(properties.get("mypk")))); + .setPartitionKey(new PartitionKey(properties.get("mypk")))); validateItemResponse(properties, readResponse1); } @@ -104,27 +93,27 @@ public void readItem() throws Exception { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void replaceItem() throws Exception{ CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); validateItemResponse(properties, itemResponse); String newPropValue = UUID.randomUUID().toString(); BridgeInternal.setProperty(properties, "newProp", newPropValue); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(properties.get("mypk"))); + options.setPartitionKey(new PartitionKey(properties.get("mypk"))); // replace document - CosmosSyncItemResponse replace = itemResponse.item().replace(properties, options); - assertThat(replace.properties().get("newProp")).isEqualTo(newPropValue); + CosmosItemResponse replace = itemResponse.getItem().replace(properties, options); + assertThat(replace.getProperties().get("newProp")).isEqualTo(newPropValue); } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void deleteItem() throws Exception { CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(properties.get("mypk"))); + options.setPartitionKey(new PartitionKey(properties.get("mypk"))); - CosmosSyncItemResponse deleteResponse = itemResponse.item().delete(options); - assertThat(deleteResponse.item()).isNull(); + CosmosItemResponse deleteResponse = itemResponse.getItem().delete(options); + assertThat(deleteResponse.getItem()).isNull(); } @@ -132,10 +121,10 @@ public void deleteItem() throws Exception { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readAllItems() throws Exception{ CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator3 = container.readAllItems(feedOptions); assertThat(feedResponseIterator3.hasNext()).isTrue(); @@ -145,10 +134,10 @@ public void readAllItems() throws Exception{ @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryItems() throws Exception{ CosmosItemProperties properties = getDocumentDefinition(UUID.randomUUID().toString()); - CosmosSyncItemResponse itemResponse = container.createItem(properties); + CosmosItemResponse itemResponse = container.createItem(properties); - String query = String.format("SELECT * from c where c.id = '%s'", properties.id()); - FeedOptions feedOptions = new FeedOptions().enableCrossPartitionQuery(true); + String query = String.format("SELECT * from c where c.id = '%s'", properties.getId()); + FeedOptions feedOptions = new FeedOptions().setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator1 = container.queryItems(query, feedOptions); @@ -175,12 +164,12 @@ private CosmosItemProperties getDocumentDefinition(String documentId) { } private void validateItemResponse(CosmosItemProperties containerProperties, - CosmosSyncItemResponse createResponse) { + CosmosItemResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(containerProperties.id()); + .isEqualTo(containerProperties.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java similarity index 52% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java index ab9d4957f5a6..d8d34dc83799 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosKeyCredentialTest.java @@ -26,9 +26,9 @@ public class CosmosKeyCredentialTest extends TestSuiteBase { private final List databases = new ArrayList<>(); private final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosClient client; - private CosmosDatabase database; - private CosmosContainer container; + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; @Factory(dataProvider = "clientBuildersWithDirect") public CosmosKeyCredentialTest(CosmosClientBuilder clientBuilder) { @@ -51,7 +51,7 @@ private CosmosContainerProperties getCollectionDefinition(String collectionName) PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); return new CosmosContainerProperties( collectionName, @@ -73,19 +73,19 @@ public void createCollectionWithSecondaryKey(String collectionName) throws Inter CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); - Mono createObservable = database + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); + Mono createObservable = database .createContainer(collectionDefinition); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(collectionDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collectionDefinition.getId()).build(); validateSuccess(createObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); safeDeleteAllCollections(database); } @@ -94,21 +94,21 @@ public void readCollectionWithSecondaryKey(String collectionName) throws Interru CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); - Mono readObservable = collection.read(); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); + Mono readObservable = collection.read(); - CosmosResponseValidator validator = - new CosmosResponseValidator.Builder() - .withId(collection.id()).build(); + CosmosResponseValidator validator = + new CosmosResponseValidator.Builder() + .withId(collection.getId()).build(); validateSuccess(readObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); safeDeleteAllCollections(database); } @@ -117,51 +117,51 @@ public void deleteCollectionWithSecondaryKey(String collectionName) throws Inter CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); - Mono deleteObservable = collection.delete(); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); + Mono deleteObservable = collection.delete(); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "crudArgProvider") public void replaceCollectionWithSecondaryKey(String collectionName) throws InterruptedException { // create a collection CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - CosmosContainerProperties collectionSettings = collection.read().block().properties(); + CosmosContainerProperties collectionSettings = collection.read().block().getProperties(); // sanity check - assertThat(collectionSettings.indexingPolicy().indexingMode()).isEqualTo(IndexingMode.CONSISTENT); + assertThat(collectionSettings.getIndexingPolicy().getIndexingMode()).isEqualTo(IndexingMode.CONSISTENT); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); // replace indexing mode IndexingPolicy indexingMode = new IndexingPolicy(); - indexingMode.indexingMode(IndexingMode.LAZY); - collectionSettings.indexingPolicy(indexingMode); - Mono readObservable = collection.replace(collectionSettings, new CosmosContainerRequestOptions()); + indexingMode.setIndexingMode(IndexingMode.LAZY); + collectionSettings.setIndexingPolicy(indexingMode); + Mono readObservable = collection.replace(collectionSettings, new CosmosContainerRequestOptions()); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .indexingMode(IndexingMode.LAZY).build(); validateSuccess(readObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); safeDeleteAllCollections(database); } @@ -169,141 +169,141 @@ public void replaceCollectionWithSecondaryKey(String collectionName) throws Inte public void createDocumentWithSecondaryKey(String documentId) throws InterruptedException { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); CosmosItemProperties properties = getDocumentDefinition(documentId); - Mono createObservable = container.createItem(properties, new CosmosItemRequestOptions()); + Mono createObservable = container.createItem(properties, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(properties.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(properties.getId()) .build(); validateSuccess(createObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "crudArgProvider") public void readDocumentWithSecondaryKey(String documentId) throws InterruptedException { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); waitIfNeededForReplicasToCatchUp(clientBuilder()); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); - Mono readObservable = document.read(options); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); + Mono readObservable = document.read(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(document.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(document.getId()) .build(); validateSuccess(readObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "crudArgProvider") public void deleteDocumentWithSecondaryKey(String documentId) throws InterruptedException { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); - Mono deleteObservable = document.delete(options); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); + Mono deleteObservable = document.delete(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); // attempt to read document which was deleted waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = document.read(options); + Mono readObservable = document.read(options); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(readObservable, notFoundValidator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void createDatabaseWithSecondaryKey() throws Exception { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); - // create the database - Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); + databases.add(databaseDefinition.getId()); + // create the getDatabase + Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(databaseDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(databaseDefinition.getId()).build(); validateSuccess(createObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readDatabaseWithSecondaryKey() throws Exception { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); // read database - Mono readObservable = client.getDatabase(databaseId).read(); + Mono readObservable = client.getDatabase(databaseId).read(); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withId(databaseId).build(); validateSuccess(readObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void deleteDatabaseWithSecondaryKey() throws Exception { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key(TestConfigurations.SECONDARY_MASTER_KEY); + cosmosKeyCredential.setKey(TestConfigurations.SECONDARY_MASTER_KEY); // create the database CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); - CosmosDatabase database = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().database(); - // delete the database - Mono deleteObservable = database.delete(); + CosmosAsyncDatabase database = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().getDatabase(); + // delete the getDatabase + Mono deleteObservable = database.delete(); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.SECONDARY_MASTER_KEY); } @Test(groups = { "simple" }, timeOut = TIMEOUT, @@ -311,24 +311,24 @@ public void deleteDatabaseWithSecondaryKey() throws Exception { expectedExceptionsMessageRegExp = "Illegal base64 character .*") public void invalidSecondaryKey() throws Exception { // sanity check - assertThat(client.cosmosKeyCredential().key()).isEqualTo(TestConfigurations.MASTER_KEY); + assertThat(client.cosmosKeyCredential().getKey()).isEqualTo(TestConfigurations.MASTER_KEY); - cosmosKeyCredential.key("Invalid Secondary Key"); + cosmosKeyCredential.setKey("Invalid Secondary Key"); // create the database, and this should throw Illegal Argument Exception for secondary key CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().database(); + client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().getDatabase(); } @AfterMethod(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void afterMethod() { - // Set back master key before every test - cosmosKeyCredential.key(TestConfigurations.MASTER_KEY); + // Set back master getKey before every test + cosmosKeyCredential.setKey(TestConfigurations.MASTER_KEY); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); database = createDatabase(client, databaseId); container = getSharedMultiPartitionCosmosContainer(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java similarity index 74% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java index 137816d3096b..57a0fad73eaf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosPartitionKeyTests.java @@ -32,8 +32,8 @@ public final class CosmosPartitionKeyTests extends TestSuiteBase { private final static String NON_PARTITIONED_CONTAINER_ID = "NonPartitionContainer" + UUID.randomUUID().toString(); private final static String NON_PARTITIONED_CONTAINER_DOCUEMNT_ID = "NonPartitionContainer_Document" + UUID.randomUUID().toString(); - private CosmosClient client; - private CosmosDatabase createdDatabase; + private CosmosAsyncClient client; + private CosmosAsyncDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") public CosmosPartitionKeyTests(CosmosClientBuilder clientBuilder) { @@ -43,7 +43,7 @@ public CosmosPartitionKeyTests(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws URISyntaxException, IOException { assertThat(this.client).isNull(); - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); } @@ -56,18 +56,18 @@ public void afterClass() { private void createContainerWithoutPk() throws URISyntaxException, IOException { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); HttpClientConfig httpClientConfig = new HttpClientConfig(new Configs()) - .withMaxIdleConnectionTimeoutInMillis(connectionPolicy.idleConnectionTimeoutInMillis()) - .withPoolSize(connectionPolicy.maxPoolSize()) - .withHttpProxy(connectionPolicy.proxy()) - .withRequestTimeoutInMillis(connectionPolicy.requestTimeoutInMillis()); + .withMaxIdleConnectionTimeoutInMillis(connectionPolicy.getIdleConnectionTimeoutInMillis()) + .withPoolSize(connectionPolicy.getMaxPoolSize()) + .withHttpProxy(connectionPolicy.getProxy()) + .withRequestTimeoutInMillis(connectionPolicy.getRequestTimeoutInMillis()); HttpClient httpClient = HttpClient.createFixed(httpClientConfig); - // CREATE a non partitioned collection using the rest API and older version - String resourceId = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.id(); - String path = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.id() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/"; + // CREATE a non partitioned collection using the rest API and older getVersion + String resourceId = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.getId(); + String path = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.getId() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/"; DocumentCollection collection = new DocumentCollection(); - collection.id(NON_PARTITIONED_CONTAINER_ID); + collection.setId(NON_PARTITIONED_CONTAINER_ID); HashMap headers = new HashMap(); headers.put(HttpConstants.HttpHeaders.X_DATE, Utils.nowAsRFC1123()); @@ -80,20 +80,20 @@ private void createContainerWithoutPk() throws URISyntaxException, IOException { String[] baseUrlSplit = TestConfigurations.HOST.split(":"); String resourceUri = baseUrlSplit[0] + ":" + baseUrlSplit[1] + ":" + baseUrlSplit[2].split("/")[ - 0] + "//" + Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.id() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/"; + 0] + "//" + Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.getId() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/"; URI uri = new URI(resourceUri); HttpRequest httpRequest = new HttpRequest(HttpMethod.POST, uri, uri.getPort(), new HttpHeaders(headers)); httpRequest.withBody(request.getContent()); String body = httpClient.send(httpRequest).block().bodyAsString().block(); - assertThat(body).contains("\"id\":\"" + NON_PARTITIONED_CONTAINER_ID + "\""); + assertThat(body).contains("\"getId\":\"" + NON_PARTITIONED_CONTAINER_ID + "\""); - // CREATE a document in the non partitioned collection using the rest API and older version - resourceId = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.id() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/" + collection.id(); - path = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.id() + "/" + Paths.COLLECTIONS_PATH_SEGMENT - + "/" + collection.id() + "/" + Paths.DOCUMENTS_PATH_SEGMENT + "/"; + // CREATE a document in the non partitioned collection using the rest API and older getVersion + resourceId = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.getId() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/" + collection.getId(); + path = Paths.DATABASES_PATH_SEGMENT + "/" + createdDatabase.getId() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + + "/" + collection.getId() + "/" + Paths.DOCUMENTS_PATH_SEGMENT + "/"; Document document = new Document(); - document.id(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID); + document.setId(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID); authorization = base.generateKeyAuthorizationSignature(HttpConstants.HttpMethods.POST, resourceId, Paths.DOCUMENTS_PATH_SEGMENT, headers); headers.put(HttpConstants.HttpHeaders.AUTHORIZATION, URLEncoder.encode(authorization, "UTF-8")); @@ -101,7 +101,7 @@ private void createContainerWithoutPk() throws URISyntaxException, IOException { document, headers, new RequestOptions()); resourceUri = baseUrlSplit[0] + ":" + baseUrlSplit[1] + ":" + baseUrlSplit[2].split("/")[0] + "//" + Paths.DATABASES_PATH_SEGMENT + "/" - + createdDatabase.id() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/" + collection.id() + "/" + Paths.DOCUMENTS_PATH_SEGMENT + "/"; + + createdDatabase.getId() + "/" + Paths.COLLECTIONS_PATH_SEGMENT + "/" + collection.getId() + "/" + Paths.DOCUMENTS_PATH_SEGMENT + "/"; uri = new URI(resourceUri); httpRequest = new HttpRequest(HttpMethod.POST, uri, uri.getPort(), new HttpHeaders(headers)); @@ -116,37 +116,37 @@ private void createContainerWithoutPk() throws URISyntaxException, IOException { @Test(groups = { "simple" }) public void testNonPartitionedCollectionOperations() throws Exception { createContainerWithoutPk(); - CosmosContainer createdContainer = createdDatabase.getContainer(NON_PARTITIONED_CONTAINER_ID); + CosmosAsyncContainer createdContainer = createdDatabase.getContainer(NON_PARTITIONED_CONTAINER_ID); - Mono readMono = createdContainer.getItem(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID, PartitionKey.None).read(); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + Mono readMono = createdContainer.getItem(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID, PartitionKey.None).read(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withId(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID).build(); validateSuccess(readMono, validator); String createdItemId = UUID.randomUUID().toString(); - Mono createMono = createdContainer.createItem(new CosmosItemProperties("{'id':'" + createdItemId + "'}")); - validator = new CosmosResponseValidator.Builder() + Mono createMono = createdContainer.createItem(new CosmosItemProperties("{'id':'" + createdItemId + "'}")); + validator = new CosmosResponseValidator.Builder() .withId(createdItemId).build(); validateSuccess(createMono, validator); readMono = createdContainer.getItem(createdItemId, PartitionKey.None).read(); - validator = new CosmosResponseValidator.Builder() + validator = new CosmosResponseValidator.Builder() .withId(createdItemId).build(); validateSuccess(readMono, validator); - CosmosItem itemToReplace = createdContainer.getItem(createdItemId, PartitionKey.None).read().block().item(); - CosmosItemProperties itemSettingsToReplace = itemToReplace.read().block().properties(); + CosmosAsyncItem itemToReplace = createdContainer.getItem(createdItemId, PartitionKey.None).read().block().getItem(); + CosmosItemProperties itemSettingsToReplace = itemToReplace.read().block().getProperties(); String replacedItemId = UUID.randomUUID().toString(); - itemSettingsToReplace.id(replacedItemId); - Mono replaceMono = itemToReplace.replace(itemSettingsToReplace); - validator = new CosmosResponseValidator.Builder() + itemSettingsToReplace.setId(replacedItemId); + Mono replaceMono = itemToReplace.replace(itemSettingsToReplace); + validator = new CosmosResponseValidator.Builder() .withId(replacedItemId).build(); validateSuccess(replaceMono, validator); String upsertedItemId = UUID.randomUUID().toString(); - Mono upsertMono = createdContainer.upsertItem(new CosmosItemProperties("{'id':'" + upsertedItemId + "'}")); - validator = new CosmosResponseValidator.Builder() + Mono upsertMono = createdContainer.upsertItem(new CosmosItemProperties("{'id':'" + upsertedItemId + "'}")); + validator = new CosmosResponseValidator.Builder() .withId(upsertedItemId).build(); validateSuccess(upsertMono, validator); @@ -188,12 +188,12 @@ public void testNonPartitionedCollectionOperations() throws Exception { " });" + "}'" + "}"); - CosmosStoredProcedure createdSproc = createdContainer.getScripts().createStoredProcedure(sproc).block().storedProcedure(); + CosmosAsyncStoredProcedure createdSproc = createdContainer.getScripts().createStoredProcedure(sproc).block().getStoredProcedure(); // Partiton Key value same as what is specified in the stored procedure body RequestOptions options = new RequestOptions(); options.setPartitionKey(PartitionKey.None); - int result = Integer.parseInt(createdSproc.execute(null, new CosmosStoredProcedureRequestOptions()).block().responseAsString()); + int result = Integer.parseInt(createdSproc.execute(null, new CosmosStoredProcedureRequestOptions()).block().getResponseAsString()); assertThat(result).isEqualTo(1); // 3 previous items + 1 created from the sproc @@ -206,23 +206,23 @@ public void testNonPartitionedCollectionOperations() throws Exception { .build(); validateQuerySuccess(queryFlux, queryValidator); - Mono deleteMono = createdContainer.getItem(upsertedItemId, PartitionKey.None).delete(); - validator = new CosmosResponseValidator.Builder() + Mono deleteMono = createdContainer.getItem(upsertedItemId, PartitionKey.None).delete(); + validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteMono, validator); deleteMono = createdContainer.getItem(replacedItemId, PartitionKey.None).delete(); - validator = new CosmosResponseValidator.Builder() + validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteMono, validator); deleteMono = createdContainer.getItem(NON_PARTITIONED_CONTAINER_DOCUEMNT_ID, PartitionKey.None).delete(); - validator = new CosmosResponseValidator.Builder() + validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteMono, validator); deleteMono = createdContainer.getItem(documentCreatedBySprocId, PartitionKey.None).delete(); - validator = new CosmosResponseValidator.Builder() + validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteMono, validator); @@ -239,14 +239,14 @@ public void testMultiPartitionCollectionReadDocumentWithNoPk() throws Interrupte String partitionedCollectionId = "PartitionedCollection" + UUID.randomUUID().toString(); String IdOfDocumentWithNoPk = UUID.randomUUID().toString(); CosmosContainerProperties containerSettings = new CosmosContainerProperties(partitionedCollectionId, "/mypk"); - CosmosContainer createdContainer = createdDatabase.createContainer(containerSettings).block().container(); + CosmosAsyncContainer createdContainer = createdDatabase.createContainer(containerSettings).block().getContainer(); CosmosItemProperties cosmosItemProperties = new CosmosItemProperties(); - cosmosItemProperties.id(IdOfDocumentWithNoPk); - CosmosItem createdItem = createdContainer.createItem(cosmosItemProperties).block().item(); + cosmosItemProperties.setId(IdOfDocumentWithNoPk); + CosmosAsyncItem createdItem = createdContainer.createItem(cosmosItemProperties).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(PartitionKey.None); - Mono readMono = createdItem.read(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + options.setPartitionKey(PartitionKey.None); + Mono readMono = createdItem.read(options); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withId(IdOfDocumentWithNoPk).build(); validateSuccess(readMono, validator); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java similarity index 62% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java index e0e0afe4d42b..d64fa544c66e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java @@ -35,29 +35,29 @@ public Builder withId(final String resourceId) { @Override public void validate(T resourceResponse) { assertThat(getResource(resourceResponse)).isNotNull(); - assertThat(getResource(resourceResponse).id()).as("check Resource Id").isEqualTo(resourceId); + assertThat(getResource(resourceResponse).getId()).as("check Resource Id").isEqualTo(resourceId); } }); return this; } private Resource getResource(T resourceResponse) { - if (resourceResponse instanceof CosmosDatabaseResponse) { - return ((CosmosDatabaseResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosContainerResponse) { - return ((CosmosContainerResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosItemResponse) { - return ((CosmosItemResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosStoredProcedureResponse) { - return ((CosmosStoredProcedureResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosTriggerResponse) { - return ((CosmosTriggerResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosUserDefinedFunctionResponse) { - return ((CosmosUserDefinedFunctionResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosUserResponse) { - return ((CosmosUserResponse)resourceResponse).properties(); - } else if (resourceResponse instanceof CosmosPermissionResponse) { - return ((CosmosPermissionResponse) resourceResponse).properties(); + if (resourceResponse instanceof CosmosAsyncDatabaseResponse) { + return ((CosmosAsyncDatabaseResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncContainerResponse) { + return ((CosmosAsyncContainerResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncItemResponse) { + return ((CosmosAsyncItemResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncStoredProcedureResponse) { + return ((CosmosAsyncStoredProcedureResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncTriggerResponse) { + return ((CosmosAsyncTriggerResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncUserDefinedFunctionResponse) { + return ((CosmosAsyncUserDefinedFunctionResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncUserResponse) { + return ((CosmosAsyncUserResponse)resourceResponse).getProperties(); + } else if (resourceResponse instanceof CosmosAsyncPermissionResponse) { + return ((CosmosAsyncPermissionResponse) resourceResponse).getProperties(); } return null; } @@ -74,13 +74,13 @@ public void validate(T resourceResponse) { } public Builder indexingMode(IndexingMode mode) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosContainerResponse resourceResponse) { - assertThat(resourceResponse.properties()).isNotNull(); - assertThat(resourceResponse.properties().indexingPolicy()).isNotNull(); - assertThat(resourceResponse.properties().indexingPolicy().indexingMode()).isEqualTo(mode); + public void validate(CosmosAsyncContainerResponse resourceResponse) { + assertThat(resourceResponse.getProperties()).isNotNull(); + assertThat(resourceResponse.getProperties().getIndexingPolicy()).isNotNull(); + assertThat(resourceResponse.getProperties().getIndexingPolicy().getIndexingMode()).isEqualTo(mode); } }); return this; @@ -98,12 +98,12 @@ public void validate(T cosmosResponse) { } public Builder withCompositeIndexes(List> compositeIndexesWritten) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosContainerResponse resourceResponse) { - Iterator> compositeIndexesReadIterator = resourceResponse.properties() - .indexingPolicy().compositeIndexes().iterator(); + public void validate(CosmosAsyncContainerResponse resourceResponse) { + Iterator> compositeIndexesReadIterator = resourceResponse.getProperties() + .getIndexingPolicy().getCompositeIndexes().iterator(); Iterator> compositeIndexesWrittenIterator = compositeIndexesWritten.iterator(); ArrayList readIndexesStrings = new ArrayList(); @@ -120,8 +120,8 @@ public void validate(CosmosContainerResponse resourceResponse) { CompositePath compositePathRead = compositeIndexReadIterator.next(); CompositePath compositePathWritten = compositeIndexWrittenIterator.next(); - readIndexesString.append(compositePathRead.path() + ":" + compositePathRead.order() + ";"); - writtenIndexesString.append(compositePathWritten.path() + ":" + compositePathRead.order() + ";"); + readIndexesString.append(compositePathRead.getPath() + ":" + compositePathRead.getOrder() + ";"); + writtenIndexesString.append(compositePathWritten.getPath() + ":" + compositePathRead.getOrder() + ";"); } readIndexesStrings.add(readIndexesString.toString()); @@ -136,12 +136,12 @@ public void validate(CosmosContainerResponse resourceResponse) { } public Builder withSpatialIndexes(Collection spatialIndexes) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosContainerResponse resourceResponse) { - Iterator spatialIndexesReadIterator = resourceResponse.properties() - .indexingPolicy().spatialIndexes().iterator(); + public void validate(CosmosAsyncContainerResponse resourceResponse) { + Iterator spatialIndexesReadIterator = resourceResponse.getProperties() + .getIndexingPolicy().getSpatialIndexes().iterator(); Iterator spatialIndexesWrittenIterator = spatialIndexes.iterator(); HashMap> readIndexMap = new HashMap>(); @@ -151,14 +151,14 @@ public void validate(CosmosContainerResponse resourceResponse) { SpatialSpec spatialSpecRead = spatialIndexesReadIterator.next(); SpatialSpec spatialSpecWritten = spatialIndexesWrittenIterator.next(); - String readPath = spatialSpecRead.path() + ":"; - String writtenPath = spatialSpecWritten.path() + ":"; + String readPath = spatialSpecRead.getPath() + ":"; + String writtenPath = spatialSpecWritten.getPath() + ":"; ArrayList readSpatialTypes = new ArrayList(); ArrayList writtenSpatialTypes = new ArrayList(); - Iterator spatialTypesReadIterator = spatialSpecRead.spatialTypes().iterator(); - Iterator spatialTypesWrittenIterator = spatialSpecWritten.spatialTypes().iterator(); + Iterator spatialTypesReadIterator = spatialSpecRead.getSpatialTypes().iterator(); + Iterator spatialTypesWrittenIterator = spatialSpecWritten.getSpatialTypes().iterator(); while (spatialTypesReadIterator.hasNext() && spatialTypesWrittenIterator.hasNext()) { readSpatialTypes.add(spatialTypesReadIterator.next()); @@ -179,11 +179,11 @@ public void validate(CosmosContainerResponse resourceResponse) { } public Builder withStoredProcedureBody(String storedProcedureBody) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosStoredProcedureResponse resourceResponse) { - assertThat(resourceResponse.properties().body()).isEqualTo(storedProcedureBody); + public void validate(CosmosAsyncStoredProcedureResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getBody()).isEqualTo(storedProcedureBody); } }); return this; @@ -194,53 +194,53 @@ public Builder notNullEtag() { @Override public void validate(T resourceResponse) { - assertThat(resourceResponse.resourceSettings()).isNotNull(); - assertThat(resourceResponse.resourceSettings().etag()).isNotNull(); + assertThat(resourceResponse.getProperties()).isNotNull(); + assertThat(resourceResponse.getProperties().getETag()).isNotNull(); } }); return this; } public Builder withTriggerBody(String functionBody) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosTriggerResponse resourceResponse) { - assertThat(resourceResponse.properties().body()).isEqualTo(functionBody); + public void validate(CosmosAsyncTriggerResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getBody()).isEqualTo(functionBody); } }); return this; } public Builder withTriggerInternals(TriggerType type, TriggerOperation op) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosTriggerResponse resourceResponse) { - assertThat(resourceResponse.properties().triggerType()).isEqualTo(type); - assertThat(resourceResponse.properties().triggerOperation()).isEqualTo(op); + public void validate(CosmosAsyncTriggerResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getTriggerType()).isEqualTo(type); + assertThat(resourceResponse.getProperties().getTriggerOperation()).isEqualTo(op); } }); return this; } public Builder withUserDefinedFunctionBody(String functionBody) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosUserDefinedFunctionResponse resourceResponse) { - assertThat(resourceResponse.properties().body()).isEqualTo(functionBody); + public void validate(CosmosAsyncUserDefinedFunctionResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getBody()).isEqualTo(functionBody); } }); return this; } public Builder withPermissionMode(PermissionMode mode) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosPermissionResponse resourceResponse) { - assertThat(resourceResponse.properties().permissionMode()).isEqualTo(mode); + public void validate(CosmosAsyncPermissionResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getPermissionMode()).isEqualTo(mode); } }); return this; @@ -248,11 +248,11 @@ public void validate(CosmosPermissionResponse resourceResponse) { } public Builder withPermissionResourceLink(String resourceLink) { - validators.add(new CosmosResponseValidator() { + validators.add(new CosmosResponseValidator() { @Override - public void validate(CosmosPermissionResponse resourceResponse) { - assertThat(resourceResponse.properties().resourceLink()).isEqualTo(resourceLink); + public void validate(CosmosAsyncPermissionResponse resourceResponse) { + assertThat(resourceResponse.getProperties().getResourceLink()).isEqualTo(resourceLink); } }); return this; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncStoredProcTest.java similarity index 66% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncStoredProcTest.java index 7836f9ba17f3..e07413e97d18 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncStoredProcTest.java @@ -1,17 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.internal.HttpConstants; import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; @@ -29,8 +20,8 @@ public class CosmosSyncStoredProcTest extends TestSuiteBase { private String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private List databases = new ArrayList<>(); - private CosmosSyncClient client; - private CosmosSyncContainer container; + private CosmosClient client; + private CosmosContainer container; @Factory(dataProvider = "clientBuilders") public CosmosSyncStoredProcTest(CosmosClientBuilder clientBuilder) { @@ -41,9 +32,9 @@ public CosmosSyncStoredProcTest(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = clientBuilder().buildSyncClient(); - CosmosContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); - container = client.getDatabase(asyncContainer.getDatabase().id()).getContainer(asyncContainer.id()); + this.client = clientBuilder().buildClient(); + CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); + container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); } @AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -57,12 +48,12 @@ public void createStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = getCosmosStoredProcedureProperties(); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); validateResponse(storedProcedureDef, response); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 11;}"); - CosmosSyncStoredProcedureResponse response1 = container.getScripts() + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 11;}"); + CosmosStoredProcedureResponse response1 = container.getScripts() .createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()); validateResponse(storedProcedureDef, response1); @@ -73,7 +64,7 @@ public void createStoredProcedure() throws Exception { public void createSproc_alreadyExists() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = getCosmosStoredProcedureProperties(); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); validateResponse(storedProcedureDef, response); // Test for conflict @@ -81,7 +72,7 @@ public void createSproc_alreadyExists() throws Exception { container.getScripts().createStoredProcedure(storedProcedureDef); } catch (Exception e) { assertThat(e).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) e).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(((CosmosClientException) e).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } } @@ -89,14 +80,14 @@ public void createSproc_alreadyExists() throws Exception { public void readStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = getCosmosStoredProcedureProperties(); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); validateResponse(storedProcedureDef, response); - CosmosSyncStoredProcedure storedProcedure = container.getScripts().getStoredProcedure(storedProcedureDef.id()); - CosmosSyncStoredProcedureResponse readResponse = storedProcedure.read(); + CosmosStoredProcedure storedProcedure = container.getScripts().getStoredProcedure(storedProcedureDef.getId()); + CosmosStoredProcedureResponse readResponse = storedProcedure.read(); validateResponse(storedProcedureDef, readResponse); - CosmosSyncStoredProcedureResponse readResponse2 = + CosmosStoredProcedureResponse readResponse2 = storedProcedure.read(new CosmosStoredProcedureRequestOptions()); validateResponse(storedProcedureDef, readResponse2); } @@ -105,24 +96,24 @@ public void readStoredProcedure() throws Exception { public void replaceStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = getCosmosStoredProcedureProperties(); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); validateResponse(storedProcedureDef, response); - CosmosSyncStoredProcedureResponse readResponse = container.getScripts() - .getStoredProcedure(storedProcedureDef.id()) + CosmosStoredProcedureResponse readResponse = container.getScripts() + .getStoredProcedure(storedProcedureDef.getId()) .read(); validateResponse(storedProcedureDef, readResponse); //replace - storedProcedureDef = readResponse.properties(); - storedProcedureDef.body("function(){ var y = 20;}"); - CosmosSyncStoredProcedureResponse replaceResponse = container.getScripts() - .getStoredProcedure(storedProcedureDef.id()) + storedProcedureDef = readResponse.getProperties(); + storedProcedureDef.setBody("function(){ var y = 20;}"); + CosmosStoredProcedureResponse replaceResponse = container.getScripts() + .getStoredProcedure(storedProcedureDef.getId()) .replace(storedProcedureDef); validateResponse(storedProcedureDef, replaceResponse); - storedProcedureDef.body("function(){ var z = 2;}"); - CosmosSyncStoredProcedureResponse replaceResponse2 = container.getScripts() - .getStoredProcedure(storedProcedureDef.id()) + storedProcedureDef.setBody("function(){ var z = 2;}"); + CosmosStoredProcedureResponse replaceResponse2 = container.getScripts() + .getStoredProcedure(storedProcedureDef.getId()) .replace(storedProcedureDef, new CosmosStoredProcedureRequestOptions()); validateResponse(storedProcedureDef, replaceResponse2); @@ -131,8 +122,8 @@ public void replaceStoredProcedure() throws Exception { private CosmosStoredProcedureProperties getCosmosStoredProcedureProperties() { CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); return storedProcedureDef; } @@ -140,11 +131,11 @@ private CosmosStoredProcedureProperties getCosmosStoredProcedureProperties() { public void deleteStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = getCosmosStoredProcedureProperties(); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(storedProcedureDef); validateResponse(storedProcedureDef, response); - CosmosSyncResponse deleteResponse = container.getScripts() - .getStoredProcedure(storedProcedureDef.id()) - .delete(); + container.getScripts() + .getStoredProcedure(storedProcedureDef.getId()) + .delete(); } @@ -156,7 +147,7 @@ public void executeStoredProcedure() throws Exception { .id(UUID.randomUUID().toString()); sproc.body("function() {var x = 10;}"); - CosmosSyncStoredProcedureResponse response = container.getScripts().createStoredProcedure(sproc); + CosmosStoredProcedureResponse response = container.getScripts().createStoredProcedure(sproc); CosmosStoredProcedureRequestOptions options = new CosmosStoredProcedureRequestOptions(); options.partitionKey(PartitionKey.None); container.getScripts() @@ -171,7 +162,7 @@ private void readAllSprocs() throws Exception { container.getScripts().createStoredProcedure(storedProcedureDef); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator3 = container.getScripts().readAllStoredProcedures(feedOptions); assertThat(feedResponseIterator3.hasNext()).isTrue(); @@ -183,8 +174,8 @@ private void querySprocs() throws Exception { CosmosStoredProcedureProperties properties = getCosmosStoredProcedureProperties(); container.getScripts().createStoredProcedure(properties); - String query = String.format("SELECT * from c where c.id = '%s'", properties.id()); - FeedOptions feedOptions = new FeedOptions().enableCrossPartitionQuery(true); + String query = String.format("SELECT * from c where c.id = '%s'", properties.getId()); + FeedOptions feedOptions = new FeedOptions().setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator1 = container.getScripts().queryStoredProcedures(query, feedOptions); @@ -197,12 +188,12 @@ private void querySprocs() throws Exception { } private void validateResponse(CosmosStoredProcedureProperties properties, - CosmosSyncStoredProcedureResponse createResponse) { + CosmosStoredProcedureResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(properties.id()); + .isEqualTo(properties.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUDFTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncUDFTest.java similarity index 65% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUDFTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncUDFTest.java index 9593f0f46793..f8f1f9857bbc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUDFTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosSyncUDFTest.java @@ -1,14 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -22,8 +16,8 @@ public class CosmosSyncUDFTest extends TestSuiteBase { - private CosmosSyncClient client; - private CosmosSyncContainer container; + private CosmosClient client; + private CosmosContainer container; @Factory(dataProvider = "clientBuilders") public CosmosSyncUDFTest(CosmosClientBuilder clientBuilder) { @@ -33,9 +27,9 @@ public CosmosSyncUDFTest(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = clientBuilder().buildSyncClient(); - CosmosContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); - container = client.getDatabase(asyncContainer.getDatabase().id()).getContainer(asyncContainer.id()); + this.client = clientBuilder().buildClient(); + CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); + container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); } @AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -48,7 +42,7 @@ public void afterClass() { public void createUDF() throws Exception { CosmosUserDefinedFunctionProperties udf = getCosmosUserDefinedFunctionProperties(); - CosmosSyncUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); + CosmosUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); validateResponse(udf, createResponse); } @@ -57,9 +51,9 @@ public void createUDF() throws Exception { public void readUDF() throws Exception { CosmosUserDefinedFunctionProperties udf = getCosmosUserDefinedFunctionProperties(); - CosmosSyncUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); + CosmosUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); - CosmosSyncUserDefinedFunctionResponse read = container.getScripts().getUserDefinedFunction(udf.id()).read(); + CosmosUserDefinedFunctionResponse read = container.getScripts().getUserDefinedFunction(udf.getId()).read(); validateResponse(udf, read); } @@ -68,16 +62,16 @@ public void replaceUDF() throws Exception { CosmosUserDefinedFunctionProperties udf = getCosmosUserDefinedFunctionProperties(); - CosmosSyncUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); + CosmosUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); CosmosUserDefinedFunctionProperties readUdf = container.getScripts() - .getUserDefinedFunction(udf.id()) + .getUserDefinedFunction(udf.getId()) .read() - .properties(); + .getProperties(); - readUdf.body("function() {var x = 11;}"); - CosmosSyncUserDefinedFunctionResponse replace = container.getScripts() - .getUserDefinedFunction(udf.id()) + readUdf.setBody("function() {var x = 11;}"); + CosmosUserDefinedFunctionResponse replace = container.getScripts() + .getUserDefinedFunction(udf.getId()) .replace(readUdf); validateResponse(udf, replace); @@ -87,18 +81,18 @@ public void replaceUDF() throws Exception { public void deleteUDF() throws Exception { CosmosUserDefinedFunctionProperties udf = getCosmosUserDefinedFunctionProperties(); - CosmosSyncUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); + CosmosUserDefinedFunctionResponse createResponse = container.getScripts().createUserDefinedFunction(udf); - CosmosSyncResponse delete = container.getScripts() - .getUserDefinedFunction(udf.id()) - .delete(); + container.getScripts() + .getUserDefinedFunction(udf.getId()) + .delete(); } private CosmosUserDefinedFunctionProperties getCosmosUserDefinedFunctionProperties() { CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); return udf; } @@ -109,7 +103,7 @@ public void readAllUDFs() throws Exception { container.getScripts().createUserDefinedFunction(udf); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator3 = container.getScripts().readAllUserDefinedFunctions(feedOptions); assertThat(feedResponseIterator3.hasNext()).isTrue(); @@ -120,9 +114,9 @@ public void queryUDFs() throws Exception { CosmosUserDefinedFunctionProperties properties = getCosmosUserDefinedFunctionProperties(); container.getScripts().createUserDefinedFunction(properties); - String query = String.format("SELECT * from c where c.id = '%s'", properties.id()); + String query = String.format("SELECT * from c where c.id = '%s'", properties.getId()); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator1 = container.getScripts().queryUserDefinedFunctions(query, feedOptions); @@ -135,12 +129,12 @@ public void queryUDFs() throws Exception { } private void validateResponse(CosmosUserDefinedFunctionProperties properties, - CosmosSyncUserDefinedFunctionResponse createResponse) { + CosmosUserDefinedFunctionResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(properties.id()); + .isEqualTo(properties.getId()); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncTriggerTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosTriggerTest.java similarity index 65% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncTriggerTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosTriggerTest.java index 5f505d99b272..97f0b6db9256 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncTriggerTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosTriggerTest.java @@ -1,16 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; -import com.azure.data.cosmos.TriggerOperation; -import com.azure.data.cosmos.TriggerType; +package com.azure.data.cosmos; + import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -22,21 +14,21 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosSyncTriggerTest extends TestSuiteBase { - private CosmosSyncClient client; - private CosmosSyncContainer container; +public class CosmosTriggerTest extends TestSuiteBase { + private CosmosClient client; + private CosmosContainer container; @Factory(dataProvider = "clientBuilders") - public CosmosSyncTriggerTest(CosmosClientBuilder clientBuilder) { + public CosmosTriggerTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = clientBuilder().buildSyncClient(); - CosmosContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); - container = client.getDatabase(asyncContainer.getDatabase().id()).getContainer(asyncContainer.id()); + this.client = clientBuilder().buildClient(); + CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); + container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); } @AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -49,7 +41,7 @@ public void afterClass() { public void createTrigger() throws Exception { CosmosTriggerProperties trigger = getCosmosTriggerProperties(); - CosmosSyncTriggerResponse triggerResponse = container.getScripts().createTrigger(trigger); + CosmosTriggerResponse triggerResponse = container.getScripts().createTrigger(trigger); validateResponse(trigger, triggerResponse); } @@ -60,7 +52,7 @@ public void readTrigger() throws Exception { container.getScripts().createTrigger(trigger); - CosmosSyncTriggerResponse readResponse = container.getScripts().getTrigger(trigger.id()).read(); + CosmosTriggerResponse readResponse = container.getScripts().getTrigger(trigger.getId()).read(); validateResponse(trigger, readResponse); } @@ -71,10 +63,10 @@ public void replaceTrigger() throws Exception { container.getScripts().createTrigger(trigger); - CosmosTriggerProperties readTrigger = container.getScripts().getTrigger(trigger.id()).read().properties(); - readTrigger.body("function() {var x = 11;}"); + CosmosTriggerProperties readTrigger = container.getScripts().getTrigger(trigger.getId()).read().getProperties(); + readTrigger.setBody("function() {var x = 11;}"); - CosmosSyncTriggerResponse replace = container.getScripts().getTrigger(trigger.id()).replace(readTrigger); + CosmosTriggerResponse replace = container.getScripts().getTrigger(trigger.getId()).replace(readTrigger); validateResponse(trigger, replace); } @@ -84,7 +76,7 @@ public void deleteTrigger() throws Exception { container.getScripts().createTrigger(trigger); - CosmosSyncResponse delete = container.getScripts().getTrigger(trigger.id()).delete(); + container.getScripts().getTrigger(trigger.getId()).delete(); } @@ -95,7 +87,7 @@ public void readAllTriggers() throws Exception { container.getScripts().createTrigger(trigger); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator3 = container.getScripts().readAllTriggers(feedOptions); assertThat(feedResponseIterator3.hasNext()).isTrue(); @@ -103,10 +95,10 @@ public void readAllTriggers() throws Exception { private CosmosTriggerProperties getCosmosTriggerProperties() { CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); return trigger; } @@ -114,8 +106,8 @@ private CosmosTriggerProperties getCosmosTriggerProperties() { public void queryTriggers() throws Exception { CosmosTriggerProperties properties = getCosmosTriggerProperties(); container.getScripts().createTrigger(properties); - String query = String.format("SELECT * from c where c.id = '%s'", properties.id()); - FeedOptions feedOptions = new FeedOptions().enableCrossPartitionQuery(true); + String query = String.format("SELECT * from c where c.id = '%s'", properties.getId()); + FeedOptions feedOptions = new FeedOptions().setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator1 = container.getScripts().queryTriggers(query, feedOptions); @@ -128,12 +120,12 @@ public void queryTriggers() throws Exception { } private void validateResponse(CosmosTriggerProperties properties, - CosmosSyncTriggerResponse createResponse) { + CosmosTriggerResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(properties.id()); + .isEqualTo(properties.getId()); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUserTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosUserTest.java similarity index 66% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUserTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosUserTest.java index e56a90202605..a72550240a7d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/sync/CosmosSyncUserTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosUserTest.java @@ -1,14 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlQuerySpec; +package com.azure.data.cosmos; + import com.azure.data.cosmos.rx.TestSuiteBase; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -22,21 +16,21 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosSyncUserTest extends TestSuiteBase { +public class CosmosUserTest extends TestSuiteBase { private String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private List databases = new ArrayList<>(); - private CosmosSyncClient client; - private CosmosSyncDatabase createdDatabase; + private CosmosClient client; + private CosmosDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") - public CosmosSyncUserTest(CosmosClientBuilder clientBuilder) { + public CosmosUserTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().buildSyncClient(); + client = clientBuilder().buildClient(); createdDatabase = createSyncDatabase(client, preExistingDatabaseId); } @@ -53,14 +47,14 @@ public void afterClass() { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void createUser() throws Exception { CosmosUserProperties user = getUserProperties(); - CosmosSyncUserResponse response = createdDatabase.createUser(user); + CosmosUserResponse response = createdDatabase.createUser(user); validateResponse(user, response); } private CosmosUserProperties getUserProperties() { CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); return user; } @@ -68,20 +62,20 @@ private CosmosUserProperties getUserProperties() { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readUser() throws Exception { CosmosUserProperties userProperties = getUserProperties(); - CosmosSyncUserResponse response = createdDatabase.createUser(userProperties); + CosmosUserResponse response = createdDatabase.createUser(userProperties); - CosmosSyncUser user = createdDatabase.getUser(userProperties.id()); - CosmosSyncUserResponse readResponse = user.read(); + CosmosUser user = createdDatabase.getUser(userProperties.getId()); + CosmosUserResponse readResponse = user.read(); validateResponse(userProperties, readResponse); } @Test(groups = { "simple" }, timeOut = TIMEOUT) public void deleteUser() throws Exception { CosmosUserProperties userProperties = getUserProperties(); - CosmosSyncUserResponse response = createdDatabase.createUser(userProperties); + CosmosUserResponse response = createdDatabase.createUser(userProperties); - CosmosSyncUser user = createdDatabase.getUser(userProperties.id()); - CosmosSyncUserResponse delete = user.delete(); + CosmosUser user = createdDatabase.getUser(userProperties.getId()); + CosmosUserResponse delete = user.delete(); } @@ -90,7 +84,7 @@ public void deleteUser() throws Exception { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void readAllUsers() throws Exception{ CosmosUserProperties userProperties = getUserProperties(); - CosmosSyncUserResponse response = createdDatabase.createUser(userProperties); + CosmosUserResponse response = createdDatabase.createUser(userProperties); Iterator> feedResponseIterator = createdDatabase.readAllUsers(); assertThat(feedResponseIterator.hasNext()).isTrue(); @@ -104,10 +98,10 @@ public void readAllUsers() throws Exception{ @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryUsers() throws Exception{ CosmosUserProperties userProperties = getUserProperties(); - CosmosSyncUserResponse response = createdDatabase.createUser(userProperties); + CosmosUserResponse response = createdDatabase.createUser(userProperties); - String query = String.format("SELECT * from c where c.id = '%s'", userProperties.id()); - FeedOptions feedOptions = new FeedOptions().enableCrossPartitionQuery(true); + String query = String.format("SELECT * from c where c.id = '%s'", userProperties.getId()); + FeedOptions feedOptions = new FeedOptions().setEnableCrossPartitionQuery(true); Iterator> feedResponseIterator1 = createdDatabase.queryUsers(query, feedOptions); @@ -121,12 +115,12 @@ public void queryUsers() throws Exception{ } private void validateResponse(CosmosUserProperties properties, - CosmosSyncUserResponse createResponse) { + CosmosUserResponse createResponse) { // Basic validation - assertThat(createResponse.properties().id()).isNotNull(); - assertThat(createResponse.properties().id()) + assertThat(createResponse.getProperties().getId()).isNotNull(); + assertThat(createResponse.getProperties().getId()) .as("check Resource Id") - .isEqualTo(properties.id()); + .isEqualTo(properties.getId()); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java index 54e696730676..fc41a3ac6333 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentClientTest.java @@ -40,7 +40,7 @@ public final void setTestName(Method method) { method.getName()); if (this.clientBuilder.getConnectionPolicy() != null && this.clientBuilder.getConfigs() != null) { - String connectionMode = this.clientBuilder.getConnectionPolicy().connectionMode() == ConnectionMode.DIRECT + String connectionMode = this.clientBuilder.getConnectionPolicy().getConnectionMode() == ConnectionMode.DIRECT ? "Direct " + this.clientBuilder.getConfigs().getProtocol() : "Gateway"; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java similarity index 75% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java index c2780f77e6d8..faa43012590b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentCollectionTests.java @@ -18,7 +18,7 @@ public class DocumentCollectionTests { public void getPartitionKey() { DocumentCollection collection = new DocumentCollection(); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); - partitionKeyDefinition.paths(ImmutableList.of("/mypk")); + partitionKeyDefinition.setPaths(ImmutableList.of("/mypk")); collection.setPartitionKey(partitionKeyDefinition); assertThat(collection.getPartitionKey()).isEqualTo(partitionKeyDefinition); } @@ -27,14 +27,14 @@ public void getPartitionKey() { public void getPartitionKey_serializeAndDeserialize() { DocumentCollection collection = new DocumentCollection(); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); - partitionKeyDefinition.paths(ImmutableList.of("/mypk")); - partitionKeyDefinition.version(PartitionKeyDefinitionVersion.V2); + partitionKeyDefinition.setPaths(ImmutableList.of("/mypk")); + partitionKeyDefinition.setVersion(PartitionKeyDefinitionVersion.V2); collection.setPartitionKey(partitionKeyDefinition); DocumentCollection parsedColl = new DocumentCollection(collection.toJson()); - assertThat(parsedColl.getPartitionKey().kind().toString()).isEqualTo(partitionKeyDefinition.kind().toString()); - assertThat(parsedColl.getPartitionKey().paths()).isEqualTo(partitionKeyDefinition.paths()); - assertThat(parsedColl.getPartitionKey().version()).isEqualTo(partitionKeyDefinition.version()); + assertThat(parsedColl.getPartitionKey().getKind().toString()).isEqualTo(partitionKeyDefinition.getKind().toString()); + assertThat(parsedColl.getPartitionKey().getPaths()).isEqualTo(partitionKeyDefinition.getPaths()); + assertThat(parsedColl.getPartitionKey().getVersion()).isEqualTo(partitionKeyDefinition.getVersion()); } @Test(groups = { "unit"}) @@ -43,7 +43,7 @@ public void indexingPolicy_serializeAndDeserialize() { List spatialSpecList = new ArrayList<>(); spatialSpecList.add(spatialSpec); IndexingPolicy indexingPolicy = new IndexingPolicy(); - indexingPolicy.spatialIndexes(spatialSpecList); + indexingPolicy.setSpatialIndexes(spatialSpecList); DocumentCollection documentCollection = new DocumentCollection(); documentCollection.setIndexingPolicy(indexingPolicy); String json = documentCollection.toJson(); @@ -51,7 +51,7 @@ public void indexingPolicy_serializeAndDeserialize() { DocumentCollection documentCollectionPostSerialization = new DocumentCollection(json); IndexingPolicy indexingPolicyPostSerialization = documentCollectionPostSerialization.getIndexingPolicy(); assertThat(indexingPolicyPostSerialization).isNotNull(); - List spatialSpecListPostSerialization = indexingPolicyPostSerialization.spatialIndexes(); + List spatialSpecListPostSerialization = indexingPolicyPostSerialization.getSpatialIndexes(); assertThat(spatialSpecListPostSerialization).isNotNull(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java index 41941bfa8ed6..81a7508222cc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/DocumentTests.java @@ -19,6 +19,6 @@ public void timestamp() { Document d = new Document(); OffsetDateTime time = OffsetDateTime.of(2019, 8, 6, 12, 53, 29, 0, ZoneOffset.UTC); setTimestamp(d, time); - assertThat(d.timestamp()).isEqualTo(time); + assertThat(d.getTimestamp()).isEqualTo(time); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/GatewayTestUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/GatewayTestUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/GatewayTestUtils.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/GatewayTestUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java index bcfc0fe73466..685f86cc3f07 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/IncludedPathTest.java @@ -28,9 +28,9 @@ public void deserialize() { " ]" + "}"; IncludedPath path = new IncludedPath(json); - Collection indexes = path.indexes(); + Collection indexes = path.getIndexes(); assertThat(indexes).hasSize(2); assertThat(indexes).usingFieldByFieldElementComparator().contains(Index.Range(DataType.STRING, -1)); assertThat(indexes).usingFieldByFieldElementComparator().contains(Index.Range(DataType.NUMBER, -1)); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java index 07cc35d98a96..265a190b9d25 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/JsonSerializableTests.java @@ -87,10 +87,10 @@ public void getObjectAndCastToClass() { // JsonSerializable Document innerDocument = new Document(); - innerDocument.id("innerDocument"); + innerDocument.setId("innerDocument"); setProperty(document, "innerDocument", innerDocument); Document readInnerDocument = document.getObject("innerDocument", Document.class); - assertThat(readInnerDocument.id()).isEqualTo(innerDocument.id()); + assertThat(readInnerDocument.getId()).isEqualTo(innerDocument.getId()); } @Test(groups = { "unit" }) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java index 059ddcbde846..7dd78a41a535 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PartitionKeyHashingTests.java @@ -39,8 +39,8 @@ public void effectivePartitionKeyHashV1() { for (Map.Entry entry : keyToEffectivePartitionKeyString.entrySet()) { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); - partitionKeyDef.kind(PartitionKind.HASH); - partitionKeyDef.paths(Arrays.asList(new String[]{"\\id"})); + partitionKeyDef.setKind(PartitionKind.HASH); + partitionKeyDef.setPaths(Arrays.asList(new String[]{"\\id"})); String actualEffectiveKeyString = PartitionKeyInternalHelper.getEffectivePartitionKeyString(new PartitionKey(entry.getKey()).getInternalPartitionKey(),partitionKeyDef, true); assertThat(entry.getValue()).isEqualTo(actualEffectiveKeyString); } @@ -69,9 +69,9 @@ public void effectivePartitionKeyHashV2() { for (Map.Entry entry : keyToEffectivePartitionKeyString.entrySet()) { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); - partitionKeyDef.kind(PartitionKind.HASH); - partitionKeyDef.version(PartitionKeyDefinitionVersion.V2); - partitionKeyDef.paths(Arrays.asList(new String[]{"\\id"})); + partitionKeyDef.setKind(PartitionKind.HASH); + partitionKeyDef.setVersion(PartitionKeyDefinitionVersion.V2); + partitionKeyDef.setPaths(Arrays.asList(new String[]{"\\id"})); String actualEffectiveKeyString = PartitionKeyInternalHelper.getEffectivePartitionKeyString(new PartitionKey(entry.getKey()).getInternalPartitionKey(),partitionKeyDef, true); assertThat(entry.getValue()).isEqualTo(actualEffectiveKeyString); } @@ -81,17 +81,17 @@ public void effectivePartitionKeyHashV2() { public void hashV2PartitionKeyDeserialization() { String partitionKeyDefinitionStr = "{\"paths\":[\"/pk\"],\"kind\":\"Hash\",\"version\":2}"; PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(partitionKeyDefinitionStr); - assertThat(partitionKeyDef.version()).isEqualTo(PartitionKeyDefinitionVersion.V2); - assertThat(partitionKeyDef.kind()).isEqualTo(PartitionKind.HASH); - assertThat(partitionKeyDef.paths().toArray()[0]).isEqualTo("/pk"); + assertThat(partitionKeyDef.getVersion()).isEqualTo(PartitionKeyDefinitionVersion.V2); + assertThat(partitionKeyDef.getKind()).isEqualTo(PartitionKind.HASH); + assertThat(partitionKeyDef.getPaths().toArray()[0]).isEqualTo("/pk"); } @Test(groups = "unit") public void hashV1PartitionKeyDeserialization() { String partitionKeyDefinitionStr = "{\"paths\":[\"/pk\"],\"kind\":\"Hash\"}"; PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(partitionKeyDefinitionStr); - assertThat(partitionKeyDef.version()).isNull(); - assertThat(partitionKeyDef.kind()).isEqualTo(PartitionKind.HASH); - assertThat(partitionKeyDef.paths().toArray()[0]).isEqualTo("/pk"); + assertThat(partitionKeyDef.getVersion()).isNull(); + assertThat(partitionKeyDef.getKind()).isEqualTo(PartitionKind.HASH); + assertThat(partitionKeyDef.getPaths().toArray()[0]).isEqualTo("/pk"); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java index 5e8e81dec555..ae5910273dc6 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/PermissionTest.java @@ -21,4 +21,4 @@ public void deserialize() { assertThat(p.getResourcePartitionKey()).isEqualToComparingFieldByField(new PartitionKey("/id")); assertThat(p.getPermissionMode()).isEqualTo(PermissionMode.READ); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ResourceIdTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ResourceIdTests.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/ResourceIdTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/ResourceIdTests.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ClientRetryPolicyTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ClientRetryPolicyTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ClientRetryPolicyTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ClientRetryPolicyTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsBuilder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsBuilder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsTests.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConfigsTests.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java index ff584cac21bb..7a93681571d9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests1.java @@ -30,7 +30,7 @@ public void validateStrongConsistencyOnSyncReplication() throws Exception { } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -41,8 +41,8 @@ public void validateStrongConsistencyOnSyncReplication() throws Exception { .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.STRONG).build(); User userDefinition = getUserDefinition(); - userDefinition.id(userDefinition.id() + "validateStrongConsistencyOnSyncReplication"); - User user = safeCreateUser(this.initClient, createdDatabase.id(), userDefinition); + userDefinition.setId(userDefinition.getId() + "validateStrongConsistencyOnSyncReplication"); + User user = safeCreateUser(this.initClient, createdDatabase.getId(), userDefinition); validateStrongConsistency(user); } @@ -52,7 +52,7 @@ public void validateConsistentLSNForDirectTCPClient() { //TODO Need to test with TCP protocol // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/355057 ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -68,7 +68,7 @@ public void validateConsistentLSNForDirectTCPClient() { @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateConsistentLSNForDirectHttpsClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -86,7 +86,7 @@ public void validateConsistentLSNAndQuorumAckedLSNForDirectTCPClient() { //TODO Need to test with TCP protocol //https://msdata.visualstudio.com/CosmosDB/_workitems/edit/355057 ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -120,7 +120,7 @@ public void validateBoundedStalenessDynamicQuorumSyncReplication() { @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateConsistentLSNAndQuorumAckedLSNForDirectHttpsClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -167,7 +167,7 @@ public void validateConsistentPrefixOnSyncReplication() throws InterruptedExcept } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -177,7 +177,7 @@ public void validateConsistentPrefixOnSyncReplication() throws InterruptedExcept .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS).build(); - User user = safeCreateUser(this.initClient, createdDatabase.id(), getUserDefinition()); + User user = safeCreateUser(this.initClient, createdDatabase.getId(), getUserDefinition()); boolean readLagging = validateConsistentPrefix(user); assertThat(readLagging).isFalse(); } @@ -191,7 +191,7 @@ public void validateConsistentPrefixOnAsyncReplication() throws InterruptedExcep } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -204,7 +204,7 @@ public void validateConsistentPrefixOnAsyncReplication() throws InterruptedExcep .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) .build(); Document documentDefinition = getDocumentDefinition(); - Document document = createDocument(this.initClient, createdDatabase.id(), createdCollection.id(), documentDefinition); + Document document = createDocument(this.initClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); boolean readLagging = validateConsistentPrefix(document); //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off } @@ -240,9 +240,9 @@ private void validateSubstatusCodeOnNotFoundExceptionInSessionReadAsync(boolean ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } AsyncDocumentClient client = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -251,28 +251,28 @@ private void validateSubstatusCodeOnNotFoundExceptionInSessionReadAsync(boolean .build(); try { DocumentCollection documentCollection = new DocumentCollection(); - documentCollection.id(UUID.randomUUID().toString()); + documentCollection.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); - partitionKeyDefinition.kind(PartitionKind.HASH); + partitionKeyDefinition.setKind(PartitionKind.HASH); ArrayList paths = new ArrayList(); paths.add("/id"); - partitionKeyDefinition.paths(paths); + partitionKeyDefinition.setPaths(paths); documentCollection.setPartitionKey(partitionKeyDefinition); - DocumentCollection collection = client.createCollection(createdDatabase.selfLink(), documentCollection + DocumentCollection collection = client.createCollection(createdDatabase.getSelfLink(), documentCollection , null).blockFirst().getResource(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey("1")); Document documentDefinition = new Document(); - documentDefinition.id("1"); - Document document = client.createDocument(collection.selfLink(), documentDefinition, requestOptions, false).blockFirst().getResource(); + documentDefinition.setId("1"); + Document document = client.createDocument(collection.getSelfLink(), documentDefinition, requestOptions, false).blockFirst().getResource(); - Flux> deleteObservable = client.deleteDocument(document.selfLink(), requestOptions); + Flux> deleteObservable = client.deleteDocument(document.getSelfLink(), requestOptions); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); - Flux> readObservable = client.readDocument(document.selfLink(), requestOptions); + Flux> readObservable = client.readDocument(document.getSelfLink(), requestOptions); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().unknownSubStatusCode().build(); validateFailure(readObservable, notFoundValidator); @@ -283,7 +283,7 @@ private void validateSubstatusCodeOnNotFoundExceptionInSessionReadAsync(boolean private static User getUserDefinition() { User user = new User(); - user.id(USER_NAME); + user.setId(USER_NAME); return user; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java index 9a0959f6cd87..634a4b4c1acf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTests2.java @@ -29,7 +29,7 @@ public class ConsistencyTests2 extends ConsistencyTestsBase { @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateReadSessionOnAsyncReplication() throws InterruptedException { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -40,7 +40,7 @@ public void validateReadSessionOnAsyncReplication() throws InterruptedException .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); - Document document = this.initClient.createDocument(createdCollection.selfLink(), getDocumentDefinition(), + Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), null, false).blockFirst().getResource(); Thread.sleep(5000);//WaitForServerReplication boolean readLagging = this.validateReadSession(document); @@ -50,7 +50,7 @@ public void validateReadSessionOnAsyncReplication() throws InterruptedException @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateWriteSessionOnAsyncReplication() throws InterruptedException { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -61,7 +61,7 @@ public void validateWriteSessionOnAsyncReplication() throws InterruptedException .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); - Document document = this.initClient.createDocument(createdCollection.selfLink(), getDocumentDefinition(), + Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), null, false).blockFirst().getResource(); Thread.sleep(5000);//WaitForServerReplication boolean readLagging = this.validateWriteSession(document); @@ -157,7 +157,7 @@ public void validateSessionTokenFromCollectionReplaceIsServerToken() { public void validateNoChargeOnFailedSessionRead() throws Exception { // DIRECT clients for read and write operations ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -171,22 +171,22 @@ public void validateNoChargeOnFailedSessionRead() throws Exception { .build(); try { // CREATE collection - DocumentCollection parentResource = writeClient.createCollection(createdDatabase.selfLink(), + DocumentCollection parentResource = writeClient.createCollection(createdDatabase.getSelfLink(), getCollectionDefinition(), null).blockFirst().getResource(); // Document to lock pause/resume clients Document documentDefinition = getDocumentDefinition(); - documentDefinition.id("test" + documentDefinition.id()); - ResourceResponse childResource = writeClient.createDocument(parentResource.selfLink(), documentDefinition, null, true).blockFirst(); - logger.info("Created {} child resource", childResource.getResource().resourceId()); + documentDefinition.setId("test" + documentDefinition.getId()); + ResourceResponse childResource = writeClient.createDocument(parentResource.getSelfLink(), documentDefinition, null, true).blockFirst(); + logger.info("Created {} child resource", childResource.getResource().getResourceId()); String token = childResource.getSessionToken().split(":")[0] + ":" + this.createSessionToken(SessionTokenHelper.parse(childResource.getSessionToken()), 100000000).convertToString(); FeedOptions feedOptions = new FeedOptions(); feedOptions.partitionKey(new PartitionKey(PartitionKeyInternal.Empty.toJson())); - feedOptions.sessionToken(token); + feedOptions.setSessionToken(token); FailureValidator validator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.NOTFOUND).subStatusCode(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE).build(); - Flux> feedObservable = readSecondaryClient.readDocuments(parentResource.selfLink(), feedOptions); + Flux> feedObservable = readSecondaryClient.readDocuments(parentResource.getSelfLink(), feedOptions); validateQueryFailure(feedObservable, validator); } finally { safeClose(writeClient); @@ -217,7 +217,7 @@ public void validateSessionTokenAsync() { } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); RxDocumentClientImpl client = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -225,38 +225,38 @@ public void validateSessionTokenAsync() { .build(); try { - Document lastDocument = client.createDocument(createdCollection.selfLink(), getDocumentDefinition(), + Document lastDocument = client.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), null, true) .blockFirst() .getResource(); - Mono task1 = ParallelAsync.forEachAsync(Range.between(0, 1000), 5, index -> client.createDocument(createdCollection.selfLink(), documents.get(index % documents.size()), + Mono task1 = ParallelAsync.forEachAsync(Range.between(0, 1000), 5, index -> client.createDocument(createdCollection.getSelfLink(), documents.get(index % documents.size()), null, true) .blockFirst()); Mono task2 = ParallelAsync.forEachAsync(Range.between(0, 1000), 5, index -> { try { FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); - FeedResponse queryResponse = client.queryDocuments(createdCollection.selfLink(), + feedOptions.setEnableCrossPartitionQuery(true); + FeedResponse queryResponse = client.queryDocuments(createdCollection.getSelfLink(), "SELECT * FROM c WHERE c.Id = " + "'foo'", feedOptions) .blockFirst(); - String lsnHeaderValue = queryResponse.responseHeaders().get(WFConstants.BackendHeaders.LSN); + String lsnHeaderValue = queryResponse.getResponseHeaders().get(WFConstants.BackendHeaders.LSN); long lsn = Long.valueOf(lsnHeaderValue); - String sessionTokenHeaderValue = queryResponse.responseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); + String sessionTokenHeaderValue = queryResponse.getResponseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); ISessionToken sessionToken = SessionTokenHelper.parse(sessionTokenHeaderValue); logger.info("SESSION Token = {}, LSN = {}", sessionToken.convertToString(), lsn); assertThat(lsn).isEqualTo(sessionToken.getLSN()); } catch (Exception ex) { CosmosClientException clientException = (CosmosClientException) ex.getCause(); - if (clientException.statusCode() != 0) { - if (clientException.statusCode() == HttpConstants.StatusCodes.REQUEST_TIMEOUT) { + if (clientException.getStatusCode() != 0) { + if (clientException.getStatusCode() == HttpConstants.StatusCodes.REQUEST_TIMEOUT) { // ignore - } else if (clientException.statusCode() == HttpConstants.StatusCodes.NOTFOUND) { - String lsnHeaderValue = clientException.responseHeaders().get(WFConstants.BackendHeaders.LSN); + } else if (clientException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { + String lsnHeaderValue = clientException.getResponseHeaders().get(WFConstants.BackendHeaders.LSN); long lsn = Long.valueOf(lsnHeaderValue); - String sessionTokenHeaderValue = clientException.responseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); + String sessionTokenHeaderValue = clientException.getResponseHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN); ISessionToken sessionToken = SessionTokenHelper.parse(sessionTokenHeaderValue); logger.info("SESSION Token = {}, LSN = {}", sessionToken.convertToString(), lsn); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java similarity index 84% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java index 5b13cf8c0470..d2d1ddc76a69 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ConsistencyTestsBase.java @@ -54,20 +54,20 @@ void validateStrongConsistency(Resource resourceToWorkWith) throws Exception { Resource writeResource = resourceToWorkWith; while (numberOfTestIteration-- > 0) //Write from a client and do point read through second client and ensure TS matches. { - OffsetDateTime sourceTimestamp = writeResource.timestamp(); + OffsetDateTime sourceTimestamp = writeResource.getTimestamp(); Thread.sleep(1000); //Timestamp is in granularity of seconds. Resource updatedResource = null; if (resourceToWorkWith instanceof User) { - updatedResource = this.writeClient.upsertUser(createdDatabase.selfLink(), (User) writeResource, null).blockFirst().getResource(); + updatedResource = this.writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, null).blockFirst().getResource(); } else if (resourceToWorkWith instanceof Document) { RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); - updatedResource = this.writeClient.upsertDocument(createdCollection.selfLink(), (Document) writeResource, options, false).blockFirst().getResource(); + updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), (Document) writeResource, options, false).blockFirst().getResource(); } - assertThat(updatedResource.timestamp().isAfter(sourceTimestamp)).isTrue(); + assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); - User readResource = this.readClient.readUser(resourceToWorkWith.selfLink(), null).blockFirst().getResource(); - assertThat(updatedResource.timestamp().equals(readResource.timestamp())); + User readResource = this.readClient.readUser(resourceToWorkWith.getSelfLink(), null).blockFirst().getResource(); + assertThat(updatedResource.getTimestamp().equals(readResource.getTimestamp())); } } @@ -75,14 +75,14 @@ void validateConsistentLSN() { Document documentDefinition = getDocumentDefinition(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentDefinition.get("mypk"))); - Document document = createDocument(this.writeClient, createdDatabase.id(), createdCollection.id(), documentDefinition); - ResourceResponse response = this.writeClient.deleteDocument(document.selfLink(), options).single().block(); + Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + ResourceResponse response = this.writeClient.deleteDocument(document.getSelfLink(), options).single().block(); assertThat(response.getStatusCode()).isEqualTo(204); long quorumAckedLSN = Long.parseLong((String) response.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); assertThat(quorumAckedLSN > 0).isTrue(); FailureValidator validator = new FailureValidator.Builder().statusCode(404).lsnGreaterThan(quorumAckedLSN).build(); - Flux> readObservable = this.readClient.readDocument(document.selfLink(), options); + Flux> readObservable = this.readClient.readDocument(document.getSelfLink(), options); validateFailure(readObservable, validator); } @@ -90,15 +90,15 @@ void validateConsistentLSNAndQuorumAckedLSN() { Document documentDefinition = getDocumentDefinition(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentDefinition.get("mypk"))); - Document document = createDocument(this.writeClient, createdDatabase.id(), createdCollection.id(), documentDefinition); - ResourceResponse response = this.writeClient.deleteDocument(document.selfLink(), options).single().block(); + Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + ResourceResponse response = this.writeClient.deleteDocument(document.getSelfLink(), options).single().block(); assertThat(response.getStatusCode()).isEqualTo(204); long quorumAckedLSN = Long.parseLong((String) response.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); assertThat(quorumAckedLSN > 0).isTrue(); FailureValidator validator = new FailureValidator.Builder().statusCode(404).lsnGreaterThanEqualsTo(quorumAckedLSN).exceptionQuorumAckedLSNInNotNull().build(); - Flux> readObservable = this.readClient.deleteDocument(document.selfLink(), options); + Flux> readObservable = this.readClient.deleteDocument(document.getSelfLink(), options); validateFailure(readObservable, validator); } @@ -116,7 +116,7 @@ void validateStrongConsistencyOnAsyncReplication(boolean useGateway) throws Inte ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } this.writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) @@ -130,7 +130,7 @@ void validateStrongConsistencyOnAsyncReplication(boolean useGateway) throws Inte .withConsistencyLevel(ConsistencyLevel.STRONG).build(); Document documentDefinition = getDocumentDefinition(); - Document document = createDocument(this.writeClient, createdDatabase.id(), createdCollection.id(), documentDefinition); + Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); validateStrongConsistency(document); } @@ -138,15 +138,15 @@ void validateStrongConsistency(Document documentToWorkWith) throws InterruptedEx int numberOfTestIteration = 5; Document writeDocument = documentToWorkWith; while (numberOfTestIteration-- > 0) { - OffsetDateTime sourceTimestamp = writeDocument.timestamp(); + OffsetDateTime sourceTimestamp = writeDocument.getTimestamp(); Thread.sleep(1000);//Timestamp is in granularity of seconds. RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentToWorkWith.get("mypk"))); Document updatedDocument = this.writeClient.replaceDocument(writeDocument, options).blockFirst().getResource(); - assertThat(updatedDocument.timestamp().isAfter(sourceTimestamp)).isTrue(); + assertThat(updatedDocument.getTimestamp().isAfter(sourceTimestamp)).isTrue(); - Document readDocument = this.readClient.readDocument(documentToWorkWith.selfLink(), options).blockFirst().getResource(); - assertThat(updatedDocument.timestamp().equals(readDocument.timestamp())); + Document readDocument = this.readClient.readDocument(documentToWorkWith.getSelfLink(), options).blockFirst().getResource(); + assertThat(updatedDocument.getTimestamp().equals(readDocument.getTimestamp())); } } @@ -154,9 +154,9 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { // DIRECT clients for read and write operations ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) @@ -166,31 +166,31 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { try { PartitionKeyDefinition partitionKey = new PartitionKeyDefinition(); - partitionKey.paths(Arrays.asList("/customerid")); - partitionKey.kind(PartitionKind.HASH); + partitionKey.setPaths(Arrays.asList("/customerid")); + partitionKey.setKind(PartitionKind.HASH); DocumentCollection coll = null; { // self link - ResourceResponse collection = writeClient.createCollection(createdDatabase.selfLink(), getCollectionDefinition(), null).blockFirst(); - String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(collection.getResource().selfLink()); + ResourceResponse collection = writeClient.createCollection(createdDatabase.getSelfLink(), getCollectionDefinition(), null).blockFirst(); + String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(collection.getResource().getSelfLink()); String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(BridgeInternal.getAltLink(collection.getResource())); System.out.println("BridgeInternal.getAltLink(collection.getResource()) " + BridgeInternal.getAltLink(collection.getResource())); assertThat(collection.getSessionToken()).isEqualTo(globalSessionToken1); assertThat(collection.getSessionToken()).isEqualTo(globalSessionToken2); coll = collection.getResource(); - ResourceResponse collectionRead = writeClient.readCollection(coll.selfLink(), null).blockFirst(); - // timesync might bump the version, comment out the check - //assertThat(collection.sessionToken()).isEqualTo(collectionRead.sessionToken()); + ResourceResponse collectionRead = writeClient.readCollection(coll.getSelfLink(), null).blockFirst(); + // timesync might bump the getVersion, comment out the check + //assertThat(collection.getSessionToken()).isEqualTo(collectionRead.getSessionToken()); } { // name link ResourceResponse collection = writeClient.createCollection(BridgeInternal.getAltLink(createdDatabase), getCollectionDefinition(), null).blockFirst(); - String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(collection.getResource().selfLink()); + String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(collection.getResource().getSelfLink()); String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(BridgeInternal.getAltLink(collection.getResource())); assertThat(collection.getSessionToken()).isEqualTo(globalSessionToken1); - //assertThat(collection.sessionToken()).isEqualTo(globalSessionToken2); + //assertThat(collection.getSessionToken()).isEqualTo(globalSessionToken2); ResourceResponse collectionRead = writeClient.readCollection(BridgeInternal.getAltLink(collection.getResource()), null).blockFirst(); @@ -199,13 +199,13 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { } { Document document2 = new Document(); - document2.id("test" + UUID.randomUUID().toString()); + document2.setId("test" + UUID.randomUUID().toString()); BridgeInternal.setProperty(document2, "customerid", 2); // name link ResourceResponse document = writeClient.createDocument(BridgeInternal.getAltLink(coll), document2, null, false) .blockFirst(); - String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(coll.selfLink()); + String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(coll.getSelfLink()); String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(BridgeInternal.getAltLink(coll)); assertThat(globalSessionToken1.indexOf(document.getSessionToken())).isNotNegative(); @@ -213,13 +213,13 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { } { Document document2 = new Document(); - document2.id("test" + UUID.randomUUID().toString()); + document2.setId("test" + UUID.randomUUID().toString()); BridgeInternal.setProperty(document2, "customerid", 3); // name link ResourceResponse document = writeClient.createDocument(BridgeInternal.getAltLink(coll), document2, null, false) .blockFirst(); - String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(coll.selfLink()); + String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(coll.getSelfLink()); String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(BridgeInternal.getAltLink(coll)); assertThat(globalSessionToken1.indexOf(document.getSessionToken())).isNotNegative(); @@ -232,43 +232,43 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { boolean validateConsistentPrefix(Resource resourceToWorkWith) throws InterruptedException { int numberOfTestIteration = 5; - OffsetDateTime lastReadDateTime = resourceToWorkWith.timestamp(); + OffsetDateTime lastReadDateTime = resourceToWorkWith.getTimestamp(); boolean readLagging = false; Resource writeResource = resourceToWorkWith; while (numberOfTestIteration-- > 0) { //Write from a client and do point read through second client and ensure TS monotonically increases. - OffsetDateTime sourceTimestamp = writeResource.timestamp(); + OffsetDateTime sourceTimestamp = writeResource.getTimestamp(); Thread.sleep(1000); //Timestamp is in granularity of seconds. Resource updatedResource = null; if (resourceToWorkWith instanceof User) { - updatedResource = this.writeClient.upsertUser(createdDatabase.selfLink(), (User) writeResource, + updatedResource = this.writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, null) .blockFirst() .getResource(); } else if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.selfLink(), + updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), (Document) writeResource, null, false) .blockFirst() .getResource(); } - assertThat(updatedResource.timestamp().isAfter(sourceTimestamp)).isTrue(); + assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); writeResource = updatedResource; Resource readResource = null; if (resourceToWorkWith instanceof User) { - readResource = this.readClient.readUser(resourceToWorkWith.selfLink(), null) + readResource = this.readClient.readUser(resourceToWorkWith.getSelfLink(), null) .blockFirst() .getResource(); } else if (resourceToWorkWith instanceof Document) { RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); - readResource = this.readClient.readDocument(resourceToWorkWith.selfLink(), options) + readResource = this.readClient.readDocument(resourceToWorkWith.getSelfLink(), options) .blockFirst() .getResource(); } - assertThat(readResource.timestamp().compareTo(lastReadDateTime) >= 0).isTrue(); - lastReadDateTime = readResource.timestamp(); - if (readResource.timestamp().isBefore(updatedResource.timestamp())) { + assertThat(readResource.getTimestamp().compareTo(lastReadDateTime) >= 0).isTrue(); + lastReadDateTime = readResource.getTimestamp(); + if (readResource.getTimestamp().isBefore(updatedResource.getTimestamp())) { readLagging = true; } } @@ -282,29 +282,29 @@ boolean validateReadSession(Resource resourceToWorkWith) throws InterruptedExcep Resource writeResource = resourceToWorkWith; while (numberOfTestIteration-- > 0) { - OffsetDateTime sourceTimestamp = writeResource.timestamp(); + OffsetDateTime sourceTimestamp = writeResource.getTimestamp(); Thread.sleep(1000); Resource updatedResource = null; if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.selfLink(), writeResource, + updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, null, false) .single() .block() .getResource(); } - assertThat(updatedResource.timestamp().isAfter(sourceTimestamp)).isTrue(); + assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); writeResource = updatedResource; Resource readResource = null; RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); if (resourceToWorkWith instanceof Document) { - readResource = this.readClient.readDocument(resourceToWorkWith.selfLink(), requestOptions).blockFirst().getResource(); + readResource = this.readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions).blockFirst().getResource(); } - assertThat(readResource.timestamp().compareTo(lastReadDateTime) >= 0).isTrue(); - lastReadDateTime = readResource.timestamp(); + assertThat(readResource.getTimestamp().compareTo(lastReadDateTime) >= 0).isTrue(); + lastReadDateTime = readResource.getTimestamp(); - if (readResource.timestamp().isBefore(updatedResource.timestamp())) { + if (readResource.getTimestamp().isBefore(updatedResource.getTimestamp())) { readLagging = true; } } @@ -318,13 +318,13 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce Resource writeResource = resourceToWorkWith; while (numberOfTestIteration-- > 0) { - OffsetDateTime sourceTimestamp = writeResource.timestamp(); + OffsetDateTime sourceTimestamp = writeResource.getTimestamp(); Thread.sleep(1000); Resource updatedResource = null; if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.selfLink(), writeResource, null, false).single().block().getResource(); + updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, null, false).single().block().getResource(); } - assertThat(updatedResource.timestamp().isAfter(sourceTimestamp)).isTrue(); + assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); writeResource = updatedResource; Resource readResource = null; @@ -332,27 +332,27 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce requestOptions.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); if (resourceToWorkWith instanceof Document) { readResource = - this.readClient.readDocument(resourceToWorkWith.selfLink(), requestOptions) + this.readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions) .blockFirst() .getResource(); } - assertThat(readResource.timestamp().compareTo(lastReadDateTime) >= 0).isTrue(); - lastReadDateTime = readResource.timestamp(); + assertThat(readResource.getTimestamp().compareTo(lastReadDateTime) >= 0).isTrue(); + lastReadDateTime = readResource.getTimestamp(); - if (readResource.timestamp().isBefore(updatedResource.timestamp())) { + if (readResource.getTimestamp().isBefore(updatedResource.getTimestamp())) { readLagging = true; } //Now perform write on session and update our session token and lastReadTS Thread.sleep(1000); if (resourceToWorkWith instanceof Document) { - readResource = this.writeClient.upsertDocument(createdCollection.selfLink(), readResource, + readResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), readResource, requestOptions, false) .blockFirst() .getResource(); //Now perform write on session } - assertThat(readResource.timestamp().isAfter(lastReadDateTime)); + assertThat(readResource.getTimestamp().isAfter(lastReadDateTime)); this.readClient.setSession(this.writeClient.getSession()); } @@ -362,9 +362,9 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce void validateSessionContainerAfterCollectionDeletion(boolean useGateway) throws Exception { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl client1 = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -380,68 +380,68 @@ void validateSessionContainerAfterCollectionDeletion(boolean useGateway) throws String collectionId = UUID.randomUUID().toString(); try { DocumentCollection collectionDefinition = getCollectionDefinition(); - collectionDefinition.id(collectionId); - DocumentCollection collection = createCollection(client2, createdDatabase.id(), collectionDefinition, null); + collectionDefinition.setId(collectionId); + DocumentCollection collection = createCollection(client2, createdDatabase.getId(), collectionDefinition, null); ResourceResponseValidator successValidatorCollection = new ResourceResponseValidator.Builder() - .withId(collection.id()) + .withId(collection.getId()) .build(); - Flux> readObservableCollection = client2.readCollection(collection.selfLink(), null); + Flux> readObservableCollection = client2.readCollection(collection.getSelfLink(), null); validateSuccess(readObservableCollection, successValidatorCollection); for (int i = 0; i < 5; i++) { String documentId = "Generation1-" + i; Document documentDefinition = getDocumentDefinition(); - documentDefinition.id(documentId); - Document documentCreated = client2.createDocument(collection.selfLink(), documentDefinition, null, true).blockFirst().getResource(); + documentDefinition.setId(documentId); + Document documentCreated = client2.createDocument(collection.getSelfLink(), documentDefinition, null, true).blockFirst().getResource(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(documentCreated.get("mypk"))); client2.readDocument(BridgeInternal.getAltLink(documentCreated), requestOptions).blockFirst(); - client2.readDocument(documentCreated.selfLink(), requestOptions).blockFirst(); + client2.readDocument(documentCreated.getSelfLink(), requestOptions).blockFirst(); } { // just create the second for fun - DocumentCollection collection2 = createCollection(client2, createdDatabase.id(), getCollectionDefinition(), null); + DocumentCollection collection2 = createCollection(client2, createdDatabase.getId(), getCollectionDefinition(), null); successValidatorCollection = new ResourceResponseValidator.Builder() - .withId(collection2.id()) + .withId(collection2.getId()) .build(); - readObservableCollection = client2.readCollection(collection2.selfLink(), null); + readObservableCollection = client2.readCollection(collection2.getSelfLink(), null); validateSuccess(readObservableCollection, successValidatorCollection); } // verify the client2 has the same token. { String token1 = ((SessionContainer) client2.getSession()).getSessionToken(BridgeInternal.getAltLink(collection)); - String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collection.selfLink()); + String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collection.getSelfLink()); assertThat(token1).isEqualTo(token2); } // now delete collection use different client - client1.deleteCollection(collection.selfLink(), null).blockFirst(); + client1.deleteCollection(collection.getSelfLink(), null).blockFirst(); - DocumentCollection collectionRandom1 = createCollection(client2, createdDatabase.id(), getCollectionDefinition()); + DocumentCollection collectionRandom1 = createCollection(client2, createdDatabase.getId(), getCollectionDefinition()); DocumentCollection documentCollection = getCollectionDefinition(); - collectionDefinition.id(collectionId); - DocumentCollection collectionSameName = createCollection(client2, createdDatabase.id(), collectionDefinition); + collectionDefinition.setId(collectionId); + DocumentCollection collectionSameName = createCollection(client2, createdDatabase.getId(), collectionDefinition); String documentId1 = "Generation2-" + 0; Document databaseDefinition2 = getDocumentDefinition(); - databaseDefinition2.id(documentId1); - Document createdDocument = client1.createDocument(collectionSameName.selfLink(), databaseDefinition2, null, true).blockFirst().getResource(); + databaseDefinition2.setId(documentId1); + Document createdDocument = client1.createDocument(collectionSameName.getSelfLink(), databaseDefinition2, null, true).blockFirst().getResource(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(createdDocument.get("mypk"))); ResourceResponseValidator successValidator = new ResourceResponseValidator.Builder() - .withId(createdDocument.id()) + .withId(createdDocument.getId()) .build(); - Flux> readObservable = client1.readDocument(createdDocument.selfLink(), requestOptions); + Flux> readObservable = client1.readDocument(createdDocument.getSelfLink(), requestOptions); validateSuccess(readObservable, successValidator); { String token1 = ((SessionContainer) client1.getSession()).getSessionToken(BridgeInternal.getAltLink(collectionSameName)); - String token2 = ((SessionContainer) client1.getSession()).getSessionToken(collectionSameName.selfLink()); + String token2 = ((SessionContainer) client1.getSession()).getSessionToken(collectionSameName.getSelfLink()); assertThat(token1).isEqualTo(token2); } { - // Client2 read using name link should fail with higher LSN. - String token = ((SessionContainer) client1.getSession()).getSessionToken(collectionSameName.selfLink()); + // Client2 read using getName link should fail with higher LSN. + String token = ((SessionContainer) client1.getSession()).getSessionToken(collectionSameName.getSelfLink()); // artificially bump to higher LSN String higherLsnToken = this.getDifferentLSNToken(token, 2000); RequestOptions requestOptions1 = new RequestOptions(); @@ -455,7 +455,7 @@ void validateSessionContainerAfterCollectionDeletion(boolean useGateway) throws { // verify token by altlink is gone! String token1 = ((SessionContainer) client2.getSession()).getSessionToken(BridgeInternal.getAltLink(collectionSameName)); - String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collection.selfLink()); + String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collection.getSelfLink()); assertThat(token1).isEmpty(); //assertThat(token2).isNotEmpty(); In java both SelfLink and AltLink token remain in sync. } @@ -471,14 +471,14 @@ void validateSessionContainerAfterCollectionDeletion(boolean useGateway) throws RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentTest.get("mypk"))); successValidator = new ResourceResponseValidator.Builder() - .withId(documentTest.id()) + .withId(documentTest.getId()) .build(); - readObservable = client1.readDocument(documentTest.selfLink(), options); + readObservable = client1.readDocument(documentTest.getSelfLink(), options); validateSuccess(readObservable, successValidator); - client1.deleteCollection(collectionSameName.selfLink(), null).blockFirst(); + client1.deleteCollection(collectionSameName.getSelfLink(), null).blockFirst(); String token1 = ((SessionContainer) client2.getSession()).getSessionToken(BridgeInternal.getAltLink(collectionSameName)); - String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collectionSameName.selfLink()); + String token2 = ((SessionContainer) client2.getSession()).getSessionToken(collectionSameName.getSelfLink()); // currently we can't delete the token from Altlink when deleting using selflink assertThat(token1).isNotEmpty(); //assertThat(token2).isEmpty(); In java both SelfLink and AltLink token remain in sync. @@ -493,9 +493,9 @@ void validateSessionContainerAfterCollectionDeletion(boolean useGateway) throws void validateSessionTokenWithPreConditionFailure(boolean useGateway) throws Exception { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -517,8 +517,8 @@ void validateSessionTokenWithPreConditionFailure(boolean useGateway) throws Exce // create a conditioned read request, with first write request's etag, so the read fails with PreconditionFailure AccessCondition ac = new AccessCondition(); - ac.condition(documentResponse.getResource().etag()); - ac.type(AccessConditionType.IF_MATCH); + ac.setCondition(documentResponse.getResource().getETag()); + ac.setType(AccessConditionType.IF_MATCH); RequestOptions requestOptions1 = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(documentResponse.getResource().get("mypk"))); requestOptions1.setAccessCondition(ac); @@ -537,9 +537,9 @@ void validateSessionTokenWithPreConditionFailure(boolean useGateway) throws Exce void validateSessionTokenWithDocumentNotFoundException(boolean useGateway) throws Exception { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -553,7 +553,7 @@ void validateSessionTokenWithDocumentNotFoundException(boolean useGateway) throw .build(); try { DocumentCollection collectionDefinition = getCollectionDefinition(); - collectionDefinition.id("TestCollection"); + collectionDefinition.setId("TestCollection"); ResourceResponse documentResponse = writeClient.createDocument(BridgeInternal.getAltLink(createdCollection), getDocumentDefinition(), null, true).blockFirst(); @@ -573,9 +573,9 @@ void validateSessionTokenWithDocumentNotFoundException(boolean useGateway) throw void validateSessionTokenWithExpectedException(boolean useGateway) throws Exception { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -606,9 +606,9 @@ void validateSessionTokenWithExpectedException(boolean useGateway) throws Except void validateSessionTokenWithConflictException(boolean useGateway) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -639,9 +639,9 @@ void validateSessionTokenWithConflictException(boolean useGateway) { void validateSessionTokenMultiPartitionCollection(boolean useGateway) throws Exception { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -658,23 +658,23 @@ void validateSessionTokenMultiPartitionCollection(boolean useGateway) throws Exc // Document to lock pause/resume clients Document document1 = new Document(); - document1.id("test" + UUID.randomUUID().toString()); + document1.setId("test" + UUID.randomUUID().toString()); BridgeInternal.setProperty(document1, "mypk", 1); - ResourceResponse childResource1 = writeClient.createDocument(createdCollection.selfLink(), document1, null, true).blockFirst(); - logger.info("Created {} child resource", childResource1.getResource().resourceId()); + ResourceResponse childResource1 = writeClient.createDocument(createdCollection.getSelfLink(), document1, null, true).blockFirst(); + logger.info("Created {} child resource", childResource1.getResource().getResourceId()); assertThat(childResource1.getSessionToken()).isNotNull(); assertThat(childResource1.getSessionToken().contains(":")).isTrue(); - String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.selfLink()); + String globalSessionToken1 = ((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.getSelfLink()); assertThat(globalSessionToken1.contains(childResource1.getSessionToken())); // Document to lock pause/resume clients Document document2 = new Document(); - document2.id("test" + UUID.randomUUID().toString()); + document2.setId("test" + UUID.randomUUID().toString()); BridgeInternal.setProperty(document2, "mypk", 2); - ResourceResponse childResource2 = writeClient.createDocument(createdCollection.selfLink(), document2, null, true).blockFirst(); + ResourceResponse childResource2 = writeClient.createDocument(createdCollection.getSelfLink(), document2, null, true).blockFirst(); assertThat(childResource2.getSessionToken()).isNotNull(); assertThat(childResource2.getSessionToken().contains(":")).isTrue(); - String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.selfLink()); + String globalSessionToken2 = ((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.getSelfLink()); logger.info("globalsessiontoken2 {}, childtoken1 {}, childtoken2 {}", globalSessionToken2, childResource1.getSessionToken(), childResource2.getSessionToken()); assertThat(globalSessionToken2.contains(childResource2.getSessionToken())).isTrue(); @@ -685,31 +685,31 @@ void validateSessionTokenMultiPartitionCollection(boolean useGateway) throws Exc RequestOptions option = new RequestOptions(); option.setSessionToken(sessionToken); option.setPartitionKey(new PartitionKey(2)); - writeClient.readDocument(childResource2.getResource().selfLink(), option).blockFirst(); + writeClient.readDocument(childResource2.getResource().getSelfLink(), option).blockFirst(); option = new RequestOptions(); option.setSessionToken(StringUtils.EMPTY); option.setPartitionKey(new PartitionKey(1)); - writeClient.readDocument(childResource1.getResource().selfLink(), option).blockFirst(); + writeClient.readDocument(childResource1.getResource().getSelfLink(), option).blockFirst(); option = new RequestOptions(); option.setSessionToken(sessionToken); option.setPartitionKey(new PartitionKey(1)); - Flux> readObservable = writeClient.readDocument(childResource1.getResource().selfLink(), option); + Flux> readObservable = writeClient.readDocument(childResource1.getResource().getSelfLink(), option); FailureValidator failureValidator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.NOTFOUND).subStatusCode(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE).build(); validateFailure(readObservable, failureValidator); - readObservable = writeClient.readDocument(childResource2.getResource().selfLink(), option); + readObservable = writeClient.readDocument(childResource2.getResource().getSelfLink(), option); failureValidator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.NOTFOUND).subStatusCode(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE).build(); validateFailure(readObservable, failureValidator); - assertThat(((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.selfLink())).isEqualTo + assertThat(((SessionContainer) writeClient.getSession()).getSessionToken(createdCollection.getSelfLink())).isEqualTo (((SessionContainer) writeClient.getSession()).getSessionToken(BridgeInternal.getAltLink(createdCollection))); assertThat(((SessionContainer) writeClient.getSession()).getSessionToken("asdfasdf")).isEmpty(); - assertThat(((SessionContainer) writeClient.getSession()).getSessionToken(createdDatabase.selfLink())).isEmpty(); + assertThat(((SessionContainer) writeClient.getSession()).getSessionToken(createdDatabase.getSelfLink())).isEmpty(); } finally { safeClose(writeClient); } @@ -718,9 +718,9 @@ void validateSessionTokenMultiPartitionCollection(boolean useGateway) throws Exc void validateSessionTokenFromCollectionReplaceIsServerToken(boolean useGateway) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (useGateway) { - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); } else { - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); } RxDocumentClientImpl client1 = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) @@ -729,19 +729,19 @@ void validateSessionTokenFromCollectionReplaceIsServerToken(boolean useGateway) .build(); RxDocumentClientImpl client2 = null; try { - Document doc = client1.createDocument(createdCollection.selfLink(), getDocumentDefinition(), null, true).blockFirst().getResource(); + Document doc = client1.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), null, true).blockFirst().getResource(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(doc.get("mypk"))); Document doc1 = client1.readDocument(BridgeInternal.getAltLink(doc), requestOptions).blockFirst().getResource(); - String token1 = ((SessionContainer) client1.getSession()).getSessionToken(createdCollection.selfLink()); + String token1 = ((SessionContainer) client1.getSession()).getSessionToken(createdCollection.getSelfLink()); client2 = (RxDocumentClientImpl) new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.SESSION) .build(); client2.replaceCollection(createdCollection, null).blockFirst(); - String token2 = ((SessionContainer) client2.getSession()).getSessionToken(createdCollection.selfLink()); + String token2 = ((SessionContainer) client2.getSession()).getSessionToken(createdCollection.getSelfLink()); logger.info("Token after document and after collection replace {} = {}", token1, token2); } finally { @@ -846,4 +846,4 @@ private boolean isSessionEqual(SessionContainer sessionContainer1, SessionContai return true; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java index 4ed2b01753e3..404e5404ba1b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentQuerySpyWireContentTest.java @@ -34,11 +34,11 @@ public class DocumentQuerySpyWireContentTest extends TestSuiteBase { private SpyClientUnderTestFactory.ClientUnderTest client; public String getSinglePartitionCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdSinglePartitionCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdSinglePartitionCollection.getId()); } public String getMultiPartitionCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdMultiPartitionCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdMultiPartitionCollection.getId()); } @Factory(dataProvider = "clientBuilders") @@ -51,21 +51,21 @@ public static Object[][] responseContinuationTokenLimitParamProvider() { FeedOptions options1 = new FeedOptions(); options1.maxItemCount(1); - options1.responseContinuationTokenLimitInKb(5); + options1.getResponseContinuationTokenLimitInKb(5); options1.partitionKey(new PartitionKey("99")); String query1 = "Select * from r"; boolean multiPartitionCollection1 = true; FeedOptions options2 = new FeedOptions(); options2.maxItemCount(1); - options2.responseContinuationTokenLimitInKb(5); + options2.getResponseContinuationTokenLimitInKb(5); options2.partitionKey(new PartitionKey("99")); String query2 = "Select * from r order by r.prop"; boolean multiPartitionCollection2 = false; FeedOptions options3 = new FeedOptions(); options3.maxItemCount(1); - options3.responseContinuationTokenLimitInKb(5); + options3.getResponseContinuationTokenLimitInKb(5); options3.partitionKey(new PartitionKey("99")); String query3 = "Select * from r"; boolean multiPartitionCollection3 = false; @@ -97,7 +97,7 @@ public void queryWithContinuationTokenLimit(FeedOptions options, String query, b Flux> queryObservable = client .queryDocuments(collectionLink, query, options); - List results = queryObservable.flatMap(p -> Flux.fromIterable(p.results())) + List results = queryObservable.flatMap(p -> Flux.fromIterable(p.getResults())) .collectList().block(); assertThat(results.size()).describedAs("total results").isGreaterThanOrEqualTo(1); @@ -105,7 +105,7 @@ public void queryWithContinuationTokenLimit(FeedOptions options, String query, b List requests = client.getCapturedRequests(); for(HttpRequest req: requests) { - validateRequestHasContinuationTokenLimit(req, options.responseContinuationTokenLimitInKb()); + validateRequestHasContinuationTokenLimit(req, options.setResponseContinuationTokenLimitInKb()); } } @@ -158,7 +158,7 @@ public void beforeClass() throws Exception { TimeUnit.SECONDS.sleep(1); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); // do the query once to ensure the collection is cached. client.queryDocuments(getMultiPartitionCollectionLink(), "select * from root", options) @@ -185,4 +185,4 @@ private static Document getDocumentDefinition(int cnt) { , uuid, cnt, cnt)); return doc; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestContextValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestContextValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestContextValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestContextValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/DocumentServiceRequestValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java index cb4dffbe5a27..f3c809714d7a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FailureValidator.java @@ -40,7 +40,7 @@ public Builder statusCode(int statusCode) { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).statusCode()).isEqualTo(statusCode); + assertThat(((CosmosClientException) t).getStatusCode()).isEqualTo(statusCode); } }); return this; @@ -78,8 +78,8 @@ public void validate(Throwable t) { assertThat(t).isInstanceOf(CosmosClientException.class); CosmosClientException cosmosClientException = (CosmosClientException) t; long exceptionQuorumAckedLSN = -1; - if (cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN) != null) { - exceptionQuorumAckedLSN = Long.parseLong((String) cosmosClientException.responseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); + if (cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN) != null) { + exceptionQuorumAckedLSN = Long.parseLong((String) cosmosClientException.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); } assertThat(exceptionQuorumAckedLSN).isNotEqualTo(-1); @@ -105,7 +105,7 @@ public Builder notNullActivityId() { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).message()).isNotNull(); + assertThat(((CosmosClientException) t).getActivityId()).isNotNull(); } }); return this; @@ -117,7 +117,7 @@ public Builder error(CosmosError cosmosError) { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).error().toJson()).isEqualTo(cosmosError.toJson()); + assertThat(((CosmosClientException) t).getError().toJson()).isEqualTo(cosmosError.toJson()); } }); return this; @@ -129,7 +129,7 @@ public Builder subStatusCode(Integer substatusCode) { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).subStatusCode()).isEqualTo(substatusCode); + assertThat(((CosmosClientException) t).getSubStatusCode()).isEqualTo(substatusCode); } }); return this; @@ -141,7 +141,7 @@ public Builder unknownSubStatusCode() { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).subStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.UNKNOWN); + assertThat(((CosmosClientException) t).getSubStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.UNKNOWN); } }); return this; @@ -153,7 +153,7 @@ public Builder responseHeader(String key, String value) { public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); - assertThat(((CosmosClientException) t).responseHeaders().get(key)).isEqualTo(value); + assertThat(((CosmosClientException) t).getResponseHeaders().get(key)).isEqualTo(value); } }); return this; @@ -227,7 +227,7 @@ public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); CosmosClientException ex = (CosmosClientException) t; - assertThat(ex.statusCode()).isEqualTo(404); + assertThat(ex.getStatusCode()).isEqualTo(404); } }); @@ -255,7 +255,7 @@ public void validate(Throwable t) { assertThat(t).isNotNull(); assertThat(t).isInstanceOf(CosmosClientException.class); CosmosClientException ex = (CosmosClientException) t; - assertThat(ex.statusCode()).isEqualTo(409); + assertThat(ex.getStatusCode()).isEqualTo(409); } }); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java index 616e36422665..43172b1016e0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseListValidator.java @@ -42,7 +42,7 @@ public Builder totalSize(final int expectedCount) { validators.add(new FeedResponseListValidator() { @Override public void validate(List> feedList) { - int resultCount = feedList.stream().mapToInt(f -> f.results().size()).sum(); + int resultCount = feedList.stream().mapToInt(f -> f.getResults().size()).sum(); assertThat(resultCount) .describedAs("total number of results").isEqualTo(expectedCount); } @@ -56,8 +56,8 @@ public Builder containsExactly(List expectedRids) { public void validate(List> feedList) { List actualIds = feedList .stream() - .flatMap(f -> f.results().stream()) - .map(r -> r.resourceId()) + .flatMap(f -> f.getResults().stream()) + .map(r -> r.getResourceId()) .collect(Collectors.toList()); assertThat(actualIds) .describedAs("Resource IDs of results") @@ -73,8 +73,8 @@ public Builder containsExactlyIds(List expectedIds) { public void validate(List> feedList) { List actualIds = feedList .stream() - .flatMap(f -> f.results().stream()) - .map(r -> r.id()) + .flatMap(f -> f.getResults().stream()) + .map(r -> r.getId()) .collect(Collectors.toList()); assertThat(actualIds) .describedAs("IDs of results") @@ -90,11 +90,11 @@ public Builder validateAllResources(Map> resourc public void validate(List> feedList) { List resources = feedList .stream() - .flatMap(f -> f.results().stream()) + .flatMap(f -> f.getResults().stream()) .collect(Collectors.toList()); for(T r: resources) { - ResourceValidator validator = resourceIDToValidator.get(r.resourceId()); + ResourceValidator validator = resourceIDToValidator.get(r.getResourceId()); assertThat(validator).isNotNull(); validator.validate(r); } @@ -109,8 +109,8 @@ public Builder exactlyContainsInAnyOrder(List expectedIds) { public void validate(List> feedList) { List actualIds = feedList .stream() - .flatMap(f -> f.results().stream()) - .map(Resource::resourceId) + .flatMap(f -> f.getResults().stream()) + .map(Resource::getResourceId) .collect(Collectors.toList()); assertThat(actualIds) .describedAs("Resource IDs of results") @@ -148,7 +148,7 @@ public Builder totalRequestChargeIsAtLeast(double minimumCharge) { validators.add(new FeedResponseListValidator() { @Override public void validate(List> feedList) { - assertThat(feedList.stream().mapToDouble(p -> p.requestCharge()).sum()) + assertThat(feedList.stream().mapToDouble(p -> p.getRequestCharge()).sum()) .describedAs("total request charge") .isGreaterThanOrEqualTo(minimumCharge); } @@ -184,7 +184,7 @@ public Builder withAggregateValue(Object value) { validators.add(new FeedResponseListValidator() { @Override public void validate(List> feedList) { - List list = feedList.get(0).results(); + List list = feedList.get(0).getResults(); CosmosItemProperties result = list.size() > 0 ? list.get(0) : null; if (result != null) { @@ -225,14 +225,14 @@ public Builder withOrderedResults(List expectedOrderedL public void validate(List> feedList) { List resultOrderedList = feedList.stream() - .flatMap(f -> f.results().stream()) + .flatMap(f -> f.getResults().stream()) .collect(Collectors.toList()); assertThat(expectedOrderedList.size()).isEqualTo(resultOrderedList.size()); ArrayList paths = new ArrayList(); Iterator compositeIndexIterator = compositeIndex.iterator(); while (compositeIndexIterator.hasNext()) { - paths.add(compositeIndexIterator.next().path().replace("/", "")); + paths.add(compositeIndexIterator.next().getPath().replace("/", "")); } for (int i = 0; i < resultOrderedList.size(); i ++) { ArrayNode resultValues = (ArrayNode) resultOrderedList.get(i).get("$1"); @@ -262,7 +262,7 @@ public Builder pageLengths(int[] pageLengths) { public void validate(List> feedList) { assertThat(feedList).hasSize(pageLengths.length); for (int i = 0; i < pageLengths.length; i++) - assertThat(feedList.get(i).results().size()).isEqualTo(pageLengths[i]); + assertThat(feedList.get(i).getResults().size()).isEqualTo(pageLengths[i]); } }); return this; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java index 9087dc771f5f..177be25c838a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/FeedResponseValidator.java @@ -36,7 +36,7 @@ public Builder pageSizeIsLessThanOrEqualTo(final int maxPageSize) { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.results().size()).isLessThanOrEqualTo(maxPageSize); + assertThat(feedPage.getResults().size()).isLessThanOrEqualTo(maxPageSize); } }); return this; @@ -47,7 +47,7 @@ public Builder pageSizeOf(final int expectedCount) { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.results()).hasSize(expectedCount); + assertThat(feedPage.getResults()).hasSize(expectedCount); } }); return this; @@ -58,7 +58,7 @@ public Builder positiveRequestCharge() { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.requestCharge()).isPositive(); + assertThat(feedPage.getRequestCharge()).isPositive(); } }); return this; @@ -69,7 +69,7 @@ public Builder requestChargeGreaterThanOrEqualTo(double minRequestCharge) { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.requestCharge()).isGreaterThanOrEqualTo(minRequestCharge); + assertThat(feedPage.getRequestCharge()).isGreaterThanOrEqualTo(minRequestCharge); } }); return this; @@ -80,7 +80,7 @@ public Builder requestChargeLessThanOrEqualTo(double maxRequestCharge) { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.requestCharge()).isLessThanOrEqualTo(maxRequestCharge); + assertThat(feedPage.getRequestCharge()).isLessThanOrEqualTo(maxRequestCharge); } }); return this; @@ -91,7 +91,7 @@ public Builder hasHeader(String headerKey) { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.responseHeaders()).containsKey(headerKey); + assertThat(feedPage.getResponseHeaders()).containsKey(headerKey); } }); return this; @@ -102,7 +102,7 @@ public Builder hasRequestChargeHeader() { validators.add(new FeedResponseValidator() { @Override public void validate(FeedResponse feedPage) { - assertThat(feedPage.responseHeaders()).containsKey(HttpConstants.HttpHeaders.REQUEST_CHARGE); + assertThat(feedPage.getResponseHeaders()).containsKey(HttpConstants.HttpHeaders.REQUEST_CHARGE); } }); return this; @@ -113,8 +113,8 @@ public Builder idsExactlyAre(final List expectedIds) { @Override public void validate(FeedResponse feedPage) { assertThat(feedPage - .results().stream() - .map(r -> r.resourceId()) + .getResults().stream() + .map(r -> r.getResourceId()) .collect(Collectors.toList())) .containsExactlyElementsOf(expectedIds); } @@ -122,4 +122,4 @@ public void validate(FeedResponse feedPage) { return this; } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/HttpClientUnderTestWrapper.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/HttpClientUnderTestWrapper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/HttpClientUnderTestWrapper.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/HttpClientUnderTestWrapper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/LocationHelperTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/LocationHelperTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/LocationHelperTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/LocationHelperTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java index 69269db7f221..ed01979a1f4d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/NetworkFailureTest.java @@ -34,7 +34,7 @@ public void createCollectionWithUnreachableHost() { Database database = SHARED_DATABASE; Flux> createObservable = client - .createCollection(database.selfLink(), collectionDefinition, null); + .createCollection(database.getSelfLink(), collectionDefinition, null); final RxGatewayStoreModel origGatewayStoreModel = client.getOrigGatewayStoreModel(); @@ -69,4 +69,4 @@ public void afterClass() { safeDeleteCollection(client, collectionDefinition); client.close(); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ParallelAsync.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ParallelAsync.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ParallelAsync.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ParallelAsync.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/PathsHelperTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/PathsHelperTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/PathsHelperTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/PathsHelperTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java index e5b551e2e401..7909e1625ed1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RenameCollectionAwareClientRetryPolicyTest.java @@ -24,7 +24,7 @@ public void onBeforeSendRequestNotInvoked() { GlobalEndpointManager endpointManager = Mockito.mock(GlobalEndpointManager.class); Mockito.doReturn(Mono.empty()).when(endpointManager).refreshLocationAsync(Mockito.eq(null)); - IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.defaultPolicy()); + IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.getDefaultPolicy()); RxClientCollectionCache rxClientCollectionCache = Mockito.mock(RxClientCollectionCache.class); ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); @@ -52,7 +52,7 @@ public void onBeforeSendRequestNotInvoked() { public void shouldRetryWithNotFoundStatusCode() { GlobalEndpointManager endpointManager = Mockito.mock(GlobalEndpointManager.class); Mockito.doReturn(Mono.empty()).when(endpointManager).refreshLocationAsync(Mockito.eq(null)); - IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.defaultPolicy()); + IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.getDefaultPolicy()); RxClientCollectionCache rxClientCollectionCache = Mockito.mock(RxClientCollectionCache.class); ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); @@ -78,7 +78,7 @@ public void shouldRetryWithNotFoundStatusCode() { public void shouldRetryWithNotFoundStatusCodeAndReadSessionNotAvailableSubStatusCode() { GlobalEndpointManager endpointManager = Mockito.mock(GlobalEndpointManager.class); Mockito.doReturn(Mono.empty()).when(endpointManager).refreshLocationAsync(Mockito.eq(null)); - IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.defaultPolicy()); + IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.getDefaultPolicy()); RxClientCollectionCache rxClientCollectionCache = Mockito.mock(RxClientCollectionCache.class); ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); @@ -92,11 +92,11 @@ public void shouldRetryWithNotFoundStatusCodeAndReadSessionNotAvailableSubStatus renameCollectionAwareClientRetryPolicy.onBeforeSendRequest(request); NotFoundException notFoundException = new NotFoundException(); - notFoundException.responseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, + notFoundException.getResponseHeaders().put(WFConstants.BackendHeaders.SUB_STATUS, Integer.toString(HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE)); DocumentCollection documentCollection = new DocumentCollection(); - documentCollection.resourceId("rid_1"); + documentCollection.setResourceId("rid_1"); Mockito.when(rxClientCollectionCache.resolveCollectionAsync(request)).thenReturn(Mono.just(documentCollection)); @@ -115,7 +115,7 @@ public void shouldRetryWithNotFoundStatusCodeAndReadSessionNotAvailableSubStatus public void shouldRetryWithGenericException() { GlobalEndpointManager endpointManager = Mockito.mock(GlobalEndpointManager.class); Mockito.doReturn(Mono.empty()).when(endpointManager).refreshLocationAsync(Mockito.eq(null)); - IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.defaultPolicy()); + IRetryPolicyFactory retryPolicyFactory = new RetryPolicy(endpointManager, ConnectionPolicy.getDefaultPolicy()); RxClientCollectionCache rxClientCollectionCache = Mockito.mock(RxClientCollectionCache.class); ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java index 166030f0c3cf..a045b7ffd5d7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceResponseValidator.java @@ -53,7 +53,7 @@ public Builder withId(final String resourceId) { @Override public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); - assertThat(resourceResponse.getResource().id()).as("check Resource Id").isEqualTo(resourceId); + assertThat(resourceResponse.getResource().getId()).as("check Resource Id").isEqualTo(resourceId); } }); return this; @@ -103,8 +103,8 @@ public Builder withTimestampIsAfterOrEqualTo(Instant time) { @Override public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); - assertThat(resourceResponse.getResource().timestamp()).isNotNull(); - OffsetDateTime d = resourceResponse.getResource().timestamp(); + assertThat(resourceResponse.getResource().getTimestamp()).isNotNull(); + OffsetDateTime d = resourceResponse.getResource().getTimestamp(); System.out.println(d.toString()); assertThat(d.toInstant()).isAfterOrEqualTo(time); } @@ -118,8 +118,8 @@ public Builder withTimestampIsBeforeOrEqualTo(Instant time) { @Override public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); - assertThat(resourceResponse.getResource().timestamp()).isNotNull(); - OffsetDateTime d = resourceResponse.getResource().timestamp(); + assertThat(resourceResponse.getResource().getTimestamp()).isNotNull(); + OffsetDateTime d = resourceResponse.getResource().getTimestamp(); assertThat(d.toInstant()).isBeforeOrEqualTo(time); } }); @@ -155,7 +155,7 @@ public Builder indexingMode(IndexingMode mode) { public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); assertThat(resourceResponse.getResource().getIndexingPolicy()).isNotNull(); - assertThat(resourceResponse.getResource().getIndexingPolicy().indexingMode()).isEqualTo(mode); + assertThat(resourceResponse.getResource().getIndexingPolicy().getIndexingMode()).isEqualTo(mode); } }); return this; @@ -201,7 +201,7 @@ public Builder notNullEtag() { @Override public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); - assertThat(resourceResponse.getResource().etag()).isNotNull(); + assertThat(resourceResponse.getResource().getETag()).isNotNull(); } }); return this; @@ -213,7 +213,7 @@ public Builder notEmptySelfLink() { @Override public void validate(ResourceResponse resourceResponse) { assertThat(resourceResponse.getResource()).isNotNull(); - assertThat(resourceResponse.getResource().selfLink()).isNotEmpty(); + assertThat(resourceResponse.getResource().getSelfLink()).isNotEmpty(); } }); return this; @@ -262,7 +262,7 @@ public Builder withCompositeIndexes(Collection> comp @Override public void validate(ResourceResponse resourceResponse) { Iterator> compositeIndexesReadIterator = resourceResponse.getResource() - .getIndexingPolicy().compositeIndexes().iterator(); + .getIndexingPolicy().getCompositeIndexes().iterator(); Iterator> compositeIndexesWrittenIterator = compositeIndexesWritten.iterator(); ArrayList readIndexesStrings = new ArrayList(); @@ -279,8 +279,8 @@ public void validate(ResourceResponse resourceResponse) { CompositePath compositePathRead = compositeIndexReadIterator.next(); CompositePath compositePathWritten = compositeIndexWrittenIterator.next(); - readIndexesString.append(compositePathRead.path() + ":" + compositePathRead.order() + ";"); - writtenIndexesString.append(compositePathWritten.path() + ":" + compositePathRead.order() + ";"); + readIndexesString.append(compositePathRead.getPath() + ":" + compositePathRead.getOrder() + ";"); + writtenIndexesString.append(compositePathWritten.getPath() + ":" + compositePathRead.getOrder() + ";"); } readIndexesStrings.add(readIndexesString.toString()); @@ -299,7 +299,7 @@ public Builder withSpatialIndexes(Collection spatialIndexes) { @Override public void validate(ResourceResponse resourceResponse) { Iterator spatialIndexesReadIterator = resourceResponse.getResource() - .getIndexingPolicy().spatialIndexes().iterator(); + .getIndexingPolicy().getSpatialIndexes().iterator(); Iterator spatialIndexesWrittenIterator = spatialIndexes.iterator(); HashMap> readIndexMap = new HashMap>(); @@ -309,14 +309,14 @@ public void validate(ResourceResponse resourceResponse) { SpatialSpec spatialSpecRead = spatialIndexesReadIterator.next(); SpatialSpec spatialSpecWritten = spatialIndexesWrittenIterator.next(); - String readPath = spatialSpecRead.path() + ":"; - String writtenPath = spatialSpecWritten.path() + ":"; + String readPath = spatialSpecRead.getPath() + ":"; + String writtenPath = spatialSpecWritten.getPath() + ":"; ArrayList readSpatialTypes = new ArrayList(); ArrayList writtenSpatialTypes = new ArrayList(); - Iterator spatialTypesReadIterator = spatialSpecRead.spatialTypes().iterator(); - Iterator spatialTypesWrittenIterator = spatialSpecWritten.spatialTypes().iterator(); + Iterator spatialTypesReadIterator = spatialSpecRead.getSpatialTypes().iterator(); + Iterator spatialTypesWrittenIterator = spatialSpecWritten.getSpatialTypes().iterator(); while (spatialTypesReadIterator.hasNext() && spatialTypesWrittenIterator.hasNext()) { readSpatialTypes.add(spatialTypesReadIterator.next()); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java index e627f81aa38a..1b379986df83 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ResourceValidator.java @@ -49,4 +49,4 @@ public void validate(T v) { } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryAnalyzer.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryAnalyzer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryAnalyzer.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryAnalyzer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java index 27c8e2b78b69..a04794697803 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryCreateDocumentTest.java @@ -39,12 +39,12 @@ public RetryCreateDocumentTest(AsyncDocumentClient.Builder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void retryDocumentCreate() throws Exception { // create a document to ensure collection is cached - client.createDocument(collection.selfLink(), getDocumentDefinition(), null, false).single().block(); + client.createDocument(collection.getSelfLink(), getDocumentDefinition(), null, false).single().block(); Document docDefinition = getDocumentDefinition(); Flux> createObservable = client - .createDocument(collection.selfLink(), docDefinition, null, false); + .createDocument(collection.getSelfLink(), docDefinition, null, false); AtomicInteger count = new AtomicInteger(); doAnswer((Answer>) invocation -> { @@ -67,7 +67,7 @@ public void retryDocumentCreate() throws Exception { // validate ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(docDefinition.id()).build(); + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); } @@ -95,14 +95,14 @@ public void createDocument_noRetryOnNonRetriableFailure() throws Exception { }).when(client.getSpyGatewayStoreModel()).processMessage(anyObject()); // create a document to ensure collection is cached - client.createDocument(collection.selfLink(), getDocumentDefinition(), null, false) + client.createDocument(collection.getSelfLink(), getDocumentDefinition(), null, false) .single() .block(); Document docDefinition = getDocumentDefinition(); Flux> createObservable = client - .createDocument(collection.selfLink(), docDefinition, null, false); + .createDocument(collection.getSelfLink(), docDefinition, null, false); // validate FailureValidator validator = new FailureValidator.Builder().statusCode(1).subStatusCode(2).build(); @@ -112,7 +112,7 @@ public void createDocument_noRetryOnNonRetriableFailure() throws Exception { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void createDocument_failImmediatelyOnNonRetriable() throws Exception { // create a document to ensure collection is cached - client.createDocument(collection.selfLink(), getDocumentDefinition(), null, false).single().block(); + client.createDocument(collection.getSelfLink(), getDocumentDefinition(), null, false).single().block(); AtomicInteger count = new AtomicInteger(); doAnswer((Answer>) invocation -> { @@ -135,7 +135,7 @@ public void createDocument_failImmediatelyOnNonRetriable() throws Exception { Document docDefinition = getDocumentDefinition(); Flux> createObservable = client - .createDocument(collection.selfLink(), docDefinition, null, false); + .createDocument(collection.getSelfLink(), docDefinition, null, false); // validate FailureValidator validator = new FailureValidator.Builder().statusCode(1).subStatusCode(2).build(); @@ -171,4 +171,4 @@ private Document getDocumentDefinition() { public void afterClass() { safeClose(client); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java similarity index 94% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java index 1a5e3b4d036e..d55669ef6757 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryThrottleTest.java @@ -36,9 +36,9 @@ public class RetryThrottleTest extends TestSuiteBase { public void retryCreateDocumentsOnSpike() throws Exception { ConnectionPolicy policy = new ConnectionPolicy(); RetryOptions retryOptions = new RetryOptions(); - retryOptions.maxRetryAttemptsOnThrottledRequests(Integer.MAX_VALUE); - retryOptions.maxRetryWaitTimeInSeconds(LARGE_TIMEOUT); - policy.retryOptions(retryOptions); + retryOptions.setMaxRetryAttemptsOnThrottledRequests(Integer.MAX_VALUE); + retryOptions.setMaxRetryWaitTimeInSeconds(LARGE_TIMEOUT); + policy.setRetryOptions(retryOptions); AsyncDocumentClient.Builder builder = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) @@ -87,7 +87,7 @@ public void retryDocumentCreate() throws Exception { Document docDefinition = getDocumentDefinition(); Flux> createObservable = client - .createDocument(collection.selfLink(), docDefinition, null, false); + .createDocument(collection.getSelfLink(), docDefinition, null, false); AtomicInteger count = new AtomicInteger(); doAnswer((Answer>) invocation -> { @@ -105,7 +105,7 @@ public void retryDocumentCreate() throws Exception { // validate ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(docDefinition.id()).build(); + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator, TIMEOUT); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryUtilsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryUtilsTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryUtilsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RetryUtilsTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentClientUnderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentClientUnderTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentClientUnderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentClientUnderTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentServiceRequestTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentServiceRequestTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentServiceRequestTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxDocumentServiceRequestTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxGatewayStoreModelTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxGatewayStoreModelTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxGatewayStoreModelTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/RxGatewayStoreModelTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java index b788c96f861e..9876c8ae593c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionContainerTest.java @@ -59,12 +59,12 @@ public void sessionContainer() throws Exception { DocumentServiceRequestContext dsrContext = new DocumentServiceRequestContext(); PartitionKeyRange resolvedPKRange = new PartitionKeyRange(); - resolvedPKRange.id("range_" + (numPartitionKeyRangeIds + 10)); + resolvedPKRange.setId("range_" + (numPartitionKeyRangeIds + 10)); GatewayTestUtils.setParent(resolvedPKRange, ImmutableList.of("range_2", "range_x")); dsrContext.resolvedPartitionKeyRange = resolvedPKRange; request.requestContext = dsrContext; - sessionToken = sessionContainer.resolvePartitionLocalSessionToken(request, resolvedPKRange.id()); + sessionToken = sessionContainer.resolvePartitionLocalSessionToken(request, resolvedPKRange.getId()); assertThat(sessionToken.getLSN()).isEqualTo(2); } @@ -307,7 +307,7 @@ public void clearTokenByCollectionFullNameRemovesToken() { sessionContainer.setSessionToken(documentCollectionId, collectionFullName, ImmutableMap.of(HttpConstants.HttpHeaders.SESSION_TOKEN, "range_0:1#100#1=20#2=5#3=30")); - // Test resourceId based + // Test getResourceId based RxDocumentServiceRequest request = RxDocumentServiceRequest.create(OperationType.Read, documentCollectionId, ResourceType.Document, new HashMap<>()); ISessionToken sessionToken = sessionContainer.resolvePartitionLocalSessionToken(request, "range_0"); @@ -617,4 +617,4 @@ private static int getRandomCollectionId() { private static int getRandomDbId() { return random.nextInt(Integer.MAX_VALUE / 2); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java index e3253f9f49c8..109c34b52295 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTest.java @@ -61,16 +61,16 @@ public void beforeClass() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); DocumentCollection collection = new DocumentCollection(); - collection.id(collectionId); + collection.setId(collectionId); collection.setPartitionKey(partitionKeyDef); - createdCollection = createCollection(createGatewayHouseKeepingDocumentClient().build(), createdDatabase.id(), + createdCollection = createCollection(createGatewayHouseKeepingDocumentClient().build(), createdDatabase.getId(), collection, null); houseKeepingClient = clientBuilder().build(); - connectionMode = houseKeepingClient.getConnectionPolicy().connectionMode(); + connectionMode = houseKeepingClient.getConnectionPolicy().getConnectionMode(); if (connectionMode == ConnectionMode.DIRECT) { spyClient = SpyClientUnderTestFactory.createDirectHttpsClientUnderTest(clientBuilder()); @@ -132,7 +132,7 @@ public void sessionConsistency_ReadYourWrites(boolean isNameBased) { @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "sessionTestArgProvider") public void sessionTokenInDocumentRead(boolean isNameBased) throws UnsupportedEncodingException { Document document = new Document(); - document.id(UUID.randomUUID().toString()); + document.setId(UUID.randomUUID().toString()); BridgeInternal.setProperty(document, "pk", "pk"); document = spyClient.createDocument(getCollectionLink(isNameBased), document, null, false) .blockFirst() @@ -183,12 +183,12 @@ public void sessionTokenRemovedForMasterResource(boolean isNameBased) throws Uns } private String getCollectionLink(boolean isNameBased) { - return isNameBased ? "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(): - createdCollection.selfLink(); + return isNameBased ? "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(): + createdCollection.getSelfLink(); } private String getDocumentLink(Document doc, boolean isNameBased) { - return isNameBased ? "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id() + "/docs/" + doc.id() : - "dbs/" + createdDatabase.resourceId() + "/colls/" + createdCollection.resourceId() + "/docs/" + doc.resourceId() + "/"; + return isNameBased ? "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId() + "/docs/" + doc.getId() : + "dbs/" + createdDatabase.getResourceId() + "/colls/" + createdCollection.getResourceId() + "/docs/" + doc.getResourceId() + "/"; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTokenTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTokenTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTokenTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SessionTokenTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ShouldRetryValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ShouldRetryValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ShouldRetryValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/ShouldRetryValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientBuilder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientBuilder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java index faeac5af3da2..e540aa073f98 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/SpyClientUnderTestFactory.java @@ -171,7 +171,7 @@ public static class DirectHttpsClientUnderTest extends SpyBaseClass DirectHttpsClientUnderTest(URI serviceEndpoint, String masterKey, ConnectionPolicy connectionPolicy, ConsistencyLevel consistencyLevel, CosmosKeyCredential cosmosKeyCredential) { super(serviceEndpoint, masterKey, connectionPolicy, consistencyLevel, createConfigsSpy(Protocol.HTTPS), cosmosKeyCredential); - assert connectionPolicy.connectionMode() == ConnectionMode.DIRECT; + assert connectionPolicy.getConnectionMode() == ConnectionMode.DIRECT; init(); this.origHttpClient = ReflectionUtils.getDirectHttpsHttpClient(this); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java index 0992ef18a8c0..f49ecd63c2a5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreHeaderTests.java @@ -25,15 +25,15 @@ public StoreHeaderTests(AsyncDocumentClient.Builder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void validateStoreHeader() { Document docDefinition1 = getDocumentDefinition(); - Document responseDoc1 = createDocument(client, createdDatabase.id(), createdCollection.id(), docDefinition1); - Assert.assertNotNull(responseDoc1.selfLink()); + Document responseDoc1 = createDocument(client, createdDatabase.getId(), createdCollection.getId(), docDefinition1); + Assert.assertNotNull(responseDoc1.getSelfLink()); Assert.assertNotNull(responseDoc1.get("_attachments")); Document docDefinition2 = getDocumentDefinition(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setHeader("x-ms-exclude-system-properties", "true"); - Document responseDoc2 = createDocument(client, createdDatabase.id(), createdCollection.id(), docDefinition2, requestOptions); - Assert.assertNull(responseDoc2.selfLink()); + Document responseDoc2 = createDocument(client, createdDatabase.getId(), createdCollection.getId(), docDefinition2, requestOptions); + Assert.assertNull(responseDoc2.getSelfLink()); Assert.assertNull(responseDoc2.get("_attachments")); } @@ -60,4 +60,4 @@ private Document getDocumentDefinition() { , uuid, uuid)); return doc; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreResponseBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreResponseBuilder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreResponseBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/StoreResponseBuilder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java index 36ee7b343595..ff0879605155 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestSuiteBase.java @@ -142,9 +142,9 @@ public static void beforeSuite() { SHARED_DATABASE = dbForTest.createdDatabase; RequestOptions options = new RequestOptions(); options.setOfferThroughput(10100); - SHARED_MULTI_PARTITION_COLLECTION = createCollection(houseKeepingClient, SHARED_DATABASE.id(), getCollectionDefinitionWithRangeRangeIndex(), options); - SHARED_SINGLE_PARTITION_COLLECTION = createCollection(houseKeepingClient, SHARED_DATABASE.id(), getCollectionDefinition(), null); - SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES = createCollection(houseKeepingClient, SHARED_DATABASE.id(), getCollectionDefinitionMultiPartitionWithCompositeAndSpatialIndexes(), options); + SHARED_MULTI_PARTITION_COLLECTION = createCollection(houseKeepingClient, SHARED_DATABASE.getId(), getCollectionDefinitionWithRangeRangeIndex(), options); + SHARED_SINGLE_PARTITION_COLLECTION = createCollection(houseKeepingClient, SHARED_DATABASE.getId(), getCollectionDefinition(), null); + SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES = createCollection(houseKeepingClient, SHARED_DATABASE.getId(), getCollectionDefinitionMultiPartitionWithCompositeAndSpatialIndexes(), options); } finally { houseKeepingClient.close(); } @@ -163,21 +163,21 @@ public static void afterSuite() { } protected static void truncateCollection(DocumentCollection collection) { - logger.info("Truncating collection {} ...", collection.id()); + logger.info("Truncating collection {} ...", collection.getId()); AsyncDocumentClient houseKeepingClient = createGatewayHouseKeepingDocumentClient().build(); try { - List paths = collection.getPartitionKey().paths(); + List paths = collection.getPartitionKey().getPaths(); FeedOptions options = new FeedOptions(); - options.maxDegreeOfParallelism(-1); - options.enableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(-1); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(100); - logger.info("Truncating collection {} documents ...", collection.id()); + logger.info("Truncating collection {} documents ...", collection.getId()); - houseKeepingClient.queryDocuments(collection.selfLink(), "SELECT * FROM root", options) + houseKeepingClient.queryDocuments(collection.getSelfLink(), "SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(doc -> { RequestOptions requestOptions = new RequestOptions(); @@ -191,14 +191,14 @@ protected static void truncateCollection(DocumentCollection collection) { requestOptions.setPartitionKey(new PartitionKey(propertyValue)); } - return houseKeepingClient.deleteDocument(doc.selfLink(), requestOptions); + return houseKeepingClient.deleteDocument(doc.getSelfLink(), requestOptions); }).then().block(); - logger.info("Truncating collection {} triggers ...", collection.id()); + logger.info("Truncating collection {} triggers ...", collection.getId()); - houseKeepingClient.queryTriggers(collection.selfLink(), "SELECT * FROM root", options) + houseKeepingClient.queryTriggers(collection.getSelfLink(), "SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(trigger -> { RequestOptions requestOptions = new RequestOptions(); @@ -207,14 +207,14 @@ protected static void truncateCollection(DocumentCollection collection) { // requestOptions.partitionKey(new PartitionKey(propertyValue)); // } - return houseKeepingClient.deleteTrigger(trigger.selfLink(), requestOptions); + return houseKeepingClient.deleteTrigger(trigger.getSelfLink(), requestOptions); }).then().block(); - logger.info("Truncating collection {} storedProcedures ...", collection.id()); + logger.info("Truncating collection {} storedProcedures ...", collection.getId()); - houseKeepingClient.queryStoredProcedures(collection.selfLink(), "SELECT * FROM root", options) + houseKeepingClient.queryStoredProcedures(collection.getSelfLink(), "SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(storedProcedure -> { RequestOptions requestOptions = new RequestOptions(); @@ -223,14 +223,14 @@ protected static void truncateCollection(DocumentCollection collection) { // requestOptions.partitionKey(new PartitionKey(propertyValue)); // } - return houseKeepingClient.deleteStoredProcedure(storedProcedure.selfLink(), requestOptions); + return houseKeepingClient.deleteStoredProcedure(storedProcedure.getSelfLink(), requestOptions); }).then().block(); - logger.info("Truncating collection {} udfs ...", collection.id()); + logger.info("Truncating collection {} udfs ...", collection.getId()); - houseKeepingClient.queryUserDefinedFunctions(collection.selfLink(), "SELECT * FROM root", options) + houseKeepingClient.queryUserDefinedFunctions(collection.getSelfLink(), "SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(udf -> { RequestOptions requestOptions = new RequestOptions(); @@ -239,14 +239,14 @@ protected static void truncateCollection(DocumentCollection collection) { // requestOptions.partitionKey(new PartitionKey(propertyValue)); // } - return houseKeepingClient.deleteUserDefinedFunction(udf.selfLink(), requestOptions); + return houseKeepingClient.deleteUserDefinedFunction(udf.getSelfLink(), requestOptions); }).then().block(); } finally { houseKeepingClient.close(); } - logger.info("Finished truncating collection {}.", collection.id()); + logger.info("Finished truncating collection {}.", collection.getId()); } protected static void waitIfNeededForReplicasToCatchUp(Builder clientBuilder) { @@ -312,12 +312,12 @@ private static DocumentCollection getCollectionDefinitionMultiPartitionWithCompo //Simple ArrayList compositeIndexSimple = new ArrayList(); CompositePath compositePath1 = new CompositePath(); - compositePath1.path("/" + NUMBER_FIELD); - compositePath1.order(CompositePathSortOrder.ASCENDING); + compositePath1.setPath("/" + NUMBER_FIELD); + compositePath1.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath2 = new CompositePath(); - compositePath2.path("/" + STRING_FIELD); - compositePath2.order(CompositePathSortOrder.DESCENDING); + compositePath2.setPath("/" + STRING_FIELD); + compositePath2.setOrder(CompositePathSortOrder.DESCENDING); compositeIndexSimple.add(compositePath1); compositeIndexSimple.add(compositePath2); @@ -325,20 +325,20 @@ private static DocumentCollection getCollectionDefinitionMultiPartitionWithCompo //Max Columns ArrayList compositeIndexMaxColumns = new ArrayList(); CompositePath compositePath3 = new CompositePath(); - compositePath3.path("/" + NUMBER_FIELD); - compositePath3.order(CompositePathSortOrder.DESCENDING); + compositePath3.setPath("/" + NUMBER_FIELD); + compositePath3.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath4 = new CompositePath(); - compositePath4.path("/" + STRING_FIELD); - compositePath4.order(CompositePathSortOrder.ASCENDING); + compositePath4.setPath("/" + STRING_FIELD); + compositePath4.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath5 = new CompositePath(); - compositePath5.path("/" + NUMBER_FIELD_2); - compositePath5.order(CompositePathSortOrder.DESCENDING); + compositePath5.setPath("/" + NUMBER_FIELD_2); + compositePath5.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath6 = new CompositePath(); - compositePath6.path("/" + STRING_FIELD_2); - compositePath6.order(CompositePathSortOrder.ASCENDING); + compositePath6.setPath("/" + STRING_FIELD_2); + compositePath6.setOrder(CompositePathSortOrder.ASCENDING); compositeIndexMaxColumns.add(compositePath3); compositeIndexMaxColumns.add(compositePath4); @@ -348,20 +348,20 @@ private static DocumentCollection getCollectionDefinitionMultiPartitionWithCompo //Primitive Values ArrayList compositeIndexPrimitiveValues = new ArrayList(); CompositePath compositePath7 = new CompositePath(); - compositePath7.path("/" + NUMBER_FIELD); - compositePath7.order(CompositePathSortOrder.DESCENDING); + compositePath7.setPath("/" + NUMBER_FIELD); + compositePath7.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath8 = new CompositePath(); - compositePath8.path("/" + STRING_FIELD); - compositePath8.order(CompositePathSortOrder.ASCENDING); + compositePath8.setPath("/" + STRING_FIELD); + compositePath8.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath9 = new CompositePath(); - compositePath9.path("/" + BOOL_FIELD); - compositePath9.order(CompositePathSortOrder.DESCENDING); + compositePath9.setPath("/" + BOOL_FIELD); + compositePath9.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath10 = new CompositePath(); - compositePath10.path("/" + NULL_FIELD); - compositePath10.order(CompositePathSortOrder.ASCENDING); + compositePath10.setPath("/" + NULL_FIELD); + compositePath10.setOrder(CompositePathSortOrder.ASCENDING); compositeIndexPrimitiveValues.add(compositePath7); compositeIndexPrimitiveValues.add(compositePath8); @@ -371,16 +371,16 @@ private static DocumentCollection getCollectionDefinitionMultiPartitionWithCompo //Long Strings ArrayList compositeIndexLongStrings = new ArrayList(); CompositePath compositePath11 = new CompositePath(); - compositePath11.path("/" + STRING_FIELD); + compositePath11.setPath("/" + STRING_FIELD); CompositePath compositePath12 = new CompositePath(); - compositePath12.path("/" + SHORT_STRING_FIELD); + compositePath12.setPath("/" + SHORT_STRING_FIELD); CompositePath compositePath13 = new CompositePath(); - compositePath13.path("/" + MEDIUM_STRING_FIELD); + compositePath13.setPath("/" + MEDIUM_STRING_FIELD); CompositePath compositePath14 = new CompositePath(); - compositePath14.path("/" + LONG_STRING_FIELD); + compositePath14.setPath("/" + LONG_STRING_FIELD); compositeIndexLongStrings.add(compositePath11); compositeIndexLongStrings.add(compositePath12); @@ -392,16 +392,16 @@ private static DocumentCollection getCollectionDefinitionMultiPartitionWithCompo compositeIndexes.add(compositeIndexPrimitiveValues); compositeIndexes.add(compositeIndexLongStrings); - indexingPolicy.compositeIndexes(compositeIndexes); + indexingPolicy.setCompositeIndexes(compositeIndexes); documentCollection.setIndexingPolicy(indexingPolicy); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); ArrayList partitionKeyPaths = new ArrayList(); partitionKeyPaths.add("/" + PARTITION_KEY); - partitionKeyDefinition.paths(partitionKeyPaths); + partitionKeyDefinition.setPaths(partitionKeyPaths); documentCollection.setPartitionKey(partitionKeyDefinition); - documentCollection.id(UUID.randomUUID().toString()); + documentCollection.setId(UUID.randomUUID().toString()); return documentCollection; } @@ -433,7 +433,7 @@ public Flux> bulkInsert(AsyncDocumentClient client, } public static ConsistencyLevel getAccountDefaultConsistencyLevel(AsyncDocumentClient client) { - return BridgeInternal.getConsistencyPolicy(client.getDatabaseAccount().single().block()).defaultConsistencyLevel(); + return BridgeInternal.getConsistencyPolicy(client.getDatabaseAccount().single().block()).getDefaultConsistencyLevel(); } public static User createUser(AsyncDocumentClient client, String databaseId, User user) { @@ -441,27 +441,27 @@ public static User createUser(AsyncDocumentClient client, String databaseId, Use } public static User safeCreateUser(AsyncDocumentClient client, String databaseId, User user) { - deleteUserIfExists(client, databaseId, user.id()); + deleteUserIfExists(client, databaseId, user.getId()); return createUser(client, databaseId, user); } private static DocumentCollection safeCreateCollection(AsyncDocumentClient client, String databaseId, DocumentCollection collection, RequestOptions options) { - deleteCollectionIfExists(client, databaseId, collection.id()); + deleteCollectionIfExists(client, databaseId, collection.getId()); return createCollection(client, databaseId, collection, options); } public static String getCollectionLink(DocumentCollection collection) { - return collection.selfLink(); + return collection.getSelfLink(); } static protected DocumentCollection getCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; @@ -471,11 +471,11 @@ static protected DocumentCollection getCollectionDefinitionWithRangeRangeIndex() PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); BridgeInternal.setProperty(stringIndex, "precision", -1); @@ -484,13 +484,13 @@ static protected DocumentCollection getCollectionDefinitionWithRangeRangeIndex() Index numberIndex = Index.Range(DataType.NUMBER); BridgeInternal.setProperty(numberIndex, "precision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); DocumentCollection collectionDefinition = new DocumentCollection(); collectionDefinition.setIndexingPolicy(indexingPolicy); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; @@ -499,7 +499,7 @@ static protected DocumentCollection getCollectionDefinitionWithRangeRangeIndex() public static void deleteCollectionIfExists(AsyncDocumentClient client, String databaseId, String collectionId) { List res = client.queryCollections("dbs/" + databaseId, String.format("SELECT * FROM root r where r.id = '%s'", collectionId), null).single().block() - .results(); + .getResults(); if (!res.isEmpty()) { deleteCollection(client, TestUtils.getCollectionNameLink(databaseId, collectionId)); } @@ -514,7 +514,7 @@ public static void deleteDocumentIfExists(AsyncDocumentClient client, String dat options.partitionKey(new PartitionKey(docId)); List res = client .queryDocuments(TestUtils.getCollectionNameLink(databaseId, collectionId), String.format("SELECT * FROM root r where r.id = '%s'", docId), options) - .single().block().results(); + .single().block().getResults(); if (!res.isEmpty()) { deleteDocument(client, TestUtils.getDocumentNameLink(databaseId, collectionId, docId)); } @@ -526,7 +526,7 @@ public static void safeDeleteDocument(AsyncDocumentClient client, String documen client.deleteDocument(documentLink, options).single().block(); } catch (Exception e) { CosmosClientException dce = Utils.as(e, CosmosClientException.class); - if (dce == null || dce.statusCode() != 404) { + if (dce == null || dce.getStatusCode() != 404) { throw e; } } @@ -540,7 +540,7 @@ public static void deleteDocument(AsyncDocumentClient client, String documentLin public static void deleteUserIfExists(AsyncDocumentClient client, String databaseId, String userId) { List res = client .queryUsers("dbs/" + databaseId, String.format("SELECT * FROM root r where r.id = '%s'", userId), null) - .single().block().results(); + .single().block().getResults(); if (!res.isEmpty()) { deleteUser(client, TestUtils.getUserNameLink(databaseId, userId)); } @@ -551,11 +551,11 @@ public static void deleteUser(AsyncDocumentClient client, String userLink) { } public static String getDatabaseLink(Database database) { - return database.selfLink(); + return database.getSelfLink(); } static private Database safeCreateDatabase(AsyncDocumentClient client, Database database) { - safeDeleteDatabase(client, database.id()); + safeDeleteDatabase(client, database.getId()); return createDatabase(client, database); } @@ -566,16 +566,16 @@ static protected Database createDatabase(AsyncDocumentClient client, Database da static protected Database createDatabase(AsyncDocumentClient client, String databaseId) { Database databaseDefinition = new Database(); - databaseDefinition.id(databaseId); + databaseDefinition.setId(databaseId); return createDatabase(client, databaseDefinition); } static protected Database createDatabaseIfNotExists(AsyncDocumentClient client, String databaseId) { - return client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), null).flatMap(p -> Flux.fromIterable(p.results())).switchIfEmpty( + return client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), null).flatMap(p -> Flux.fromIterable(p.getResults())).switchIfEmpty( Flux.defer(() -> { Database databaseDefinition = new Database(); - databaseDefinition.id(databaseId); + databaseDefinition.setId(databaseId); return client.createDatabase(databaseDefinition, null).map(ResourceResponse::getResource); }) @@ -584,7 +584,7 @@ static protected Database createDatabaseIfNotExists(AsyncDocumentClient client, static protected void safeDeleteDatabase(AsyncDocumentClient client, Database database) { if (database != null) { - safeDeleteDatabase(client, database.id()); + safeDeleteDatabase(client, database.getId()); } } @@ -599,14 +599,14 @@ static protected void safeDeleteDatabase(AsyncDocumentClient client, String data static protected void safeDeleteAllCollections(AsyncDocumentClient client, Database database) { if (database != null) { - List collections = client.readCollections(database.selfLink(), null) - .flatMap(p -> Flux.fromIterable(p.results())) + List collections = client.readCollections(database.getSelfLink(), null) + .flatMap(p -> Flux.fromIterable(p.getResults())) .collectList() .single() .block(); for (DocumentCollection collection : collections) { - client.deleteCollection(collection.selfLink(), null).single().block().getResource(); + client.deleteCollection(collection.getSelfLink(), null).single().block().getResource(); } } } @@ -614,7 +614,7 @@ static protected void safeDeleteAllCollections(AsyncDocumentClient client, Datab static protected void safeDeleteCollection(AsyncDocumentClient client, DocumentCollection collection) { if (client != null && collection != null) { try { - client.deleteCollection(collection.selfLink(), null).single().block(); + client.deleteCollection(collection.getSelfLink(), null).single().block(); } catch (Exception e) { } } @@ -805,7 +805,7 @@ private static Object[][] simpleClientBuildersWithDirect(Protocol... protocols) } builders.forEach(b -> logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", - b.getConnectionPolicy().connectionMode(), + b.getConnectionPolicy().getConnectionMode(), b.getDesiredConsistencyLevel(), b.getConfigs().getProtocol() )); @@ -894,7 +894,7 @@ private static Object[][] clientBuildersWithDirect(List testCo } builders.forEach(b -> logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", - b.getConnectionPolicy().connectionMode(), + b.getConnectionPolicy().getConnectionMode(), b.getDesiredConsistencyLevel(), b.getConfigs().getProtocol() )); @@ -904,10 +904,10 @@ private static Object[][] clientBuildersWithDirect(List testCo static protected Builder createGatewayHouseKeepingDocumentClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); RetryOptions options = new RetryOptions(); - options.maxRetryWaitTimeInSeconds(SUITE_SETUP_TIMEOUT); - connectionPolicy.retryOptions(options); + options.setMaxRetryWaitTimeInSeconds(SUITE_SETUP_TIMEOUT); + connectionPolicy.setRetryOptions(options); return new Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -916,9 +916,9 @@ static protected Builder createGatewayHouseKeepingDocumentClient() { static protected Builder createGatewayRxDocumentClient(ConsistencyLevel consistencyLevel, boolean multiMasterEnabled, List preferredLocations) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); - connectionPolicy.usingMultipleWriteLocations(multiMasterEnabled); - connectionPolicy.preferredLocations(preferredLocations); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setUsingMultipleWriteLocations(multiMasterEnabled); + connectionPolicy.setPreferredLocations(preferredLocations); return new Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withConnectionPolicy(connectionPolicy) @@ -934,14 +934,14 @@ static protected Builder createDirectRxDocumentClient(ConsistencyLevel consisten boolean multiMasterEnabled, List preferredLocations) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); if (preferredLocations != null) { - connectionPolicy.preferredLocations(preferredLocations); + connectionPolicy.setPreferredLocations(preferredLocations); } if (multiMasterEnabled && consistencyLevel == ConsistencyLevel.SESSION) { - connectionPolicy.usingMultipleWriteLocations(true); + connectionPolicy.setUsingMultipleWriteLocations(true); } Configs configs = spy(new Configs()); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java index fc8dbbe08001..b4f30a880eec 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TestUtils.java @@ -10,9 +10,9 @@ public class TestUtils { public static String getDatabaseLink(Database database, boolean isNameBased) { if (isNameBased) { - return getDatabaseNameLink(database.id()); + return getDatabaseNameLink(database.getId()); } else { - return database.selfLink(); + return database.getSelfLink(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TimeTokenTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TimeTokenTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TimeTokenTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/TimeTokenTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/caches/AsyncCacheTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/caches/AsyncCacheTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/caches/AsyncCacheTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/caches/AsyncCacheTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java index f63ccc9c7820..eee73d6fded8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressResolverTest.java @@ -74,21 +74,21 @@ public void setup() throws Exception { this.addressResolver.initializeCaches(this.collectionCache, this.collectionRoutingMapCache, this.fabricAddressCache); this.collection1 = new DocumentCollection(); - this.collection1.id("coll"); - this.collection1.resourceId("rid1"); + this.collection1.setId("coll"); + this.collection1.setResourceId("rid1"); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); - partitionKeyDef.paths(ImmutableList.of("/field1")); + partitionKeyDef.setPaths(ImmutableList.of("/field1")); this.collection1.setPartitionKey(partitionKeyDef); this.collection2 = new DocumentCollection(); - this.collection2.id("coll"); - this.collection2.resourceId("rid2"); + this.collection2.setId("coll"); + this.collection2.setResourceId("rid2"); new PartitionKeyDefinition(); - partitionKeyDef.paths(ImmutableList.of("/field1")); + partitionKeyDef.setPaths(ImmutableList.of("/field1")); this.collection2.setPartitionKey(partitionKeyDef); Function>, Void> addPartitionKeyRangeFunc = listArg -> { - listArg.forEach(tuple -> ((ServiceIdentity) tuple.right).partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collection1.resourceId(), tuple.left.id()))); + listArg.forEach(tuple -> ((ServiceIdentity) tuple.right).partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collection1.getResourceId(), tuple.left.getId()))); return null; }; @@ -106,7 +106,7 @@ public void setup() throws Exception { this.routingMapCollection1BeforeSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap( rangesBeforeSplit1, - collection1.resourceId()); + collection1.getResourceId()); List> rangesAfterSplit1 = new ArrayList<>(); @@ -125,7 +125,7 @@ public void setup() throws Exception { addPartitionKeyRangeFunc.apply(rangesAfterSplit1); - this.routingMapCollection1AfterSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesAfterSplit1, collection1.resourceId()); + this.routingMapCollection1AfterSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesAfterSplit1, collection1.getResourceId()); List> rangesBeforeSplit2 = new ArrayList<>(); @@ -139,7 +139,7 @@ public void setup() throws Exception { addPartitionKeyRangeFunc.apply(rangesBeforeSplit2); - this.routingMapCollection2BeforeSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesBeforeSplit2, collection2.resourceId()); + this.routingMapCollection2BeforeSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesBeforeSplit2, collection2.getResourceId()); List> rangesAfterSplit2 = new ArrayList<>(); @@ -160,7 +160,7 @@ public void setup() throws Exception { addPartitionKeyRangeFunc.apply(rangesAfterSplit2); - this.routingMapCollection2AfterSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesAfterSplit2, collection2.resourceId()); + this.routingMapCollection2AfterSplit = InMemoryCollectionRoutingMap.tryCreateCompleteRoutingMap(rangesAfterSplit2, collection2.getResourceId()); } private void TestCacheRefreshWhileRouteByPartitionKey( @@ -182,7 +182,7 @@ private void TestCacheRefreshWhileRouteByPartitionKey( boolean nameBased) throws Exception { if (targetServiceIdentity != null && targetPartitionKeyRange != null) { - targetServiceIdentity.partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collectionAfterRefresh != null ? collectionAfterRefresh.resourceId() : collectionBeforeRefresh.resourceId(), targetPartitionKeyRange.id())); + targetServiceIdentity.partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collectionAfterRefresh != null ? collectionAfterRefresh.getResourceId() : collectionBeforeRefresh.getResourceId(), targetPartitionKeyRange.getId())); } this.initializeMocks( @@ -227,7 +227,7 @@ private void TestCacheRefreshWhileRouteByPartitionKey( assertThat(targetAddresses[0].getPhysicalUri()).isEqualTo(resolvedAddresses[0].getPhysicalUri()); // Assert.AreEqual(targetServiceIdentity, request.requestContext.TargetIdentity); - assertThat(targetPartitionKeyRange.id()).isEqualTo(request.requestContext.resolvedPartitionKeyRange.id()); + assertThat(targetPartitionKeyRange.getId()).isEqualTo(request.requestContext.resolvedPartitionKeyRange.getId()); } private void TestCacheRefreshWhileRouteByPartitionKeyRangeId( @@ -250,7 +250,7 @@ private void TestCacheRefreshWhileRouteByPartitionKeyRangeId( boolean nameBased) throws Exception { if (targetServiceIdentity != null && targetPartitionKeyRange != null) { - targetServiceIdentity.partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collectionAfterRefresh != null ? collectionAfterRefresh.resourceId() : collectionBeforeRefresh.resourceId(), targetPartitionKeyRange.id())); + targetServiceIdentity.partitionKeyRangeIds.add(new PartitionKeyRangeIdentity(collectionAfterRefresh != null ? collectionAfterRefresh.getResourceId() : collectionBeforeRefresh.getResourceId(), targetPartitionKeyRange.getId())); } this.initializeMocks( @@ -296,7 +296,7 @@ private void TestCacheRefreshWhileRouteByPartitionKeyRangeId( assertThat(targetAddresses[0].getPhysicalUri()).isEqualTo(resolvedAddresses[0].getPhysicalUri()); // Assert.AreEqual(targetServiceIdentity, request.requestContext.TargetIdentity); - assertThat(targetPartitionKeyRange.id()).isEqualTo(request.requestContext.resolvedPartitionKeyRange.id()); + assertThat(targetPartitionKeyRange.getId()).isEqualTo(request.requestContext.resolvedPartitionKeyRange.getId()); } private void initializeMocks( @@ -459,7 +459,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), null, @@ -478,7 +478,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), null, @@ -497,7 +497,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses2), @@ -516,7 +516,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses2), @@ -535,8 +535,8 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), ImmutableMap.of( getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses2, @@ -557,8 +557,8 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), ImmutableMap.of( getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses2, @@ -579,7 +579,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection2, - ImmutableMap.of(this.collection2.resourceId(), this.routingMapCollection2BeforeSplit), + ImmutableMap.of(this.collection2.getResourceId(), this.routingMapCollection2BeforeSplit), null, ImmutableMap.of( getServiceIdentityAt(this.routingMapCollection2BeforeSplit, 0), this.addresses1), @@ -599,7 +599,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection2, - ImmutableMap.of(this.collection2.resourceId(), this.routingMapCollection2BeforeSplit), + ImmutableMap.of(this.collection2.getResourceId(), this.routingMapCollection2BeforeSplit), null, ImmutableMap.of( getServiceIdentityAt(this.routingMapCollection2BeforeSplit, 0), this.addresses1), @@ -619,8 +619,8 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, this.addresses1, @@ -639,9 +639,9 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, this.collection2, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit, - this.collection2.resourceId(), this.routingMapCollection2BeforeSplit), - ImmutableMap.of(this.collection2.resourceId(), this.routingMapCollection2AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit, + this.collection2.getResourceId(), this.routingMapCollection2BeforeSplit), + ImmutableMap.of(this.collection2.getResourceId(), this.routingMapCollection2AfterSplit), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection2AfterSplit, 0), this.addresses1), null, this.addresses1, @@ -660,7 +660,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKey() throws Exception { this.TestCacheRefreshWhileRouteByPartitionKey( this.collection1, null, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), ImmutableMap.of(), ImmutableMap.of(), null, @@ -709,7 +709,7 @@ private static PartitionKeyRange getRangeAt(CollectionRoutingMap routingMap, int } private static ServiceIdentity getServiceIdentityAt(CollectionRoutingMap routingMap, int index) { - return (ServiceIdentity) routingMap.tryGetInfoByPartitionKeyRangeId(routingMap.getOrderedPartitionKeyRanges().get(index).id()); + return (ServiceIdentity) routingMap.tryGetInfoByPartitionKeyRangeId(routingMap.getOrderedPartitionKeyRanges().get(index).getId()); } @Test(groups = "unit") @@ -718,11 +718,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(this.collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(this.collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), getRangeAt(this.routingMapCollection1BeforeSplit, 0), @@ -739,11 +739,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(this.collection1.resourceId(), "1"), + new PartitionKeyRangeIdentity(this.collection1.getResourceId(), "1"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), getRangeAt(this.routingMapCollection1BeforeSplit, 0), @@ -764,7 +764,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), this.addresses1), null, @@ -789,11 +789,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), null, ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1BeforeSplit, 0), getRangeAt(this.routingMapCollection1BeforeSplit, 0), @@ -814,11 +814,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), getRangeAt(this.routingMapCollection1AfterSplit, 0), @@ -838,11 +838,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection1, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1AfterSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1AfterSplit), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(collection1.resourceId(), "1"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "1"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), getRangeAt(this.routingMapCollection1AfterSplit, 0), @@ -863,7 +863,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti ImmutableMap.of(), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), getRangeAt(this.routingMapCollection1AfterSplit, 0), @@ -913,7 +913,7 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti ImmutableMap.of(), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), null, - new PartitionKeyRangeIdentity(collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), getRangeAt(this.routingMapCollection1AfterSplit, 0), @@ -934,11 +934,11 @@ public void testCacheRefreshesWhileRoutingByPartitionKeyRangeId() throws Excepti this.TestCacheRefreshWhileRouteByPartitionKeyRangeId( this.collection1, this.collection2, - ImmutableMap.of(this.collection1.resourceId(), this.routingMapCollection1BeforeSplit), - ImmutableMap.of(this.collection2.resourceId(), this.routingMapCollection2BeforeSplit), + ImmutableMap.of(this.collection1.getResourceId(), this.routingMapCollection1BeforeSplit), + ImmutableMap.of(this.collection2.getResourceId(), this.routingMapCollection2BeforeSplit), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), this.addresses1), ImmutableMap.of(getServiceIdentityAt(this.routingMapCollection2AfterSplit, 0), this.addresses2), - new PartitionKeyRangeIdentity(collection1.resourceId(), "0"), + new PartitionKeyRangeIdentity(collection1.getResourceId(), "0"), this.addresses1, getServiceIdentityAt(this.routingMapCollection1AfterSplit, 0), getRangeAt(this.routingMapCollection1AfterSplit, 0), diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java index cdaa9ec2c3cc..4a09932228c7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressSelectorWrapper.java @@ -194,7 +194,7 @@ public void verify(InvocationOnMock invocation) { VerifierBuilder resolveAllUriAsync_IncludePrimary(boolean primaryIncluded) { methodName(resolveAllUriAsync); - Condition alwaysTrue = new Condition(Predicates.alwaysTrue(), "no condition"); + Condition alwaysTrue = new Condition(Predicates.alwaysTrue(), "no getCondition"); Condition primaryIncludedCond = new Condition(Predicates.equalTo(primaryIncluded), String.format("%b (primaryIncluded)", primaryIncluded)); resolveAllUriAsync(alwaysTrue, primaryIncludedCond, alwaysTrue); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java index dc5275345b82..ad607a786785 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/AddressValidator.java @@ -2,10 +2,6 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.directconnectivity; -import com.azure.data.cosmos.internal.directconnectivity.Address; -import com.azure.data.cosmos.internal.directconnectivity.Protocol; -import com.azure.data.cosmos.internal.directconnectivity.Address; -import com.azure.data.cosmos.internal.directconnectivity.Protocol; import org.assertj.core.api.Condition; import java.util.ArrayList; @@ -40,7 +36,7 @@ public Builder withId(final String resourceId) { @Override public void validate(Address address) { - assertThat(address.id()).as("check Resource Id").isEqualTo(resourceId); + assertThat(address.getId()).as("check Resource Id").isEqualTo(resourceId); } }); return this; @@ -114,7 +110,7 @@ public Builder withRid(String rid) { @Override public void validate(Address address) { - assertThat(address.resourceId()).isEqualTo(rid); + assertThat(address.getResourceId()).isEqualTo(rid); } }); return this; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java index ded96c5657b7..709d4c6270b5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/BarrierRequestHelperTest.java @@ -31,7 +31,7 @@ public void barrierBasic() { for (OperationType operationType : OperationType.values()) { Document randomResource = new Document(); - randomResource.id(UUID.randomUUID().toString()); + randomResource.setId(UUID.randomUUID().toString()); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(operationType, resourceType, "/dbs/7mVFAA==/colls/7mVFAP1jpeU=", randomResource, (Map) null); @@ -59,7 +59,7 @@ public void barrierDBFeed() { OperationType operationType = OperationType.Query; Document randomResource = new Document(); - randomResource.id(UUID.randomUUID().toString()); + randomResource.setId(UUID.randomUUID().toString()); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(operationType, resourceType, "/dbs/7mVFAA==/colls/7mVFAP1jpeU=", randomResource, (Map) null); @@ -81,7 +81,7 @@ public void barrierDocumentQueryNameBasedRequest() { OperationType operationType = OperationType.Query; Document randomResource = new Document(); - randomResource.id(UUID.randomUUID().toString()); + randomResource.setId(UUID.randomUUID().toString()); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(operationType, resourceType, "/dbs/dbname/colls/collname", randomResource, (Map) null); @@ -103,7 +103,7 @@ public void barrierDocumentReadNameBasedRequest() { OperationType operationType = OperationType.Read; Document randomResource = new Document(); - randomResource.id(UUID.randomUUID().toString()); + randomResource.setId(UUID.randomUUID().toString()); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(operationType, resourceType, "/dbs/dbname/colls/collname", randomResource, (Map) null); @@ -127,7 +127,7 @@ public void barrierDocumentReadRidBasedRequest() { OperationType operationType = OperationType.Read; Document randomResource = new Document(); - randomResource.id(UUID.randomUUID().toString()); + randomResource.setId(UUID.randomUUID().toString()); RxDocumentServiceRequest request = RxDocumentServiceRequest.create(operationType, "7mVFAA==", resourceType, (Map) null); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java index d4325b599e63..8e6a86f61960 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderTest.java @@ -340,10 +340,10 @@ public void sessionNotAvailableFromSomeReplicasThrowingNotFound_FindReplicaSatis String partitionKeyRangeId = "1"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + slowReplicaLSN); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(slowReplicaLSN)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(slowReplicaLSN)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + slowReplicaLSN); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(slowReplicaLSN)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(slowReplicaLSN)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); StoreResponse storeResponse = StoreResponseBuilder.create() .withSessionToken(partitionKeyRangeId + ":-1#" + fasterReplicaLSN) @@ -420,10 +420,10 @@ public void sessionRead_LegitimateNotFound() { String partitionKeyRangeId = "73"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -486,10 +486,10 @@ public void sessionRead_ReplicasDoNotHaveTheRequestedLSN() { long globalCommittedLsn = 651174; String partitionKeyRangeId = "73"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(651175)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(651175)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(651175)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(651175)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -550,10 +550,10 @@ public void requestRateTooLarge_BubbleUp() { String partitionKeyRangeId = "73"; RequestRateTooLargeException requestTooLargeException = new RequestRateTooLargeException(); - requestTooLargeException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); - requestTooLargeException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(651175)); - requestTooLargeException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(651175)); - requestTooLargeException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + requestTooLargeException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + requestTooLargeException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(651175)); + requestTooLargeException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(651175)); + requestTooLargeException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -745,7 +745,7 @@ public static void validateException(Mono single, private PartitionKeyRange partitionKeyRangeWithId(String id) { PartitionKeyRange partitionKeyRange = Mockito.mock(PartitionKeyRange.class); - Mockito.doReturn(id).when(partitionKeyRange).id(); + Mockito.doReturn(id).when(partitionKeyRange).getId(); return partitionKeyRange; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderUnderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderUnderTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderUnderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyReaderUnderTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriterTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriterTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriterTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ConsistencyWriterTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java index 689500477055..0b0fea9ff518 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/DCDocumentCrudTest.java @@ -69,7 +69,7 @@ public static Object[][] directClientBuilder() { static Builder createDCBuilder(Protocol protocol) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); Configs configs = spy(new Configs()); doAnswer((Answer) invocation -> protocol).when(configs).getProtocol(); @@ -90,14 +90,14 @@ public DCDocumentCrudTest(Builder clientBuilder) { @Test(groups = { "direct" }, timeOut = TIMEOUT) public void executeStoredProc() { StoredProcedure storedProcedure = new StoredProcedure(); - storedProcedure.id(UUID.randomUUID().toString()); + storedProcedure.setId(UUID.randomUUID().toString()); storedProcedure.setBody("function() {var x = 10;}"); Flux> createObservable = client .createStoredProcedure(getCollectionLink(), storedProcedure, null); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(storedProcedure.id()) + .withId(storedProcedure.getId()) .build(); validateSuccess(createObservable, validator, TIMEOUT); @@ -107,7 +107,7 @@ public void executeStoredProc() { client.getCapturedRequests().clear(); // execute the created storedProc and ensure it goes through direct connectivity stack - String storedProcLink = "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id() + "/sprocs/" + storedProcedure.id(); + String storedProcLink = "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId() + "/sprocs/" + storedProcedure.getId(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey("dummy")); @@ -131,7 +131,7 @@ public void create() { this.getCollectionLink(), docDefinition, null, false); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(docDefinition.id()) + .withId(docDefinition.getId()) .build(); validateSuccess(createObservable, validator, TIMEOUT); @@ -156,10 +156,10 @@ public void read() throws Exception { options.setPartitionKey(new PartitionKey(pkValue)); String docLink = - String.format("dbs/%s/colls/%s/docs/%s", createdDatabase.id(), createdCollection.id(), document.id()); + String.format("dbs/%s/colls/%s/docs/%s", createdDatabase.getId(), createdCollection.getId(), document.getId()); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(docDefinition.id()) + .withId(docDefinition.getId()) .build(); validateSuccess(client.readDocument(docLink, options), validator, TIMEOUT); @@ -222,14 +222,14 @@ public void crossPartitionQuery() { waitIfNeededForReplicasToCatchUp(clientBuilder()); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(-1); + options.setEnableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(-1); options.maxItemCount(100); Flux> results = client.queryDocuments(getCollectionLink(), "SELECT * FROM r", options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(documentList.size()) - .exactlyContainsInAnyOrder(documentList.stream().map(Document::resourceId).collect(Collectors.toList())).build(); + .exactlyContainsInAnyOrder(documentList.stream().map(Document::getResourceId).collect(Collectors.toList())).build(); validateQuerySuccess(results, validator, QUERY_TIMEOUT); validateNoDocumentQueryOperationThroughGateway(); @@ -292,7 +292,7 @@ public void beforeClass() { RequestOptions options = new RequestOptions(); options.setOfferThroughput(10100); createdDatabase = SHARED_DATABASE; - createdCollection = createCollection(createdDatabase.id(), getCollectionDefinition(), options); + createdCollection = createCollection(createdDatabase.getId(), getCollectionDefinition(), options); client = SpyClientUnderTestFactory.createClientWithGatewaySpy(clientBuilder()); assertThat(client.getCapturedRequests()).isNotEmpty(); @@ -309,12 +309,12 @@ public void beforeMethod(Method method) { } private String getCollectionLink() { - return String.format("/dbs/%s/colls/%s", createdDatabase.id(), createdCollection.id()); + return String.format("/dbs/%s/colls/%s", createdDatabase.getId(), createdCollection.getId()); } private Document getDocumentDefinition() { Document doc = new Document(); - doc.id(UUID.randomUUID().toString()); + doc.setId(UUID.randomUUID().toString()); BridgeInternal.setProperty(doc, PARTITION_KEY_FIELD_NAME, UUID.randomUUID().toString()); BridgeInternal.setProperty(doc, "name", "Hafez"); return doc; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/EndpointMock.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/EndpointMock.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/EndpointMock.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/EndpointMock.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java index 63f87f35cdff..09e7ffed0145 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ExceptionBuilder.java @@ -47,21 +47,21 @@ public ExceptionBuilder withMessage(String message) { public GoneException asGoneException() { assert status == null; GoneException dce = new GoneException(); - dce.responseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); + dce.getResponseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); return dce; } public InvalidPartitionException asInvalidPartitionException() { assert status == null; InvalidPartitionException dce = new InvalidPartitionException(); - dce.responseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); + dce.getResponseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); return dce; } public PartitionKeyRangeGoneException asPartitionKeyRangeGoneException() { assert status == null; PartitionKeyRangeGoneException dce = new PartitionKeyRangeGoneException(); - dce.responseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); + dce.getResponseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); return dce; } @@ -69,14 +69,14 @@ public PartitionKeyRangeGoneException asPartitionKeyRangeGoneException() { public PartitionKeyRangeIsSplittingException asPartitionKeyRangeIsSplittingException() { assert status == null; PartitionKeyRangeIsSplittingException dce = new PartitionKeyRangeIsSplittingException(); - dce.responseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); + dce.getResponseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); return dce; } public PartitionIsMigratingException asPartitionIsMigratingException() { assert status == null; PartitionIsMigratingException dce = new PartitionIsMigratingException(); - dce.responseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); + dce.getResponseHeaders().putAll(headerEntries.stream().collect(Collectors.toMap(i -> i.getKey(), i -> i.getValue()))); return dce; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function1WithCheckedException.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function1WithCheckedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function1WithCheckedException.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function1WithCheckedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function2WithCheckedException.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function2WithCheckedException.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function2WithCheckedException.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/Function2WithCheckedException.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java index 9f43c1c8f914..aedf5a4128e2 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayAddressCacheTest.java @@ -96,7 +96,7 @@ public void getServerAddressesViaGateway(List partitionKeyRangeIds, getDocumentDefinition(), new HashMap<>()); Mono> addresses = cache.getServerAddressesViaGatewayAsync( - req, createdCollection.resourceId(), partitionKeyRangeIds, false); + req, createdCollection.getResourceId(), partitionKeyRangeIds, false); PartitionReplicasAddressesValidator validator = new PartitionReplicasAddressesValidator.Builder() .withProtocol(protocol) @@ -165,7 +165,7 @@ public void tryGetAddresses_ForDataPartitions(String partitionKeyRangeId, String collectionLink, new Database(), new HashMap<>()); - String collectionRid = createdCollection.resourceId(); + String collectionRid = createdCollection.getResourceId(); PartitionKeyRangeIdentity partitionKeyRangeIdentity = new PartitionKeyRangeIdentity(collectionRid, partitionKeyRangeId); boolean forceRefreshPartitionAddresses = false; @@ -208,7 +208,7 @@ public void tryGetAddresses_ForDataPartitions_AddressCachedByOpenAsync_NoHttpReq null, httpClientWrapper.getSpyHttpClient()); - String collectionRid = createdCollection.resourceId(); + String collectionRid = createdCollection.getResourceId(); List pkriList = allPartitionKeyRangeIds.stream().map( pkri -> new PartitionKeyRangeIdentity(collectionRid, pkri)).collect(Collectors.toList()); @@ -263,7 +263,7 @@ public void tryGetAddresses_ForDataPartitions_ForceRefresh( null, httpClientWrapper.getSpyHttpClient()); - String collectionRid = createdCollection.resourceId(); + String collectionRid = createdCollection.getResourceId(); List pkriList = allPartitionKeyRangeIds.stream().map( pkri -> new PartitionKeyRangeIdentity(collectionRid, pkri)).collect(Collectors.toList()); @@ -320,7 +320,7 @@ public void tryGetAddresses_ForDataPartitions_Suboptimal_Refresh( httpClientWrapper.getSpyHttpClient(), suboptimalRefreshTime); - String collectionRid = createdCollection.resourceId(); + String collectionRid = createdCollection.getResourceId(); List pkriList = allPartitionKeyRangeIds.stream().map( pkri -> new PartitionKeyRangeIdentity(collectionRid, pkri)).collect(Collectors.toList()); @@ -799,7 +799,7 @@ public void beforeClass() { RequestOptions options = new RequestOptions(); options.setOfferThroughput(30000); - createdCollection = createCollection(client, createdDatabase.id(), getCollectionDefinition(), options); + createdCollection = createCollection(client, createdDatabase.getId(), getCollectionDefinition(), options); } @AfterClass(groups = { "direct" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -812,10 +812,10 @@ static protected DocumentCollection getCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id("mycol"); + collectionDefinition.setId("mycol"); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; @@ -831,11 +831,11 @@ private HttpClientUnderTestWrapper getHttpClientUnderTestWrapper(Configs configs } public String getNameBasedCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } public String getCollectionSelfLink() { - return createdCollection.selfLink(); + return createdCollection.getSelfLink(); } private Document getDocumentDefinition() { @@ -848,4 +848,4 @@ private Document getDocumentDefinition() { , uuid, uuid)); return doc; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java index b78b9e6cc4c1..c1b94deac09a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfigurationReaderTest.java @@ -58,7 +58,7 @@ public void setup() throws Exception { SpyClientUnderTestFactory.ClientUnderTest clientUnderTest = SpyClientUnderTestFactory.createClientUnderTest(this.clientBuilder()); HttpClient httpClient = clientUnderTest.getSpyHttpClient(); baseAuthorizationTokenProvider = new BaseAuthorizationTokenProvider(new CosmosKeyCredential(TestConfigurations.MASTER_KEY)); - connectionPolicy = ConnectionPolicy.defaultPolicy(); + connectionPolicy = ConnectionPolicy.getDefaultPolicy(); mockHttpClient = Mockito.mock(HttpClient.class); mockGatewayServiceConfigurationReader = new GatewayServiceConfigurationReader(new URI(TestConfigurations.HOST), false, TestConfigurations.MASTER_KEY, connectionPolicy, baseAuthorizationTokenProvider, mockHttpClient); @@ -128,11 +128,11 @@ public static void validateSuccess(Mono observable, DatabaseAcc testSubscriber.assertComplete(); testSubscriber.assertValueCount(1); DatabaseAccount databaseAccount = testSubscriber.values().get(0); - assertThat(databaseAccount.id()).isEqualTo(expectedDatabaseAccount.id()); + assertThat(databaseAccount.getId()).isEqualTo(expectedDatabaseAccount.getId()); assertThat(BridgeInternal.getAddressesLink(databaseAccount)) .isEqualTo(BridgeInternal.getAddressesLink(expectedDatabaseAccount)); - assertThat(databaseAccount.writableLocations().iterator().next().endpoint()) - .isEqualTo(expectedDatabaseAccount.writableLocations().iterator().next().endpoint()); + assertThat(databaseAccount.getWritableLocations().iterator().next().getEndpoint()) + .isEqualTo(expectedDatabaseAccount.getWritableLocations().iterator().next().getEndpoint()); assertThat(BridgeInternal.getSystemReplicationPolicy(databaseAccount).getMaxReplicaSetSize()) .isEqualTo(BridgeInternal.getSystemReplicationPolicy(expectedDatabaseAccount).getMaxReplicaSetSize()); assertThat(BridgeInternal.getSystemReplicationPolicy(databaseAccount).getMaxReplicaSetSize()) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfiguratorReaderMock.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfiguratorReaderMock.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfiguratorReaderMock.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GatewayServiceConfiguratorReaderMock.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java index ba4e45108abd..d58ae9be1aea 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GlobalAddressResolverTest.java @@ -67,7 +67,7 @@ public void setup() throws Exception { urlforWrite3 = new URL("http://testWrite3.com/"); connectionPolicy = new ConnectionPolicy(); - connectionPolicy.enableReadRequestsFallback(true); + connectionPolicy.setEnableReadRequestsFallback(true); httpClient = Mockito.mock(HttpClient.class); endpointManager = Mockito.mock(GlobalEndpointManager.class); @@ -89,7 +89,7 @@ public void setup() throws Exception { authorizationTokenProvider = Mockito.mock(IAuthorizationTokenProvider.class); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionCache = Mockito.mock(RxCollectionCache.class); Mockito.when(collectionCache.resolveCollectionAsync(Matchers.any(RxDocumentServiceRequest.class))).thenReturn(Mono.just(collectionDefinition)); routingMapProvider = Mockito.mock(RxPartitionKeyRangeCache.class); @@ -140,8 +140,8 @@ public void openAsync() throws Exception { DocumentCollection documentCollection = new DocumentCollection(); - documentCollection.id("TestColl"); - documentCollection.resourceId("IXYFAOHEBPM="); + documentCollection.setId("TestColl"); + documentCollection.setResourceId("IXYFAOHEBPM="); CollectionRoutingMap collectionRoutingMap = Mockito.mock(CollectionRoutingMap.class); PartitionKeyRange range = new PartitionKeyRange("0", PartitionKeyInternalHelper.MinimumInclusiveEffectivePartitionKey, PartitionKeyInternalHelper.MaximumExclusiveEffectivePartitionKey); @@ -153,7 +153,7 @@ public void openAsync() throws Exception { List ranges = new ArrayList<>(); for (PartitionKeyRange partitionKeyRange : (List) collectionRoutingMap.getOrderedPartitionKeyRanges()) { - PartitionKeyRangeIdentity partitionKeyRangeIdentity = new PartitionKeyRangeIdentity(documentCollection.resourceId(), partitionKeyRange.id()); + PartitionKeyRangeIdentity partitionKeyRangeIdentity = new PartitionKeyRangeIdentity(documentCollection.getResourceId(), partitionKeyRange.getId()); ranges.add(partitionKeyRangeIdentity); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java similarity index 97% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java index 0432868ab61c..f65cd5cf9b73 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/GoneAndRetryWithRetryPolicyTest.java @@ -14,7 +14,6 @@ import com.azure.data.cosmos.PartitionKeyRangeIsSplittingException; import com.azure.data.cosmos.internal.ResourceType; import com.azure.data.cosmos.internal.RxDocumentServiceRequest; -import com.azure.data.cosmos.internal.directconnectivity.GoneAndRetryWithRetryPolicy; import org.testng.annotations.Test; import reactor.core.publisher.Mono; @@ -102,7 +101,7 @@ public void shouldRetryWithInvalidPartitionException() { shouldRetryResult = goneAndRetryWithRetryPolicy.shouldRetry(new InvalidPartitionException()).block(); assertThat(shouldRetryResult.shouldRetry).isFalse(); CosmosClientException clientException = (CosmosClientException) shouldRetryResult.exception; - assertThat(clientException.statusCode()).isEqualTo(HttpConstants.StatusCodes.SERVICE_UNAVAILABLE); + assertThat(clientException.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.SERVICE_UNAVAILABLE); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientMockWrapper.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientMockWrapper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientMockWrapper.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpClientMockWrapper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClientTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClientTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClientTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpTransportClientTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtilsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtilsTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtilsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/HttpUtilsTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MultiStoreResultValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MultiStoreResultValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MultiStoreResultValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MultiStoreResultValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MurmurHash3_32Test.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MurmurHash3_32Test.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MurmurHash3_32Test.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/MurmurHash3_32Test.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java similarity index 98% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java index 95e0f71b63aa..5d170c91ca59 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyInternalTest.java @@ -291,7 +291,7 @@ public void hashEffectivePartitionKey() { .isEqualTo(PartitionKeyInternalHelper.MaximumExclusiveEffectivePartitionKey); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); - partitionKeyDefinition.paths(Lists.newArrayList("/A", "/B", "/C", "/E", "/F", "/G")); + partitionKeyDefinition.setPaths(Lists.newArrayList("/A", "/B", "/C", "/E", "/F", "/G")); PartitionKeyInternal partitionKey = PartitionKeyInternal.fromObjectArray( new Object[]{2, true, false, null, Undefined.Value(), "Привет!"}, true); @@ -334,7 +334,7 @@ public void managedNativeCompatibility() { PartitionKeyInternal.fromJsonString("[\"по-русски\",null,true,false,{},5.5]"); PartitionKeyDefinition pkDefinition = new PartitionKeyDefinition(); - pkDefinition.paths(ImmutableList.of("/field1", "/field2", "/field3", "/field4", "/field5", "/field6")); + pkDefinition.setPaths(ImmutableList.of("/field1", "/field2", "/field3", "/field4", "/field5", "/field6")); String effectivePartitionKey = PartitionKeyInternalHelper.getEffectivePartitionKeyString(partitionKey, pkDefinition); assertThat("05C1D39FA55F0408D1C0D1BF2ED281D284D282D282D1BBD1B9000103020005C016").isEqualTo(effectivePartitionKey); @@ -419,7 +419,7 @@ private static void validateEffectivePartitionKeyV2(String partitionKeyRangeJson PartitionKeyInternal partitionKey = PartitionKeyInternal.fromJsonString(partitionKeyRangeJson); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); - partitionKeyDefinition.kind(PartitionKind.HASH); + partitionKeyDefinition.setKind(PartitionKind.HASH); CommonsBridgeInternal.setV2(partitionKeyDefinition); ArrayList paths = new ArrayList(); for (int i = 0; i < partitionKey.getComponents().size(); i++) { @@ -427,7 +427,7 @@ private static void validateEffectivePartitionKeyV2(String partitionKeyRangeJson } if (paths.size() > 0) { - partitionKeyDefinition.paths(paths); + partitionKeyDefinition.setPaths(paths); } String hexEncodedEffectivePartitionKey = PartitionKeyInternalHelper.getEffectivePartitionKeyString(partitionKey, partitionKeyDefinition); @@ -441,7 +441,7 @@ private void verifyComparison(String leftKey, String rightKey, int result) { private static void verifyEffectivePartitionKeyEncoding(String buffer, int length, String expectedValue, boolean v2) { PartitionKeyDefinition pkDefinition = new PartitionKeyDefinition(); - pkDefinition.paths(ImmutableList.of("/field1")); + pkDefinition.setPaths(ImmutableList.of("/field1")); if (v2) { CommonsBridgeInternal.setV2(pkDefinition); } @@ -449,4 +449,4 @@ private static void verifyEffectivePartitionKeyEncoding(String buffer, int lengt PartitionKeyInternal pk = PartitionKeyInternalUtils.createPartitionKeyInternal(buffer.substring(0, length)); assertThat(PartitionKeyInternalHelper.getEffectivePartitionKeyString(pk, pkDefinition)).isEqualTo(expectedValue); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java similarity index 96% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java index e07fa9bca60b..38fa914e5dd5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionKeyTest.java @@ -52,7 +52,7 @@ public void partitionKeyCompare(Object partitionKey, String partitionKeyAsJson) @Test(groups = "unit") public void tooFewPartitionKeyComponents() { PartitionKeyDefinition pkd = new PartitionKeyDefinition(); - pkd.paths(ImmutableList.of("/pk1", "/pk2")); + pkd.setPaths(ImmutableList.of("/pk1", "/pk2")); PartitionKey pk = PartitionKey.fromJsonString("[\"PartitionKeyValue\"]"); try { @@ -69,7 +69,7 @@ public void tooFewPartitionKeyComponents() { @Test(groups = "unit") public void tooManyPartitionKeyComponents() { PartitionKeyDefinition pkd = new PartitionKeyDefinition(); - pkd.paths(ImmutableList.of("/pk1")); + pkd.setPaths(ImmutableList.of("/pk1")); PartitionKey pk = PartitionKey.fromJsonString("[true, false]"); try { @@ -79,4 +79,4 @@ public void tooManyPartitionKeyComponents() { assertThat(e.getMessage()).isEqualTo(RMResources.TooManyPartitionKeyComponents); } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java index 739321531d9c..7c40019ab645 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/PartitionReplicasAddressesValidator.java @@ -2,11 +2,6 @@ // Licensed under the MIT License. package com.azure.data.cosmos.internal.directconnectivity; -import com.azure.data.cosmos.internal.directconnectivity.Address; -import com.azure.data.cosmos.internal.directconnectivity.Protocol; -import com.azure.data.cosmos.internal.directconnectivity.Address; -import com.azure.data.cosmos.internal.directconnectivity.Protocol; - import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -86,7 +81,7 @@ public void validate(Collection
addresses) { AddressValidator validator = new AddressValidator.Builder() .withPartitionKeyRangeId(partitionKeyRangeId) - .withRid(a.resourceId()) + .withRid(a.getResourceId()) .build(); for (Address address : addresses) { @@ -110,7 +105,7 @@ public void validate(Collection
addresses) { AddressValidator validator = new AddressValidator.Builder() .withPartitionKeyRangeId(a.getParitionKeyRangeId()) - .withRid(a.resourceId()) + .withRid(a.getResourceId()) .build(); for (Address address : addresses) { @@ -139,4 +134,4 @@ public void validate(Collection
addresses) { return this; } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReaderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReaderTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReaderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/QuorumReaderTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java index a013e4a2b1d7..a6c9fee31d4f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReflectionUtils.java @@ -3,8 +3,8 @@ package com.azure.data.cosmos.internal.directconnectivity; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.AsyncDocumentClient; -import com.azure.data.cosmos.CosmosClient; import com.azure.data.cosmos.internal.RxDocumentClientImpl; import com.azure.data.cosmos.internal.http.HttpClient; import org.apache.commons.lang3.reflect.FieldUtils; @@ -62,11 +62,11 @@ public static void setDirectHttpsHttpClient(RxDocumentClientImpl client, HttpCli set(transportClient, newHttpClient, "httpClient"); } - public static AsyncDocumentClient getAsyncDocumentClient(CosmosClient client) { + public static AsyncDocumentClient getAsyncDocumentClient(CosmosAsyncClient client) { return get(AsyncDocumentClient.class, client, "asyncDocumentClient"); } - public static void setAsyncDocumentClient(CosmosClient client, RxDocumentClientImpl rxClient) { + public static void setAsyncDocumentClient(CosmosAsyncClient client, RxDocumentClientImpl rxClient) { set(client, rxClient, "asyncDocumentClient"); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicaAddressFactory.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicaAddressFactory.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicaAddressFactory.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicaAddressFactory.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java index 7fa9a01f2c74..1bf5839039aa 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientPartitionSplitTest.java @@ -187,7 +187,7 @@ public static void validateFailure(Mono single, FailureValidator private PartitionKeyRange partitionKeyRangeWithId(String id) { PartitionKeyRange partitionKeyRange = Mockito.mock(PartitionKeyRange.class); - Mockito.doReturn(id).when(partitionKeyRange).id(); + Mockito.doReturn(id).when(partitionKeyRange).getId(); return partitionKeyRange; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/ReplicatedResourceClientTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderDotNetTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderDotNetTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderDotNetTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderDotNetTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java index 99959406c852..25cbe0ad1541 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderTest.java @@ -169,10 +169,10 @@ public void sessionNotAvailableFromSomeReplicas_FindReplicaSatisfyingRequestedSe long globalCommittedLsn = 651174; String partitionKeyRangeId = "73"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + slowReplicaLSN); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(slowReplicaLSN)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(slowReplicaLSN)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + slowReplicaLSN); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(slowReplicaLSN)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(slowReplicaLSN)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); long fasterReplicaLSN = 651176; @@ -259,10 +259,10 @@ public void sessionRead_LegitimateNotFound() { String partitionKeyRangeId = "73"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -328,10 +328,10 @@ public void sessionRead_ReplicasDoNotHaveTheRequestedLSN_NoResult() { String partitionKeyRangeId = "73"; NotFoundException foundException = new NotFoundException(); - foundException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); - foundException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + foundException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); + foundException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -390,10 +390,10 @@ public void requestRateTooLarge_BubbleUp() { String partitionKeyRangeId = "257"; RequestRateTooLargeException requestRateTooLargeException = new RequestRateTooLargeException(); - requestRateTooLargeException.responseHeaders().put(HttpConstants.HttpHeaders.LSN, Long.toString(lsn)); - requestRateTooLargeException.responseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); - requestRateTooLargeException.responseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); - requestRateTooLargeException.responseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); + requestRateTooLargeException.getResponseHeaders().put(HttpConstants.HttpHeaders.LSN, Long.toString(lsn)); + requestRateTooLargeException.getResponseHeaders().put(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, Long.toString(globalCommittedLsn)); + requestRateTooLargeException.getResponseHeaders().put(WFConstants.BackendHeaders.LOCAL_LSN, Long.toString(lsn)); + requestRateTooLargeException.getResponseHeaders().put(HttpConstants.HttpHeaders.SESSION_TOKEN, partitionKeyRangeId + ":-1#" + lsn); TransportClientWrapper transportClientWrapper = new TransportClientWrapper.Builder.ReplicaResponseBuilder .SequentialBuilder() @@ -788,7 +788,7 @@ public static void validateException(Mono single, private PartitionKeyRange partitionKeyRangeWithId(String id) { PartitionKeyRange partitionKeyRange = Mockito.mock(PartitionKeyRange.class); - Mockito.doReturn(id).when(partitionKeyRange).id(); + Mockito.doReturn(id).when(partitionKeyRange).getId(); return partitionKeyRange; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderUnderTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderUnderTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderUnderTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreReaderUnderTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResponseValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResultValidator.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResultValidator.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResultValidator.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/StoreResultValidator.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelperTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelperTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelperTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TimeoutHelperTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TransportClientWrapper.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TransportClientWrapper.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TransportClientWrapper.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/TransportClientWrapper.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtilityTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtilityTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtilityTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/WebExceptionUtilityTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java index 062847e91c85..625fa7fa2336 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/DocumentProducerTest.java @@ -95,7 +95,7 @@ private IRetryPolicyFactory mockDocumentClientIRetryPolicyFactory() { GlobalEndpointManager globalEndpointManager = Mockito.mock(GlobalEndpointManager.class); Mockito.doReturn(url).when(globalEndpointManager).resolveServiceEndpoint(Mockito.any(RxDocumentServiceRequest.class)); doReturn(false).when(globalEndpointManager).isClosed(); - return new RetryPolicy(globalEndpointManager, ConnectionPolicy.defaultPolicy()); + return new RetryPolicy(globalEndpointManager, ConnectionPolicy.getDefaultPolicy()); } @Test(groups = {"unit"}, dataProvider = "splitParamProvider", timeOut = TIMEOUT) @@ -320,7 +320,7 @@ public void simple() { // continuation tokens assertThat(requestCreator.invocations.get(0).continuationToken).isEqualTo(initialContinuationToken); - assertThat(requestCreator.invocations.stream().skip(1).map(i -> i.continuationToken).collect(Collectors.toList())).containsExactlyElementsOf(responses.stream().limit(9).map(r -> r.continuationToken()).collect(Collectors.toList())); + assertThat(requestCreator.invocations.stream().skip(1).map(i -> i.continuationToken).collect(Collectors.toList())).containsExactlyElementsOf(responses.stream().limit(9).map(r -> r.getContinuationToken()).collect(Collectors.toList())); // source partition assertThat(requestCreator.invocations.stream().map(i -> i.sourcePartition).distinct().collect(Collectors.toList())).containsExactlyElementsOf(Collections.singletonList(targetRange)); @@ -380,11 +380,11 @@ public void retries() { assertThat(requestCreator.invocations.stream().map(i -> i.sourcePartition).distinct().collect(Collectors.toList())).containsExactlyElementsOf(Collections.singletonList(targetRange)); List resultContinuationToken = - subscriber.values().stream().map(r -> r.pageResult.continuationToken()).collect(Collectors.toList()); + subscriber.values().stream().map(r -> r.pageResult.getContinuationToken()).collect(Collectors.toList()); List beforeExceptionContinuationTokens = - responsesBeforeThrottle.stream().map(FeedResponse::continuationToken).collect(Collectors.toList()); + responsesBeforeThrottle.stream().map(FeedResponse::getContinuationToken).collect(Collectors.toList()); List afterExceptionContinuationTokens = - responsesAfterThrottle.stream().map(FeedResponse::continuationToken).collect(Collectors.toList()); + responsesAfterThrottle.stream().map(FeedResponse::getContinuationToken).collect(Collectors.toList()); assertThat(resultContinuationToken).containsExactlyElementsOf(Iterables.concat(beforeExceptionContinuationTokens, afterExceptionContinuationTokens)); @@ -436,8 +436,8 @@ public void retriesExhausted() { private CosmosClientException mockThrottlingException(long retriesAfter) { CosmosClientException throttleException = mock(CosmosClientException.class); - doReturn(429).when(throttleException).statusCode(); - doReturn(retriesAfter).when(throttleException).retryAfterInMilliseconds(); + doReturn(429).when(throttleException).getStatusCode(); + doReturn(retriesAfter).when(throttleException).getRetryAfterInMilliseconds(); return throttleException; } @@ -500,7 +500,7 @@ private List> mockFeedResponsesPartiallySorted(String par private int getLastValueInAsc(int initialValue, List> responsesList) { Integer value = null; for (FeedResponse page : responsesList) { - for (Document d : page.results()) { + for (Document d : page.getResults()) { Integer tmp = d.getInt(OrderByIntFieldName); if (tmp != null) { value = tmp; @@ -525,7 +525,7 @@ private IDocumentQueryClient mockQueryClient(List replacement private PartitionKeyRange mockPartitionKeyRange(String partitionKeyRangeId) { PartitionKeyRange pkr = Mockito.mock(PartitionKeyRange.class); - doReturn(partitionKeyRangeId).when(pkr).id(); + doReturn(partitionKeyRangeId).when(pkr).getId(); doReturn(partitionKeyRangeId + ":AA").when(pkr).getMinInclusive(); doReturn(partitionKeyRangeId + ":FF").when(pkr).getMaxExclusive(); return pkr; @@ -550,22 +550,22 @@ private static void validateSplitCaptureRequests(List i.sourcePartition.id().equals(parentPartitionId))).hasSize(numberOfResultPagesFromParentBeforeSplit + 1); + assertThat(capturedInvocationList.stream().limit(numberOfResultPagesFromParentBeforeSplit + 1).filter(i -> i.sourcePartition.getId().equals(parentPartitionId))).hasSize(numberOfResultPagesFromParentBeforeSplit + 1); - assertThat(capturedInvocationList.stream().skip(numberOfResultPagesFromParentBeforeSplit + 1).filter(i -> i.sourcePartition.id().equals(leftChildPartitionId))).hasSize(numberOfResultPagesFromLeftChildAfterSplit); + assertThat(capturedInvocationList.stream().skip(numberOfResultPagesFromParentBeforeSplit + 1).filter(i -> i.sourcePartition.getId().equals(leftChildPartitionId))).hasSize(numberOfResultPagesFromLeftChildAfterSplit); - assertThat(capturedInvocationList.stream().skip(numberOfResultPagesFromParentBeforeSplit + 1).filter(i -> i.sourcePartition.id().equals(rightChildPartitionId))).hasSize(numberOfResultPagesFromRightChildAfterSplit); + assertThat(capturedInvocationList.stream().skip(numberOfResultPagesFromParentBeforeSplit + 1).filter(i -> i.sourcePartition.getId().equals(rightChildPartitionId))).hasSize(numberOfResultPagesFromRightChildAfterSplit); - BiFunction, String, Stream> filterByPartition = (stream, partitionId) -> stream.filter(i -> i.sourcePartition.id().equals(partitionId)); + BiFunction, String, Stream> filterByPartition = (stream, partitionId) -> stream.filter(i -> i.sourcePartition.getId().equals(partitionId)); Function>, Stream> extractContinuationToken = - (list) -> list.stream().map(p -> p.continuationToken()); + (list) -> list.stream().map(p -> p.getContinuationToken()); assertThat(filterByPartition.apply(capturedInvocationList.stream(), parentPartitionId).map(r -> r.continuationToken)).containsExactlyElementsOf(toList(Stream.concat(Stream.of(initialContinuationToken), extractContinuationToken.apply(expectedResultPagesFromParentPartitionBeforeSplit)))); String expectedInitialChildContinuationTokenInheritedFromParent = expectedResultPagesFromParentPartitionBeforeSplit.size() > 0 ? - expectedResultPagesFromParentPartitionBeforeSplit.get(expectedResultPagesFromParentPartitionBeforeSplit.size() - 1).continuationToken() : initialContinuationToken; + expectedResultPagesFromParentPartitionBeforeSplit.get(expectedResultPagesFromParentPartitionBeforeSplit.size() - 1).getContinuationToken() : initialContinuationToken; assertThat(filterByPartition.andThen(s -> s.map(r -> r.continuationToken)).apply(capturedInvocationList.stream(), leftChildPartitionId)).containsExactlyElementsOf(toList(Stream.concat(Stream.of(expectedInitialChildContinuationTokenInheritedFromParent), extractContinuationToken.apply(expectedResultPagesFromLeftChildPartition) //drop last page with null cp which doesn't trigger any request @@ -587,15 +587,15 @@ private static void sanityCheckSplitValidation(String parentPartitionId, String assertThat(resultFromRightChild).hasSize(numberOfResultPagesFromRightChildAfterSplit); //validate expected result continuation token - assertThat(toList(resultFromParent.stream().map(p -> p.continuationToken()).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); + assertThat(toList(resultFromParent.stream().map(p -> p.getContinuationToken()).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); - assertThat(toList(resultFromLeftChild.stream().map(p -> p.continuationToken()).limit(resultFromLeftChild.size() - 1).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); + assertThat(toList(resultFromLeftChild.stream().map(p -> p.getContinuationToken()).limit(resultFromLeftChild.size() - 1).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); - assertThat(resultFromLeftChild.get(resultFromLeftChild.size() - 1).continuationToken()).isNullOrEmpty(); + assertThat(resultFromLeftChild.get(resultFromLeftChild.size() - 1).getContinuationToken()).isNullOrEmpty(); - assertThat(toList(resultFromRightChild.stream().map(p -> p.continuationToken()).limit(resultFromRightChild.size() - 1).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); + assertThat(toList(resultFromRightChild.stream().map(p -> p.getContinuationToken()).limit(resultFromRightChild.size() - 1).filter(cp -> Strings.isNullOrEmpty(cp)))).isEmpty(); - assertThat(resultFromRightChild.get(resultFromRightChild.size() - 1).continuationToken()).isNullOrEmpty(); + assertThat(resultFromRightChild.get(resultFromRightChild.size() - 1).getContinuationToken()).isNullOrEmpty(); } private void validateSplitResults(List.DocumentProducerFeedResponse> actualPages, @@ -605,7 +605,7 @@ private void validateSplitResults(List.DocumentProduc if (isOrderby) { Supplier> getStreamOfActualDocuments = - () -> actualPages.stream().flatMap(p -> p.pageResult.results().stream()); + () -> actualPages.stream().flatMap(p -> p.pageResult.getResults().stream()); Comparator comparator = new Comparator() { @Override @@ -624,11 +624,11 @@ public int compare(Document o1, Document o2) { List expectedDocuments = Stream.concat(Stream.concat(resultFromParent.stream(), resultFromLeftChild.stream()), - resultFromRightChild.stream()).flatMap(p -> p.results().stream()).sorted(comparator).collect(Collectors.toList()); + resultFromRightChild.stream()).flatMap(p -> p.getResults().stream()).sorted(comparator).collect(Collectors.toList()); List actualDocuments = - getStreamOfActualDocuments.get().map(d -> d.id()).collect(Collectors.toList()); - assertThat(actualDocuments).containsExactlyElementsOf(expectedDocuments.stream().map(d -> d.id()).collect(Collectors.toList())); + getStreamOfActualDocuments.get().map(d -> d.getId()).collect(Collectors.toList()); + assertThat(actualDocuments).containsExactlyElementsOf(expectedDocuments.stream().map(d -> d.getId()).collect(Collectors.toList())); } else { assertThat(actualPages).hasSize(resultFromParent.size() + resultFromLeftChild.size() + resultFromRightChild.size()); @@ -663,7 +663,7 @@ private static List toList(Stream stream) { } private static List partitionKeyRangeIds(List.DocumentProducerFeedResponse> responses) { - return responses.stream().map(dpFR -> dpFR.sourcePartitionKeyRange.id()).collect(Collectors.toList()); + return responses.stream().map(dpFR -> dpFR.sourcePartitionKeyRange.getId()).collect(Collectors.toList()); } private static void validateResults(List> captured, @@ -679,13 +679,13 @@ private static void validateResults(List> captured, } private static void assertEqual(FeedResponse actualPage, FeedResponse expectedPage) { - assertThat(actualPage.results()).hasSameSizeAs(actualPage.results()); - assertThat(actualPage.continuationToken()).isEqualTo(expectedPage.continuationToken()); + assertThat(actualPage.getResults()).hasSameSizeAs(actualPage.getResults()); + assertThat(actualPage.getContinuationToken()).isEqualTo(expectedPage.getContinuationToken()); - for (int i = 0; i < actualPage.results().size(); i++) { - Document actualDoc = actualPage.results().get(i); - Document expectedDoc = expectedPage.results().get(i); - assertThat(actualDoc.id()).isEqualTo(expectedDoc.id()); + for (int i = 0; i < actualPage.getResults().size(); i++) { + Document actualDoc = actualPage.getResults().get(i); + Document expectedDoc = expectedPage.getResults().get(i); + assertThat(actualDoc.getId()).isEqualTo(expectedDoc.getId()); assertThat(actualDoc.getString("prop")).isEqualTo(expectedDoc.getString("prop")); } } @@ -881,7 +881,7 @@ public static RequestCreator simpleMock() { public RxDocumentServiceRequest apply(PartitionKeyRange pkr, String cp, Integer ps) { synchronized (this) { RxDocumentServiceRequest req = Mockito.mock(RxDocumentServiceRequest.class); - PartitionKeyRangeIdentity pkri = new PartitionKeyRangeIdentity(pkr.id()); + PartitionKeyRangeIdentity pkri = new PartitionKeyRangeIdentity(pkr.getId()); doReturn(pkri).when(req).getPartitionKeyRangeIdentity(); doReturn(cp).when(req).getContinuation(); invocations.add(new CapturedInvocation(pkr, cp, ps, req)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FeedResponseBuilder.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FeedResponseBuilder.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FeedResponseBuilder.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FeedResponseBuilder.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java index ead0be5f708c..16de0c407dbf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/query/FetcherTest.java @@ -87,7 +87,7 @@ public void query(FeedOptions options, int top) { Function>> executeFunc = request -> { FeedResponse rsp = feedResponseList.get(executeIndex.getAndIncrement()); - totalResultsReceived.addAndGet(rsp.results().size()); + totalResultsReceived.addAndGet(rsp.getResults().size()); return Flux.just(rsp); }; @@ -108,7 +108,7 @@ private void validateFetcher(Fetcher fetcher, int index = 0; while(index < feedResponseList.size()) { assertThat(fetcher.shouldFetchMore()).describedAs("should fetch more pages").isTrue(); - totalNumberOfDocs += validate(fetcher.nextPage()).results().size(); + totalNumberOfDocs += validate(fetcher.nextPage()).getResults().size(); if ((top != -1) && (totalNumberOfDocs >= top)) { break; @@ -122,7 +122,7 @@ private void validateFetcher(Fetcher fetcher, public void changeFeed() { ChangeFeedOptions options = new ChangeFeedOptions(); - options.maxItemCount(100); + options.setMaxItemCount(100); boolean isChangeFeed = true; int top = -1; @@ -142,9 +142,9 @@ public void changeFeed() { AtomicInteger requestIndex = new AtomicInteger(0); BiFunction createRequestFunc = (token, maxItemCount) -> { - assertThat(maxItemCount).describedAs("max item count").isEqualTo(options.maxItemCount()); + assertThat(maxItemCount).describedAs("max getItem count").isEqualTo(options.getMaxItemCount()); assertThat(token).describedAs("continuation token").isEqualTo( - getExpectedContinuationTokenInRequest(options.requestContinuation(), feedResponseList, requestIndex.getAndIncrement())); + getExpectedContinuationTokenInRequest(options.getRequestContinuation(), feedResponseList, requestIndex.getAndIncrement())); return mock(RxDocumentServiceRequest.class); }; @@ -156,8 +156,8 @@ public void changeFeed() { }; Fetcher fetcher = - new Fetcher<>(createRequestFunc, executeFunc, options.requestContinuation(), isChangeFeed, top, - options.maxItemCount()); + new Fetcher<>(createRequestFunc, executeFunc, options.getRequestContinuation(), isChangeFeed, top, + options.getMaxItemCount()); validateFetcher(fetcher, options, feedResponseList); } @@ -192,7 +192,7 @@ private String getExpectedContinuationTokenInRequest(String continuationToken, return continuationToken; } - return feedResponseList.get(requestIndex - 1).continuationToken(); + return feedResponseList.get(requestIndex - 1).getContinuationToken(); } private int getExpectedMaxItemCountInRequest(FeedOptions options, @@ -204,7 +204,7 @@ private int getExpectedMaxItemCountInRequest(FeedOptions options, } int numberOfReceivedItemsSoFar = - feedResponseList.subList(0, requestIndex).stream().mapToInt(rsp -> rsp.results().size()).sum(); + feedResponseList.subList(0, requestIndex).stream().mapToInt(rsp -> rsp.getResults().size()).sum(); return Math.min(top - numberOfReceivedItemsSoFar, options.maxItemCount()); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java similarity index 95% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java index e2a79621c203..5d0471a438da 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/InMemoryCollectionRoutingMapTest.java @@ -43,20 +43,20 @@ public void collectionRoutingMap() { ServerIdentityImp.of(3))), StringUtils.EMPTY); - assertThat("0").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(0).id()); - assertThat("1").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(1).id()); - assertThat("2").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(2).id()); - assertThat("3").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(3).id()); + assertThat("0").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(0).getId()); + assertThat("1").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(1).getId()); + assertThat("2").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(2).getId()); + assertThat("3").isEqualTo(routingMap.getOrderedPartitionKeyRanges().get(3).getId()); - assertThat("0").isEqualTo(routingMap.getRangeByEffectivePartitionKey("").id()); - assertThat("0").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000000").id()); - assertThat("1").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000030").id()); - assertThat("1").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000031").id()); - assertThat("3").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000071").id()); + assertThat("0").isEqualTo(routingMap.getRangeByEffectivePartitionKey("").getId()); + assertThat("0").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000000").getId()); + assertThat("1").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000030").getId()); + assertThat("1").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000031").getId()); + assertThat("3").isEqualTo(routingMap.getRangeByEffectivePartitionKey("0000000071").getId()); - assertThat("0").isEqualTo(routingMap.getRangeByPartitionKeyRangeId("0").id()); - assertThat("1").isEqualTo(routingMap.getRangeByPartitionKeyRangeId("1").id()); + assertThat("0").isEqualTo(routingMap.getRangeByPartitionKeyRangeId("0").getId()); + assertThat("1").isEqualTo(routingMap.getRangeByPartitionKeyRangeId("1").getId()); assertThat(4).isEqualTo( routingMap @@ -74,7 +74,7 @@ public void collectionRoutingMap() { assertThat(1).isEqualTo(partitionKeyRanges.size()); Iterator iterator = partitionKeyRanges.iterator(); - assertThat("1").isEqualTo(iterator.next().id()); + assertThat("1").isEqualTo(iterator.next().getId()); Collection partitionKeyRanges1 = routingMap .getOverlappingRanges(Arrays.asList(new Range("0000000040", "0000000045", true, true), @@ -83,8 +83,8 @@ public void collectionRoutingMap() { assertThat(2).isEqualTo(partitionKeyRanges1.size()); Iterator iterator1 = partitionKeyRanges1.iterator(); - assertThat("1").isEqualTo(iterator1.next().id()); - assertThat("2").isEqualTo(iterator1.next().id()); + assertThat("1").isEqualTo(iterator1.next().getId()); + assertThat("2").isEqualTo(iterator1.next().getId()); } @Test(groups = { "unit" }, expectedExceptions = IllegalStateException.class) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java index a6f2d7953f4d..77baf7fa10bd 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/LocationCacheTest.java @@ -142,9 +142,9 @@ private void initialize( this.cache.onDatabaseAccountRead(this.databaseAccount); ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.enableEndpointDiscovery(enableEndpointDiscovery); + connectionPolicy.setEnableEndpointDiscovery(enableEndpointDiscovery); BridgeInternal.setUseMultipleWriteLocations(connectionPolicy, useMultipleWriteLocations); - connectionPolicy.preferredLocations(this.preferredLocations); + connectionPolicy.setPreferredLocations(this.preferredLocations); this.endpointManager = new GlobalEndpointManager(mockedClient, connectionPolicy, configs); } @@ -198,19 +198,19 @@ private void validateLocationCacheAsync( UnmodifiableList currentWriteEndpoints = this.cache.getWriteEndpoints(); UnmodifiableList currentReadEndpoints = this.cache.getReadEndpoints(); for (int i = 0; i < readLocationIndex; i++) { - this.cache.markEndpointUnavailableForRead(createUrl(Iterables.get(this.databaseAccount.readableLocations(), i).endpoint())); - this.endpointManager.markEndpointUnavailableForRead(createUrl(Iterables.get(this.databaseAccount.readableLocations(), i).endpoint()));; + this.cache.markEndpointUnavailableForRead(createUrl(Iterables.get(this.databaseAccount.getReadableLocations(), i).getEndpoint())); + this.endpointManager.markEndpointUnavailableForRead(createUrl(Iterables.get(this.databaseAccount.getReadableLocations(), i).getEndpoint()));; } for (int i = 0; i < writeLocationIndex; i++) { - this.cache.markEndpointUnavailableForWrite(createUrl(Iterables.get(this.databaseAccount.writableLocations(), i).endpoint())); - this.endpointManager.markEndpointUnavailableForWrite(createUrl(Iterables.get(this.databaseAccount.writableLocations(), i).endpoint())); + this.cache.markEndpointUnavailableForWrite(createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), i).getEndpoint())); + this.endpointManager.markEndpointUnavailableForWrite(createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), i).getEndpoint())); } - Map writeEndpointByLocation = toStream(this.databaseAccount.writableLocations()) - .collect(Collectors.toMap(i -> i.name(), i -> createUrl(i.endpoint()))); + Map writeEndpointByLocation = toStream(this.databaseAccount.getWritableLocations()) + .collect(Collectors.toMap(i -> i.getName(), i -> createUrl(i.getEndpoint()))); - Map readEndpointByLocation = toStream(this.databaseAccount.readableLocations()) - .collect(Collectors.toMap(i -> i.name(), i -> createUrl(i.endpoint()))); + Map readEndpointByLocation = toStream(this.databaseAccount.getReadableLocations()) + .collect(Collectors.toMap(i -> i.getName(), i -> createUrl(i.getEndpoint()))); URL[] preferredAvailableWriteEndpoints = toStream(this.preferredLocations).skip(writeLocationIndex) .filter(location -> writeEndpointByLocation.containsKey(location)) @@ -264,8 +264,8 @@ private void validateEndpointRefresh( false : isFirstWriteEndpointUnavailable; if (this.preferredLocations.size() > 0) { String mostPreferredReadLocationName = this.preferredLocations.stream() - .filter(location -> toStream(databaseAccount.readableLocations()) - .anyMatch(readLocation -> readLocation.name().equals(location))) + .filter(location -> toStream(databaseAccount.getReadableLocations()) + .anyMatch(readLocation -> readLocation.getName().equals(location))) .findFirst().orElse(null); URL mostPreferredReadEndpoint = LocationCacheTest.EndpointByLocation.get(mostPreferredReadLocationName); @@ -273,8 +273,8 @@ private void validateEndpointRefresh( true : (!areEqual(preferredAvailableReadEndpoints[0], mostPreferredReadEndpoint)); String mostPreferredWriteLocationName = this.preferredLocations.stream() - .filter(location -> toStream(databaseAccount.writableLocations()) - .anyMatch(writeLocation -> writeLocation.name().equals(location))) + .filter(location -> toStream(databaseAccount.getWritableLocations()) + .anyMatch(writeLocation -> writeLocation.getName().equals(location))) .findFirst().orElse(null); URL mostPreferredWriteEndpoint = LocationCacheTest.EndpointByLocation.get(mostPreferredWriteLocationName); @@ -335,18 +335,18 @@ private void validateRequestEndpointResolution( firstAvailableWriteEndpoint = LocationCacheTest.DefaultEndpoint; secondAvailableWriteEndpoint = LocationCacheTest.DefaultEndpoint; } else if (!useMultipleWriteLocations) { - firstAvailableWriteEndpoint = createUrl(Iterables.get(this.databaseAccount.writableLocations(), 0).endpoint()); - secondAvailableWriteEndpoint = createUrl(Iterables.get(this.databaseAccount.writableLocations(), 1).endpoint()); + firstAvailableWriteEndpoint = createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), 0).getEndpoint()); + secondAvailableWriteEndpoint = createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), 1).getEndpoint()); } else if (availableWriteEndpoints.length > 1) { firstAvailableWriteEndpoint = availableWriteEndpoints[0]; secondAvailableWriteEndpoint = availableWriteEndpoints[1]; } else if (availableWriteEndpoints.length > 0) { firstAvailableWriteEndpoint = availableWriteEndpoints[0]; - Iterator writeLocationsIterator = databaseAccount.writableLocations().iterator(); - String writeEndpoint = writeLocationsIterator.next().endpoint(); + Iterator writeLocationsIterator = databaseAccount.getWritableLocations().iterator(); + String writeEndpoint = writeLocationsIterator.next().getEndpoint(); secondAvailableWriteEndpoint = writeEndpoint != firstAvailableWriteEndpoint.toString() ? new URL(writeEndpoint) - : new URL(writeLocationsIterator.next().endpoint()); + : new URL(writeLocationsIterator.next().getEndpoint()); } else { firstAvailableWriteEndpoint = LocationCacheTest.DefaultEndpoint; secondAvailableWriteEndpoint = LocationCacheTest.DefaultEndpoint; @@ -366,11 +366,11 @@ private void validateRequestEndpointResolution( URL firstWriteEnpoint = !endpointDiscoveryEnabled ? LocationCacheTest.DefaultEndpoint : - createUrl(Iterables.get(this.databaseAccount.writableLocations(), 0).endpoint()); + createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), 0).getEndpoint()); URL secondWriteEnpoint = !endpointDiscoveryEnabled ? LocationCacheTest.DefaultEndpoint : - createUrl(Iterables.get(this.databaseAccount.writableLocations(), 1).endpoint()); + createUrl(Iterables.get(this.databaseAccount.getWritableLocations(), 1).getEndpoint()); // If current write endpoint is unavailable, write endpoints order doesn't change // ALL write requests flip-flop between current write and alternate write endpoint @@ -380,7 +380,7 @@ private void validateRequestEndpointResolution( assertThat(secondAvailableWriteEndpoint).isEqualTo(this.resolveEndpointForWriteRequest(ResourceType.Document, true)); assertThat(firstAvailableWriteEndpoint).isEqualTo(this.resolveEndpointForWriteRequest(ResourceType.Document, false)); - // Writes to other resource types should be directed to first/second write endpoint + // Writes to other resource types should be directed to first/second write getEndpoint assertThat(firstWriteEnpoint).isEqualTo(this.resolveEndpointForWriteRequest(ResourceType.Database, false)); assertThat(secondWriteEnpoint).isEqualTo(this.resolveEndpointForWriteRequest(ResourceType.Database, true)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalUtils.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalUtils.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/PartitionKeyInternalUtils.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java similarity index 99% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java index 42201b08dbf8..a1feace139d1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/RoutingMapProviderHelperTest.java @@ -84,7 +84,7 @@ public void getOverlappingRanges() { Function func = new Function() { @Override public String apply(PartitionKeyRange range) { - return range.id(); + return range.getId(); } }; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponentTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponentTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponentTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/internal/routing/StringPartitionKeyComponentTest.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java index 9e37686cf4f9..b6d9703af3d0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/AggregateQueryTests.java @@ -2,14 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.Document; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; import com.azure.data.cosmos.internal.FeedResponseListValidator; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -46,7 +41,7 @@ public AggregateConfig(String operator, Object expected, String condition) { } } - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private ArrayList docs = new ArrayList(); private ArrayList queryConfigs = new ArrayList(); @@ -58,7 +53,7 @@ public AggregateConfig(String operator, Object expected, String condition) { private int numberOfDocumentsWithNumericId; private int numberOfDocsWithSamePartitionKey = 400; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public AggregateQueryTests(CosmosClientBuilder clientBuilder) { @@ -69,9 +64,9 @@ public AggregateQueryTests(CosmosClientBuilder clientBuilder) { public void queryDocumentsWithAggregates(boolean qmEnabled) throws Exception { FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(qmEnabled); - options.maxDegreeOfParallelism(2); + options.setMaxDegreeOfParallelism(2); for (QueryConfig queryConfig : queryConfigs) { @@ -97,7 +92,7 @@ public void generateTestData() { Object[] values = new Object[]{null, false, true, "abc", "cdfg", "opqrs", "ttttttt", "xyz", "oo", "ppp"}; for (int i = 0; i < values.length; i++) { CosmosItemProperties d = new CosmosItemProperties(); - d.id(UUID.randomUUID().toString()); + d.setId(UUID.randomUUID().toString()); BridgeInternal.setProperty(d, partitionKey, values[i]); docs.add(d); } @@ -105,9 +100,9 @@ public void generateTestData() { for (int i = 0; i < numberOfDocsWithSamePartitionKey; i++) { CosmosItemProperties d = new CosmosItemProperties(); BridgeInternal.setProperty(d, partitionKey, uniquePartitionKey); - BridgeInternal.setProperty(d, "resourceId", Integer.toString(i)); + BridgeInternal.setProperty(d, "getResourceId", Integer.toString(i)); BridgeInternal.setProperty(d, field, i + 1); - d.id(UUID.randomUUID().toString()); + d.setId(UUID.randomUUID().toString()); docs.add(d); } @@ -115,7 +110,7 @@ public void generateTestData() { for (int i = 0; i < numberOfDocumentsWithNumericId; i++) { CosmosItemProperties d = new CosmosItemProperties(); BridgeInternal.setProperty(d, partitionKey, i + 1); - d.id(UUID.randomUUID().toString()); + d.setId(UUID.randomUUID().toString()); docs.add(d); } @@ -182,7 +177,7 @@ public void afterClass() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT * 2) public void beforeClass() throws Exception { - client = this.clientBuilder().build(); + client = this.clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java index 60b31f0c8d93..1fcb7769caab 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureCrossPartitionTest.java @@ -2,23 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.ClientUnderTestBuilder; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.DataType; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.IncludedPath; -import com.azure.data.cosmos.Index; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.data.cosmos.PartitionKeyDefinition; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.RxDocumentClientUnderTest; import com.azure.data.cosmos.internal.TestUtils; import io.reactivex.subscribers.TestSubscriber; @@ -48,43 +33,43 @@ public class BackPressureCrossPartitionTest extends TestSuiteBase { private static final int SETUP_TIMEOUT = 60000; private int numberOfDocs = 4000; - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; private List createdDocuments; - private CosmosClient client; + private CosmosAsyncClient client; private int numberOfPartitions; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } static protected CosmosContainerProperties getCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); - BridgeInternal.setProperty(stringIndex, "precision", -1); + BridgeInternal.setProperty(stringIndex, "getPrecision", -1); indexes.add(stringIndex); Index numberIndex = Index.Range(DataType.NUMBER); - BridgeInternal.setProperty(numberIndex, "precision", -1); + BridgeInternal.setProperty(numberIndex, "getPrecision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties( UUID.randomUUID().toString(), partitionKeyDef); - collectionDefinition.indexingPolicy(indexingPolicy); + collectionDefinition.setIndexingPolicy(indexingPolicy); return collectionDefinition; } @@ -96,7 +81,7 @@ public BackPressureCrossPartitionTest(CosmosClientBuilder clientBuilder) { private void warmUp() { FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); // ensure collection is cached createdCollection.queryItems("SELECT * FROM r", options).blockFirst(); } @@ -120,9 +105,9 @@ public Object[][] queryProvider() { @Test(groups = { "long" }, dataProvider = "queryProvider", timeOut = 2 * TIMEOUT) public void query(String query, int maxItemCount, int maxExpectedBufferedCountForBackPressure, int expectedNumberOfResults) throws Exception { FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(maxItemCount); - options.maxDegreeOfParallelism(2); + options.setMaxDegreeOfParallelism(2); Flux> queryObservable = createdCollection.queryItems(query, options); RxDocumentClientUnderTest rxClient = (RxDocumentClientUnderTest)CosmosBridgeInternal.getAsyncDocumentClient(client); @@ -160,13 +145,13 @@ public void query(String query, int maxItemCount, int maxExpectedBufferedCountFo subscriber.assertNoErrors(); subscriber.assertComplete(); - assertThat(subscriber.values().stream().mapToInt(p -> p.results().size()).sum()).isEqualTo(expectedNumberOfResults); + assertThat(subscriber.values().stream().mapToInt(p -> p.getResults().size()).sum()).isEqualTo(expectedNumberOfResults); } @BeforeClass(groups = { "long" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - client = new ClientUnderTestBuilder(clientBuilder()).build(); + client = new ClientUnderTestBuilder(clientBuilder()).buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); createdCollection = createCollection(createdDatabase, getCollectionDefinition(), options, 20000); @@ -180,7 +165,7 @@ public void beforeClass() { docDefList); numberOfPartitions = CosmosBridgeInternal.getAsyncDocumentClient(client).readPartitionKeyRanges(getCollectionLink(), null) - .flatMap(p -> Flux.fromIterable(p.results())).collectList().single().block().size(); + .flatMap(p -> Flux.fromIterable(p.getResults())).collectList().single().block().size(); waitIfNeededForReplicasToCatchUp(clientBuilder()); warmUp(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java index 22ff4bad41f2..d9852b951f39 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/BackPressureTest.java @@ -2,19 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.ClientUnderTestBuilder; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.Offer; -import com.azure.data.cosmos.PartitionKeyDefinition; import com.azure.data.cosmos.internal.RxDocumentClientUnderTest; import com.azure.data.cosmos.internal.TestUtils; import io.reactivex.subscribers.TestSubscriber; @@ -41,21 +31,21 @@ public class BackPressureTest extends TestSuiteBase { private static final int TIMEOUT = 200000; private static final int SETUP_TIMEOUT = 60000; - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; private List createdDocuments; - private CosmosClient client; + private CosmosAsyncClient client; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } private static CosmosContainerProperties getSinglePartitionCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); return collectionDefinition; @@ -70,7 +60,7 @@ public BackPressureTest(CosmosClientBuilder clientBuilder) { public void readFeed() throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(1); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.readAllItems(options); RxDocumentClientUnderTest rxClient = (RxDocumentClientUnderTest)CosmosBridgeInternal.getAsyncDocumentClient(client); @@ -109,7 +99,7 @@ public void readFeed() throws Exception { public void query() throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(1); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems("SELECT * from r", options); RxDocumentClientUnderTest rxClient = (RxDocumentClientUnderTest)CosmosBridgeInternal.getAsyncDocumentClient(client); @@ -148,7 +138,7 @@ public void query() throws Exception { public void beforeClass() throws Exception { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - client = new ClientUnderTestBuilder(clientBuilder()).build(); + client = new ClientUnderTestBuilder(clientBuilder()).buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); createdCollection = createCollection(createdDatabase, getSinglePartitionCollectionDefinition(), options, 1000); @@ -159,8 +149,8 @@ public void beforeClass() throws Exception { // for bulk insert and later queries. Offer offer = rxClient.queryOffers( String.format("SELECT * FROM r WHERE r.offerResourceId = '%s'", - createdCollection.read().block().properties().resourceId()) - , null).take(1).map(FeedResponse::results).single().block().get(0); + createdCollection.read().block().getProperties().getResourceId()) + , null).take(1).map(FeedResponse::getResults).single().block().get(0); offer.setThroughput(6000); offer = rxClient.replaceOffer(offer).single().block().getResource(); assertThat(offer.getThroughput()).isEqualTo(6000); @@ -179,7 +169,7 @@ public void beforeClass() throws Exception { private void warmUp() { // ensure collection is cached FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); createdCollection.queryItems("SELECT * from r", options).blockFirst(); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java similarity index 77% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java index 18c700950de9..0fe490fffdc9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedProcessorTest.java @@ -2,24 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.ChangeFeedProcessor; -import com.azure.data.cosmos.ChangeFeedProcessorOptions; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.SerializationFormattingPolicy; -import com.azure.data.cosmos.SqlParameter; -import com.azure.data.cosmos.SqlParameterList; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.changefeed.ServiceItemLease; import org.apache.commons.lang3.RandomStringUtils; import org.slf4j.Logger; @@ -46,9 +30,9 @@ public class ChangeFeedProcessorTest extends TestSuiteBase { private final static Logger log = LoggerFactory.getLogger(ChangeFeedProcessorTest.class); - private CosmosDatabase createdDatabase; - private CosmosContainer createdFeedCollection; - private CosmosContainer createdLeaseCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdFeedCollection; + private CosmosAsyncContainer createdLeaseCollection; private List createdDocuments; private static Map receivedDocuments; // private final String databaseId = "testdb1"; @@ -57,7 +41,7 @@ public class ChangeFeedProcessorTest extends TestSuiteBase { private final int FEED_COUNT = 10; private final int CHANGE_FEED_PROCESSOR_TIMEOUT = 5000; - private CosmosClient client; + private CosmosAsyncClient client; private ChangeFeedProcessor changeFeedProcessor; @@ -71,26 +55,26 @@ public void readFeedDocumentsStartFromBeginning() { setupReadFeedDocuments(); changeFeedProcessor = ChangeFeedProcessor.Builder() - .hostName(hostName) - .handleChanges(docs -> { + .setHostName(hostName) + .setHandleChanges(docs -> { ChangeFeedProcessorTest.log.info("START processing from thread {}", Thread.currentThread().getId()); for (CosmosItemProperties item : docs) { processItem(item); } ChangeFeedProcessorTest.log.info("END processing from thread {}", Thread.currentThread().getId()); }) - .feedContainer(createdFeedCollection) - .leaseContainer(createdLeaseCollection) - .options(new ChangeFeedProcessorOptions() - .leaseRenewInterval(Duration.ofSeconds(20)) - .leaseAcquireInterval(Duration.ofSeconds(10)) - .leaseExpirationInterval(Duration.ofSeconds(30)) - .feedPollDelay(Duration.ofSeconds(2)) - .leasePrefix("TEST") - .maxItemCount(10) - .startFromBeginning(true) - .maxScaleCount(0) // unlimited - .discardExistingLeases(true) + .setFeedContainer(createdFeedCollection) + .setLeaseContainer(createdLeaseCollection) + .setOptions(new ChangeFeedProcessorOptions() + .setLeaseRenewInterval(Duration.ofSeconds(20)) + .setLeaseAcquireInterval(Duration.ofSeconds(10)) + .setLeaseExpirationInterval(Duration.ofSeconds(30)) + .setFeedPollDelay(Duration.ofSeconds(2)) + .setLeasePrefix("TEST") + .setMaxItemCount(10) + .setStartFromBeginning(true) + .setMaxScaleCount(0) // unlimited + .setDiscardExistingLeases(true) ) .build(); @@ -112,7 +96,7 @@ public void readFeedDocumentsStartFromBeginning() { changeFeedProcessor.stop().subscribeOn(Schedulers.elastic()).timeout(Duration.ofMillis(CHANGE_FEED_PROCESSOR_TIMEOUT)).subscribe(); for (CosmosItemProperties item : createdDocuments) { - assertThat(receivedDocuments.containsKey(item.id())).as("Document with id: " + item.id()).isTrue(); + assertThat(receivedDocuments.containsKey(item.getId())).as("Document with getId: " + item.getId()).isTrue(); } // Wait for the feed processor to shutdown. @@ -127,27 +111,27 @@ public void readFeedDocumentsStartFromBeginning() { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void readFeedDocumentsStartFromCustomDate() { ChangeFeedProcessor changeFeedProcessor = ChangeFeedProcessor.Builder() - .hostName(hostName) - .handleChanges(docs -> { + .setHostName(hostName) + .setHandleChanges(docs -> { ChangeFeedProcessorTest.log.info("START processing from thread {}", Thread.currentThread().getId()); for (CosmosItemProperties item : docs) { processItem(item); } ChangeFeedProcessorTest.log.info("END processing from thread {}", Thread.currentThread().getId()); }) - .feedContainer(createdFeedCollection) - .leaseContainer(createdLeaseCollection) - .options(new ChangeFeedProcessorOptions() - .leaseRenewInterval(Duration.ofSeconds(20)) - .leaseAcquireInterval(Duration.ofSeconds(10)) - .leaseExpirationInterval(Duration.ofSeconds(30)) - .feedPollDelay(Duration.ofSeconds(1)) - .leasePrefix("TEST") - .maxItemCount(10) - .startTime(OffsetDateTime.now().minusDays(1)) - .minScaleCount(1) - .maxScaleCount(3) - .discardExistingLeases(true) + .setFeedContainer(createdFeedCollection) + .setLeaseContainer(createdLeaseCollection) + .setOptions(new ChangeFeedProcessorOptions() + .setLeaseRenewInterval(Duration.ofSeconds(20)) + .setLeaseAcquireInterval(Duration.ofSeconds(10)) + .setLeaseExpirationInterval(Duration.ofSeconds(30)) + .setFeedPollDelay(Duration.ofSeconds(1)) + .setLeasePrefix("TEST") + .setMaxItemCount(10) + .setStartTime(OffsetDateTime.now().minusDays(1)) + .setMinScaleCount(1) + .setMaxScaleCount(3) + .setDiscardExistingLeases(true) ) .build(); @@ -177,7 +161,7 @@ public void readFeedDocumentsStartFromCustomDate() { changeFeedProcessor.stop().subscribeOn(Schedulers.elastic()).timeout(Duration.ofMillis(2 * CHANGE_FEED_PROCESSOR_TIMEOUT)).subscribe(); for (CosmosItemProperties item : createdDocuments) { - assertThat(receivedDocuments.containsKey(item.id())).as("Document with id: " + item.id()).isTrue(); + assertThat(receivedDocuments.containsKey(item.getId())).as("Document with getId: " + item.getId()).isTrue(); } // Wait for the feed processor to shutdown. @@ -196,38 +180,38 @@ public void staledLeaseAcquiring() { final String leasePrefix = "TEST"; ChangeFeedProcessor changeFeedProcessorFirst = ChangeFeedProcessor.Builder() - .hostName(ownerFirst) - .handleChanges(docs -> { + .setHostName(ownerFirst) + .setHandleChanges(docs -> { ChangeFeedProcessorTest.log.info("START processing from thread {} using host {}", Thread.currentThread().getId(), ownerFirst); ChangeFeedProcessorTest.log.info("END processing from thread {} using host {}", Thread.currentThread().getId(), ownerFirst); }) - .feedContainer(createdFeedCollection) - .leaseContainer(createdLeaseCollection) - .options(new ChangeFeedProcessorOptions() - .leasePrefix(leasePrefix) + .setFeedContainer(createdFeedCollection) + .setLeaseContainer(createdLeaseCollection) + .setOptions(new ChangeFeedProcessorOptions() + .setLeasePrefix(leasePrefix) ) .build(); ChangeFeedProcessor changeFeedProcessorSecond = ChangeFeedProcessor.Builder() - .hostName(ownerSecond) - .handleChanges(docs -> { + .setHostName(ownerSecond) + .setHandleChanges(docs -> { ChangeFeedProcessorTest.log.info("START processing from thread {} using host {}", Thread.currentThread().getId(), ownerSecond); for (CosmosItemProperties item : docs) { processItem(item); } ChangeFeedProcessorTest.log.info("END processing from thread {} using host {}", Thread.currentThread().getId(), ownerSecond); }) - .feedContainer(createdFeedCollection) - .leaseContainer(createdLeaseCollection) - .options(new ChangeFeedProcessorOptions() - .leaseRenewInterval(Duration.ofSeconds(10)) - .leaseAcquireInterval(Duration.ofSeconds(5)) - .leaseExpirationInterval(Duration.ofSeconds(20)) - .feedPollDelay(Duration.ofSeconds(2)) - .leasePrefix(leasePrefix) - .maxItemCount(10) - .startFromBeginning(true) - .maxScaleCount(0) // unlimited + .setFeedContainer(createdFeedCollection) + .setLeaseContainer(createdLeaseCollection) + .setOptions(new ChangeFeedProcessorOptions() + .setLeaseRenewInterval(Duration.ofSeconds(10)) + .setLeaseAcquireInterval(Duration.ofSeconds(5)) + .setLeaseExpirationInterval(Duration.ofSeconds(20)) + .setFeedPollDelay(Duration.ofSeconds(2)) + .setLeasePrefix(leasePrefix) + .setMaxItemCount(10) + .setStartFromBeginning(true) + .setMaxScaleCount(0) // unlimited ) .build(); @@ -254,25 +238,25 @@ public void staledLeaseAcquiring() { ChangeFeedProcessorTest.log.info("Update leases for Change feed processor in thread {} using host {}", Thread.currentThread().getId(), "Owner_first"); SqlParameter param = new SqlParameter(); - param.name("@PartitionLeasePrefix"); - param.value(leasePrefix); + param.setName("@PartitionLeasePrefix"); + param.setValue(leasePrefix); SqlQuerySpec querySpec = new SqlQuerySpec( "SELECT * FROM c WHERE STARTSWITH(c.id, @PartitionLeasePrefix)", new SqlParameterList(param)); FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); createdLeaseCollection.queryItems(querySpec, feedOptions) .delayElements(Duration.ofMillis(CHANGE_FEED_PROCESSOR_TIMEOUT / 2)) - .flatMap(documentFeedResponse -> reactor.core.publisher.Flux.fromIterable(documentFeedResponse.results())) + .flatMap(documentFeedResponse -> reactor.core.publisher.Flux.fromIterable(documentFeedResponse.getResults())) .flatMap(doc -> { BridgeInternal.setProperty(doc, "Owner", "TEMP_OWNER"); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(doc.id())); - return createdLeaseCollection.getItem(doc.id(), "/id") + options.setPartitionKey(new PartitionKey(doc.getId())); + return createdLeaseCollection.getItem(doc.getId(), "/id") .replace(doc, options) - .map(CosmosItemResponse::properties); + .map(CosmosAsyncItemResponse::getProperties); }) .map(ServiceItemLease::fromDocument) .map(leaseDocument -> { @@ -337,7 +321,7 @@ public void beforeMethod() { @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); // try { // client.getDatabase(databaseId).read() @@ -377,7 +361,7 @@ public void afterClass() { // client.readAllDatabases() // .flatMap(cosmosDatabaseSettingsFeedResponse -> reactor.core.publisher.Flux.fromIterable(cosmosDatabaseSettingsFeedResponse.results())) // .flatMap(cosmosDatabaseSettings -> { -// CosmosDatabase cosmosDatabase = client.getDatabase(cosmosDatabaseSettings.id()); +// CosmosAsyncDatabase cosmosDatabase = client.getDatabase(cosmosDatabaseSettings.id()); // return cosmosDatabase.delete(); // }).blockLast(); // Thread.sleep(500); @@ -409,12 +393,12 @@ private CosmosItemProperties getDocumentDefinition() { return doc; } - private CosmosContainer createFeedCollection() { + private CosmosAsyncContainer createFeedCollection() { CosmosContainerRequestOptions optionsFeedCollection = new CosmosContainerRequestOptions(); return createCollection(createdDatabase, getCollectionDefinition(), optionsFeedCollection, 10100); } - private CosmosContainer createLeaseCollection() { + private CosmosAsyncContainer createLeaseCollection() { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), "/id"); return createCollection(createdDatabase, collectionDefinition, options, 400); @@ -422,6 +406,6 @@ private CosmosContainer createLeaseCollection() { private static synchronized void processItem(CosmosItemProperties item) { ChangeFeedProcessorTest.log.info("RECEIVED {}", item.toJson(SerializationFormattingPolicy.INDENTED)); - receivedDocuments.put(item.id(), item); + receivedDocuments.put(item.getId(), item); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java similarity index 80% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java index 6d3810b011f5..4b8d7f97098d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ChangeFeedTest.java @@ -47,17 +47,17 @@ public class ChangeFeedTest extends TestSuiteBase { private AsyncDocumentClient client; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } static protected DocumentCollection getCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/" + PartitionKeyFieldName); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; @@ -74,9 +74,9 @@ public void changeFeed_fromBeginning() throws Exception { Collection expectedDocuments = partitionKeyToDocuments.get(partitionKey); ChangeFeedOptions changeFeedOption = new ChangeFeedOptions(); - changeFeedOption.maxItemCount(3); - changeFeedOption.partitionKey(new PartitionKey(partitionKey)); - changeFeedOption.startFromBeginning(true); + changeFeedOption.setMaxItemCount(3); + changeFeedOption.setPartitionKey(new PartitionKey(partitionKey)); + changeFeedOption.setStartFromBeginning(true); List> changeFeedResultList = client.queryDocumentChangeFeed(getCollectionLink(), changeFeedOption) .collectList().block(); @@ -84,12 +84,12 @@ public void changeFeed_fromBeginning() throws Exception { int count = 0; for (int i = 0; i < changeFeedResultList.size(); i++) { FeedResponse changeFeedPage = changeFeedResultList.get(i); - assertThat(changeFeedPage.continuationToken()).as("Response continuation should not be null").isNotNull(); + assertThat(changeFeedPage.getContinuationToken()).as("Response continuation should not be null").isNotNull(); - count += changeFeedPage.results().size(); - assertThat(changeFeedPage.results().size()) + count += changeFeedPage.getResults().size(); + assertThat(changeFeedPage.getResults().size()) .as("change feed should contain all the previously created documents") - .isLessThanOrEqualTo(changeFeedOption.maxItemCount()); + .isLessThanOrEqualTo(changeFeedOption.getMaxItemCount()); } assertThat(count).as("the number of changes").isEqualTo(expectedDocuments.size()); } @@ -97,8 +97,8 @@ public void changeFeed_fromBeginning() throws Exception { @Test(groups = { "simple" }, timeOut = 5 * TIMEOUT) public void changesFromPartitionKeyRangeId_FromBeginning() throws Exception { List partitionKeyRangeIds = client.readPartitionKeyRanges(getCollectionLink(), null) - .flatMap(p -> Flux.fromIterable(p.results()), 1) - .map(Resource::id) + .flatMap(p -> Flux.fromIterable(p.getResults()), 1) + .map(Resource::getId) .collectList() .block(); @@ -107,24 +107,24 @@ public void changesFromPartitionKeyRangeId_FromBeginning() throws Exception { String pkRangeId = partitionKeyRangeIds.get(0); ChangeFeedOptions changeFeedOption = new ChangeFeedOptions(); - changeFeedOption.maxItemCount(3); + changeFeedOption.setMaxItemCount(3); partitionKeyRangeIdInternal(changeFeedOption, pkRangeId); - changeFeedOption.startFromBeginning(true); + changeFeedOption.setStartFromBeginning(true); List> changeFeedResultList = client.queryDocumentChangeFeed(getCollectionLink(), changeFeedOption) .collectList().block(); int count = 0; for(int i = 0; i < changeFeedResultList.size(); i++) { FeedResponse changeFeedPage = changeFeedResultList.get(i); - assertThat(changeFeedPage.continuationToken()).as("Response continuation should not be null").isNotNull(); + assertThat(changeFeedPage.getContinuationToken()).as("Response continuation should not be null").isNotNull(); - count += changeFeedPage.results().size(); - assertThat(changeFeedPage.results().size()) + count += changeFeedPage.getResults().size(); + assertThat(changeFeedPage.getResults().size()) .as("change feed should contain all the previously created documents") - .isLessThanOrEqualTo(changeFeedOption.maxItemCount()); + .isLessThanOrEqualTo(changeFeedOption.getMaxItemCount()); - assertThat(changeFeedPage.continuationToken()).as("Response continuation should not be null").isNotNull(); - assertThat(changeFeedPage.continuationToken()).as("Response continuation should not be empty").isNotEmpty(); + assertThat(changeFeedPage.getContinuationToken()).as("Response continuation should not be null").isNotNull(); + assertThat(changeFeedPage.getContinuationToken()).as("Response continuation should not be empty").isNotEmpty(); } assertThat(changeFeedResultList.size()).as("has at least one page").isGreaterThanOrEqualTo(1); assertThat(count).as("the number of changes").isGreaterThan(0); @@ -136,7 +136,7 @@ public void changeFeed_fromNow() throws Exception { // READ change feed from current. ChangeFeedOptions changeFeedOption = new ChangeFeedOptions(); String partitionKey = partitionKeyToDocuments.keySet().iterator().next(); - changeFeedOption.partitionKey(new PartitionKey(partitionKey)); + changeFeedOption.setPartitionKey(new PartitionKey(partitionKey)); List> changeFeedResultsList = client.queryDocumentChangeFeed(getCollectionLink(), changeFeedOption) .collectList() @@ -145,7 +145,7 @@ public void changeFeed_fromNow() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder().totalSize(0).build(); validator.validate(changeFeedResultsList); assertThat(changeFeedResultsList.get(changeFeedResultsList.size() -1 ). - continuationToken()).as("Response continuation should not be null").isNotNull(); + getContinuationToken()).as("Response continuation should not be null").isNotNull(); } @Test(groups = { "simple" }, timeOut = TIMEOUT) @@ -160,13 +160,13 @@ public void changeFeed_fromStartDate() throws Exception { ChangeFeedOptions changeFeedOption = new ChangeFeedOptions(); String partitionKey = partitionKeyToDocuments.keySet().iterator().next(); - changeFeedOption.partitionKey(new PartitionKey(partitionKey)); + changeFeedOption.setPartitionKey(new PartitionKey(partitionKey)); OffsetDateTime befTime = OffsetDateTime.now(); // Waiting for at-least a second to ensure that new document is created after we took the time stamp waitAtleastASecond(befTime); OffsetDateTime dateTimeBeforeCreatingDoc = OffsetDateTime.now(); - changeFeedOption.startDateTime(dateTimeBeforeCreatingDoc); + changeFeedOption.setStartDateTime(dateTimeBeforeCreatingDoc); // Waiting for at-least a second to ensure that new document is created after we took the time stamp waitAtleastASecond(dateTimeBeforeCreatingDoc); @@ -178,8 +178,8 @@ public void changeFeed_fromStartDate() throws Exception { int count = 0; for(int i = 0; i < changeFeedResultList.size(); i++) { FeedResponse changeFeedPage = changeFeedResultList.get(i); - count += changeFeedPage.results().size(); - assertThat(changeFeedPage.continuationToken()).as("Response continuation should not be null").isNotNull(); + count += changeFeedPage.getResults().size(); + assertThat(changeFeedPage.getContinuationToken()).as("Response continuation should not be null").isNotNull(); } assertThat(count).as("Change feed should have one newly created document").isEqualTo(1); } @@ -187,17 +187,17 @@ public void changeFeed_fromStartDate() throws Exception { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void changesFromPartitionKey_AfterInsertingNewDocuments() throws Exception { ChangeFeedOptions changeFeedOption = new ChangeFeedOptions(); - changeFeedOption.maxItemCount(3); + changeFeedOption.setMaxItemCount(3); String partitionKey = partitionKeyToDocuments.keySet().iterator().next(); - changeFeedOption.partitionKey(new PartitionKey(partitionKey)); + changeFeedOption.setPartitionKey(new PartitionKey(partitionKey)); List> changeFeedResultsList = client.queryDocumentChangeFeed(getCollectionLink(), changeFeedOption) .collectList().block(); assertThat(changeFeedResultsList).as("only one page").hasSize(1); - assertThat(changeFeedResultsList.get(0).results()).as("no recent changes").isEmpty(); + assertThat(changeFeedResultsList.get(0).getResults()).as("no recent changes").isEmpty(); - String changeFeedContinuation = changeFeedResultsList.get(changeFeedResultsList.size()-1).continuationToken(); + String changeFeedContinuation = changeFeedResultsList.get(changeFeedResultsList.size()-1).getContinuationToken(); assertThat(changeFeedContinuation).as("continuation token is not null").isNotNull(); assertThat(changeFeedContinuation).as("continuation token is not empty").isNotEmpty(); @@ -206,14 +206,14 @@ public void changesFromPartitionKey_AfterInsertingNewDocuments() throws Exceptio client.createDocument(getCollectionLink(), getDocumentDefinition(partitionKey), null, true).single().block(); // READ change feed from continuation - changeFeedOption.requestContinuation(changeFeedContinuation); + changeFeedOption.setRequestContinuation(changeFeedContinuation); FeedResponse changeFeedResults2 = client.queryDocumentChangeFeed(getCollectionLink(), changeFeedOption) .blockFirst(); - assertThat(changeFeedResults2.results()).as("change feed should contain newly inserted docs.").hasSize(2); - assertThat(changeFeedResults2.continuationToken()).as("Response continuation should not be null").isNotNull(); + assertThat(changeFeedResults2.getResults()).as("change feed should contain newly inserted docs.").hasSize(2); + assertThat(changeFeedResults2.getContinuationToken()).as("Response continuation should not be null").isNotNull(); } public void createDocument(AsyncDocumentClient client, String partitionKey) { @@ -227,7 +227,7 @@ public void createDocument(AsyncDocumentClient client, String partitionKey) { public List bulkInsert(AsyncDocumentClient client, List docs) { ArrayList>> result = new ArrayList>>(); for (int i = 0; i < docs.size(); i++) { - result.add(client.createDocument("dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(), docs.get(i), null, false)); + result.add(client.createDocument("dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(), docs.get(i), null, false)); } return Flux.merge(Flux.fromIterable(result), 100).map(ResourceResponse::getResource).collectList().block(); @@ -247,7 +247,7 @@ public void populateDocuments(Method method) { RequestOptions options = new RequestOptions(); options.setOfferThroughput(10100); - createdCollection = createCollection(client, createdDatabase.id(), getCollectionDefinition(), options); + createdCollection = createCollection(client, createdDatabase.getId(), getCollectionDefinition(), options); List docs = new ArrayList<>(); @@ -279,7 +279,7 @@ public void afterClass() { private static Document getDocumentDefinition(String partitionKey) { String uuid = UUID.randomUUID().toString(); Document doc = new Document(); - doc.id(uuid); + doc.setId(uuid); BridgeInternal.setProperty(doc, "mypk", partitionKey); BridgeInternal.setProperty(doc, "prop", uuid); return doc; @@ -290,4 +290,4 @@ private static void waitAtleastASecond(OffsetDateTime befTime) throws Interrupte Thread.sleep(100); } } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java similarity index 63% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java index ddd5157eb6fb..477eeec573bf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java @@ -2,31 +2,11 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CompositePath; -import com.azure.data.cosmos.CompositePathSortOrder; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.CosmosResponseValidator; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.Database; -import com.azure.data.cosmos.IndexingMode; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.PartitionKeyDefinition; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.RetryAnalyzer; -import com.azure.data.cosmos.SpatialSpec; -import com.azure.data.cosmos.SpatialType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -47,8 +27,8 @@ public class CollectionCrudTest extends TestSuiteBase { private static final int SHUTDOWN_TIMEOUT = 20000; private final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosClient client; - private CosmosDatabase database; + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; @Factory(dataProvider = "clientBuildersWithDirect") public CollectionCrudTest(CosmosClientBuilder clientBuilder) { @@ -71,7 +51,7 @@ private CosmosContainerProperties getCollectionDefinition(String collectionName) PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties( collectionName, @@ -84,11 +64,11 @@ private CosmosContainerProperties getCollectionDefinition(String collectionName) public void createCollection(String collectionName) throws InterruptedException { CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); - Mono createObservable = database + Mono createObservable = database .createContainer(collectionDefinition); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(collectionDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collectionDefinition.getId()).build(); validateSuccess(createObservable, validator); safeDeleteAllCollections(database); @@ -99,7 +79,7 @@ public void createCollectionWithCompositeIndexAndSpatialSpec() throws Interrupte PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collection = new CosmosContainerProperties( UUID.randomUUID().toString(), @@ -107,21 +87,21 @@ public void createCollectionWithCompositeIndexAndSpatialSpec() throws Interrupte IndexingPolicy indexingPolicy = new IndexingPolicy(); CompositePath compositePath1 = new CompositePath(); - compositePath1.path("/path1"); - compositePath1.order(CompositePathSortOrder.ASCENDING); + compositePath1.setPath("/path1"); + compositePath1.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath2 = new CompositePath(); - compositePath2.path("/path2"); - compositePath2.order(CompositePathSortOrder.DESCENDING); + compositePath2.setPath("/path2"); + compositePath2.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath3 = new CompositePath(); - compositePath3.path("/path3"); + compositePath3.setPath("/path3"); CompositePath compositePath4 = new CompositePath(); - compositePath4.path("/path4"); - compositePath4.order(CompositePathSortOrder.ASCENDING); + compositePath4.setPath("/path4"); + compositePath4.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath5 = new CompositePath(); - compositePath5.path("/path5"); - compositePath5.order(CompositePathSortOrder.DESCENDING); + compositePath5.setPath("/path5"); + compositePath5.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath6 = new CompositePath(); - compositePath6.path("/path6"); + compositePath6.setPath("/path6"); ArrayList compositeIndex1 = new ArrayList(); compositeIndex1.add(compositePath1); @@ -136,7 +116,7 @@ public void createCollectionWithCompositeIndexAndSpatialSpec() throws Interrupte List> compositeIndexes = new ArrayList<>(); compositeIndexes.add(compositeIndex1); compositeIndexes.add(compositeIndex2); - indexingPolicy.compositeIndexes(compositeIndexes); + indexingPolicy.setCompositeIndexes(compositeIndexes); SpatialType[] spatialTypes = new SpatialType[] { SpatialType.POINT, @@ -149,24 +129,24 @@ public void createCollectionWithCompositeIndexAndSpatialSpec() throws Interrupte List collectionOfSpatialTypes = new ArrayList(); SpatialSpec spec = new SpatialSpec(); - spec.path("/path" + index + "/*"); + spec.setPath("/path" + index + "/*"); for (int i = index; i < index + 3; i++) { collectionOfSpatialTypes.add(spatialTypes[i]); } - spec.spatialTypes(collectionOfSpatialTypes); + spec.setSpatialTypes(collectionOfSpatialTypes); spatialIndexes.add(spec); } - indexingPolicy.spatialIndexes(spatialIndexes); + indexingPolicy.setSpatialIndexes(spatialIndexes); - collection.indexingPolicy(indexingPolicy); + collection.setIndexingPolicy(indexingPolicy); - Mono createObservable = database + Mono createObservable = database .createContainer(collection, new CosmosContainerRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(collection.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collection.getId()) .withCompositeIndexes(compositeIndexes) .withSpatialIndexes(spatialIndexes) .build(); @@ -179,13 +159,13 @@ public void createCollectionWithCompositeIndexAndSpatialSpec() throws Interrupte public void readCollection(String collectionName) throws InterruptedException { CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); - Mono readObservable = collection.read(); + Mono readObservable = collection.read(); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(collection.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collection.getId()).build(); validateSuccess(readObservable, validator); safeDeleteAllCollections(database); } @@ -193,7 +173,7 @@ public void readCollection(String collectionName) throws InterruptedException { @Test(groups = { "emulator" }, timeOut = TIMEOUT, dataProvider = "collectionCrudArgProvider") public void readCollection_DoesntExist(String collectionName) throws Exception { - Mono readObservable = database + Mono readObservable = database .getContainer("I don't exist").read(); FailureValidator validator = new FailureValidator.Builder().resourceNotFound().build(); @@ -204,12 +184,12 @@ public void readCollection_DoesntExist(String collectionName) throws Exception { public void deleteCollection(String collectionName) throws InterruptedException { CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); - Mono deleteObservable = collection.delete(); + Mono deleteObservable = collection.delete(); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); } @@ -218,20 +198,20 @@ public void deleteCollection(String collectionName) throws InterruptedException public void replaceCollection(String collectionName) throws InterruptedException { // create a collection CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); - Mono createObservable = database.createContainer(collectionDefinition); - CosmosContainer collection = createObservable.block().container(); - CosmosContainerProperties collectionSettings = collection.read().block().properties(); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosAsyncContainer collection = createObservable.block().getContainer(); + CosmosContainerProperties collectionSettings = collection.read().block().getProperties(); // sanity check - assertThat(collectionSettings.indexingPolicy().indexingMode()).isEqualTo(IndexingMode.CONSISTENT); + assertThat(collectionSettings.getIndexingPolicy().getIndexingMode()).isEqualTo(IndexingMode.CONSISTENT); - // replace indexing mode + // replace indexing getMode IndexingPolicy indexingMode = new IndexingPolicy(); - indexingMode.indexingMode(IndexingMode.LAZY); - collectionSettings.indexingPolicy(indexingMode); - Mono readObservable = collection.replace(collectionSettings, new CosmosContainerRequestOptions()); + indexingMode.setIndexingMode(IndexingMode.LAZY); + collectionSettings.setIndexingPolicy(indexingMode); + Mono readObservable = collection.replace(collectionSettings, new CosmosContainerRequestOptions()); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .indexingMode(IndexingMode.LAZY).build(); validateSuccess(readObservable, validator); safeDeleteAllCollections(database); @@ -239,59 +219,59 @@ public void replaceCollection(String collectionName) throws InterruptedException @Test(groups = { "emulator" }, timeOut = 10 * TIMEOUT, retryAnalyzer = RetryAnalyzer.class) public void sessionTokenConsistencyCollectionDeleteCreateSameName() { - CosmosClient client1 = clientBuilder().build(); - CosmosClient client2 = clientBuilder().build(); + CosmosAsyncClient client1 = clientBuilder().buildAsyncClient(); + CosmosAsyncClient client2 = clientBuilder().buildAsyncClient(); String dbId = CosmosDatabaseForTest.generateId(); String collectionId = "coll"; - CosmosDatabase db = null; + CosmosAsyncDatabase db = null; try { Database databaseDefinition = new Database(); - databaseDefinition.id(dbId); + databaseDefinition.setId(dbId); db = createDatabase(client1, dbId); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(collectionId, partitionKeyDef); - CosmosContainer collection = createCollection(db, collectionDefinition, new CosmosContainerRequestOptions()); + CosmosAsyncContainer collection = createCollection(db, collectionDefinition, new CosmosContainerRequestOptions()); CosmosItemProperties document = new CosmosItemProperties(); - document.id("doc"); + document.setId("doc"); BridgeInternal.setProperty(document, "name", "New Document"); BridgeInternal.setProperty(document, "mypk", "mypkValue"); - CosmosItem item = createDocument(collection, document); + CosmosAsyncItem item = createDocument(collection, document); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey("mypkValue")); - CosmosItemResponse readDocumentResponse = item.read(options).block(); - logger.info("Client 1 READ Document Client Side Request Statistics {}", readDocumentResponse.cosmosResponseDiagnosticsString()); - logger.info("Client 1 READ Document Latency {}", readDocumentResponse.requestLatency()); + options.setPartitionKey(new PartitionKey("mypkValue")); + CosmosAsyncItemResponse readDocumentResponse = item.read(options).block(); + logger.info("Client 1 READ Document Client Side Request Statistics {}", readDocumentResponse.getCosmosResponseDiagnosticsString()); + logger.info("Client 1 READ Document Latency {}", readDocumentResponse.getRequestLatency()); BridgeInternal.setProperty(document, "name", "New Updated Document"); - CosmosItemResponse upsertDocumentResponse = collection.upsertItem(document).block(); - logger.info("Client 1 Upsert Document Client Side Request Statistics {}", upsertDocumentResponse.cosmosResponseDiagnosticsString()); - logger.info("Client 1 Upsert Document Latency {}", upsertDocumentResponse.requestLatency()); + CosmosAsyncItemResponse upsertDocumentResponse = collection.upsertItem(document).block(); + logger.info("Client 1 Upsert Document Client Side Request Statistics {}", upsertDocumentResponse.getCosmosResponseDiagnosticsString()); + logger.info("Client 1 Upsert Document Latency {}", upsertDocumentResponse.getRequestLatency()); // DELETE the existing collection deleteCollection(client2, dbId, collectionId); // Recreate the collection with the same name but with different client - CosmosContainer collection2 = createCollection(client2, dbId, collectionDefinition); + CosmosAsyncContainer collection2 = createCollection(client2, dbId, collectionDefinition); CosmosItemProperties newDocument = new CosmosItemProperties(); - newDocument.id("doc"); + newDocument.setId("doc"); BridgeInternal.setProperty(newDocument, "name", "New Created Document"); BridgeInternal.setProperty(newDocument, "mypk", "mypk"); createDocument(collection2, newDocument); - readDocumentResponse = client1.getDatabase(dbId).getContainer(collectionId).getItem(newDocument.id(), newDocument.get("mypk")).read().block(); - logger.info("Client 2 READ Document Client Side Request Statistics {}", readDocumentResponse.cosmosResponseDiagnosticsString()); - logger.info("Client 2 READ Document Latency {}", readDocumentResponse.requestLatency()); + readDocumentResponse = client1.getDatabase(dbId).getContainer(collectionId).getItem(newDocument.getId(), newDocument.get("mypk")).read().block(); + logger.info("Client 2 READ Document Client Side Request Statistics {}", readDocumentResponse.getCosmosResponseDiagnosticsString()); + logger.info("Client 2 READ Document Latency {}", readDocumentResponse.getRequestLatency()); - CosmosItemProperties readDocument = readDocumentResponse.properties(); + CosmosItemProperties readDocument = readDocumentResponse.getProperties(); - assertThat(readDocument.id().equals(newDocument.id())).isTrue(); + assertThat(readDocument.getId().equals(newDocument.getId())).isTrue(); assertThat(readDocument.get("name").equals(newDocument.get("name"))).isTrue(); } finally { safeDeleteDatabase(db); @@ -302,7 +282,7 @@ public void sessionTokenConsistencyCollectionDeleteCreateSameName() { @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); database = createDatabase(client, databaseId); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java similarity index 81% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java index 87e38698d81f..399824438b16 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionQueryTest.java @@ -2,15 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.PartitionKeyDefinition; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.apache.commons.lang3.StringUtils; @@ -30,9 +23,9 @@ public class CollectionQueryTest extends TestSuiteBase { private final static int TIMEOUT = 30000; private final String databaseId = CosmosDatabaseForTest.generateId(); - private List createdCollections = new ArrayList<>(); - private CosmosClient client; - private CosmosDatabase createdDatabase; + private List createdCollections = new ArrayList<>(); + private CosmosAsyncClient client; + private CosmosAsyncDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") public CollectionQueryTest(CosmosClientBuilder clientBuilder) { @@ -43,15 +36,15 @@ public CollectionQueryTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryCollectionsWithFilter() throws Exception { - String filterCollectionId = createdCollections.get(0).id(); + String filterCollectionId = createdCollections.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterCollectionId); FeedOptions options = new FeedOptions(); options.maxItemCount(2); Flux> queryObservable = createdDatabase.queryContainers(query, options); - List expectedCollections = createdCollections.stream() - .filter(c -> StringUtils.equals(filterCollectionId, c.id()) ).collect(Collectors.toList()); + List expectedCollections = createdCollections.stream() + .filter(c -> StringUtils.equals(filterCollectionId, c.getId()) ).collect(Collectors.toList()); assertThat(expectedCollections).isNotEmpty(); @@ -59,7 +52,7 @@ public void queryCollectionsWithFilter() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedCollections.size()) - .exactlyContainsInAnyOrder(expectedCollections.stream().map(d -> d.read().block().properties().resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedCollections.stream().map(d -> d.read().block().getProperties().getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -77,7 +70,7 @@ public void queryAllCollections() throws Exception { options.maxItemCount(2); Flux> queryObservable = createdDatabase.queryContainers(query, options); - List expectedCollections = createdCollections; + List expectedCollections = createdCollections; assertThat(expectedCollections).isNotEmpty(); @@ -85,7 +78,7 @@ public void queryAllCollections() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedCollections.size()) - .exactlyContainsInAnyOrder(expectedCollections.stream().map(d -> d.read().block().properties().resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedCollections.stream().map(d -> d.read().block().getProperties().getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -99,7 +92,7 @@ public void queryCollections_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdDatabase.queryContainers(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -113,13 +106,13 @@ public void queryCollections_NoResults() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, databaseId); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collection = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); createdCollections.add(createCollection(client, databaseId, collection)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosConflictTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosAsyncConflictTest.java similarity index 71% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosConflictTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosAsyncConflictTest.java index 0e8f9ce7e34d..3c47ec2b4c1e 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosConflictTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CosmosAsyncConflictTest.java @@ -2,12 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosConflictProperties; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.HttpConstants; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -20,14 +16,14 @@ import static org.assertj.core.api.Assertions.assertThat; -public class CosmosConflictTest extends TestSuiteBase { +public class CosmosAsyncConflictTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuilders") - public CosmosConflictTest(CosmosClientBuilder clientBuilder) { + public CosmosAsyncConflictTest(CosmosClientBuilder clientBuilder) { super(clientBuilder); } @@ -47,12 +43,12 @@ public void readConflicts_toBlocking_toIterator() { int numberOfResults = 0; while (it.hasNext()) { FeedResponse page = it.next(); - String pageSizeAsString = page.responseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); + String pageSizeAsString = page.getResponseHeaders().get(HttpConstants.HttpHeaders.ITEM_COUNT); assertThat(pageSizeAsString).isNotNull(); // assertThat("header item count must be present", pageSizeAsString, notNullValue()); int pageSize = Integer.valueOf(pageSizeAsString); - // Assert that Result size must match header item count - assertThat(page.results().size()).isEqualTo(pageSize); + // Assert that Result size must match header getItem count + assertThat(page.getResults().size()).isEqualTo(pageSize); numberOfResults += pageSize; } assertThat(numberOfResults).isEqualTo(expectedNumberOfConflicts); @@ -61,7 +57,7 @@ public void readConflicts_toBlocking_toIterator() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } @@ -73,6 +69,6 @@ public void afterClass() { @BeforeMethod(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeMethod() { safeClose(client); - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java similarity index 64% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java index 685cc11c8082..2d2ee1e26740 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseCrudTest.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.CosmosDatabaseResponse; -import com.azure.data.cosmos.CosmosResponseValidator; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.FailureValidator; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -23,8 +17,8 @@ public class DatabaseCrudTest extends TestSuiteBase { private final String preExistingDatabaseId = CosmosDatabaseForTest.generateId(); private final List databases = new ArrayList<>(); - private CosmosClient client; - private CosmosDatabase createdDatabase; + private CosmosAsyncClient client; + private CosmosAsyncDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") public DatabaseCrudTest(CosmosClientBuilder clientBuilder) { @@ -34,26 +28,26 @@ public DatabaseCrudTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void createDatabase() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); // create the database - Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); + Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(databaseDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(databaseDefinition.getId()).build(); validateSuccess(createObservable, validator); } @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void createDatabase_AlreadyExists() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); + databases.add(databaseDefinition.getId()); client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block(); // attempt to create the database - Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); + Mono createObservable = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()); // validate FailureValidator validator = new FailureValidator.Builder().resourceAlreadyExists().build(); @@ -63,10 +57,10 @@ public void createDatabase_AlreadyExists() throws Exception { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void readDatabase() throws Exception { // read database - Mono readObservable = client.getDatabase(preExistingDatabaseId).read(); + Mono readObservable = client.getDatabase(preExistingDatabaseId).read(); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withId(preExistingDatabaseId).build(); validateSuccess(readObservable, validator); } @@ -74,7 +68,7 @@ public void readDatabase() throws Exception { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void readDatabase_DoesntExist() throws Exception { // read database - Mono readObservable = client.getDatabase("I don't exist").read(); + Mono readObservable = client.getDatabase("I don't exist").read(); // validate FailureValidator validator = new FailureValidator.Builder().resourceNotFound().build(); @@ -86,14 +80,14 @@ public void readDatabase_DoesntExist() throws Exception { public void deleteDatabase() throws Exception { // create the database CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); - databases.add(databaseDefinition.id()); - CosmosDatabase database = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().database(); + databases.add(databaseDefinition.getId()); + CosmosAsyncDatabase database = client.createDatabase(databaseDefinition, new CosmosDatabaseRequestOptions()).block().getDatabase(); // delete the database - Mono deleteObservable = database.delete(); + Mono deleteObservable = database.delete(); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); } @@ -101,7 +95,7 @@ public void deleteDatabase() throws Exception { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void deleteDatabase_DoesntExist() throws Exception { // delete the database - Mono deleteObservable = client.getDatabase("I don't exist").delete(); + Mono deleteObservable = client.getDatabase("I don't exist").delete(); // validate FailureValidator validator = new FailureValidator.Builder().resourceNotFound().build(); @@ -110,7 +104,7 @@ public void deleteDatabase_DoesntExist() throws Exception { @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, preExistingDatabaseId); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java similarity index 84% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java index 95fb7f6ecc70..9f4d814f15ed 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DatabaseQueryTest.java @@ -2,13 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.apache.commons.lang3.StringUtils; @@ -29,9 +24,9 @@ public class DatabaseQueryTest extends TestSuiteBase { public final String databaseId1 = CosmosDatabaseForTest.generateId(); public final String databaseId2 = CosmosDatabaseForTest.generateId(); - private List createdDatabases = new ArrayList<>(); + private List createdDatabases = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuilders") public DatabaseQueryTest(CosmosClientBuilder clientBuilder) { @@ -47,7 +42,7 @@ public void queryDatabaseWithFilter() throws Exception { Flux> queryObservable = client.queryDatabases(query, options); List expectedDatabases = createdDatabases.stream() - .filter(d -> StringUtils.equals(databaseId1, d.id()) ).map(d -> d.read().block().properties()).collect(Collectors.toList()); + .filter(d -> StringUtils.equals(databaseId1, d.getId()) ).map(d -> d.read().block().getProperties()).collect(Collectors.toList()); assertThat(expectedDatabases).isNotEmpty(); @@ -55,7 +50,7 @@ public void queryDatabaseWithFilter() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDatabases.size()) - .exactlyContainsInAnyOrder(expectedDatabases.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDatabases.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -75,7 +70,7 @@ public void queryAllDatabase() throws Exception { options.maxItemCount(2); Flux> queryObservable = client.queryDatabases(query, options); - List expectedDatabases = createdDatabases.stream().map(d -> d.read().block().properties()).collect(Collectors.toList()); + List expectedDatabases = createdDatabases.stream().map(d -> d.read().block().getProperties()).collect(Collectors.toList()); assertThat(expectedDatabases).isNotEmpty(); @@ -83,7 +78,7 @@ public void queryAllDatabase() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDatabases.size()) - .exactlyContainsInAnyOrder(expectedDatabases.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDatabases.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -97,7 +92,7 @@ public void queryDatabases_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = client.queryDatabases(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -111,7 +106,7 @@ public void queryDatabases_NoResults() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabases.add(createDatabase(client, databaseId1)); createdDatabases.add(createDatabase(client, databaseId2)); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java similarity index 84% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java index fca51e0e65bb..51ab8c2858f7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentClientResourceLeakTest.java @@ -2,11 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.google.common.base.Strings; import org.testng.annotations.BeforeClass; import org.testng.annotations.Factory; @@ -23,8 +20,8 @@ public class DocumentClientResourceLeakTest extends TestSuiteBase { private static final int TIMEOUT = 2400000; private static final int MAX_NUMBER = 1000; - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; @Factory(dataProvider = "simpleClientBuildersWithDirect") public DocumentClientResourceLeakTest(CosmosClientBuilder clientBuilder) { @@ -40,10 +37,10 @@ public void resourceLeak() throws Exception { for (int i = 0; i < MAX_NUMBER; i++) { logger.info("CLIENT {}", i); - CosmosClient client = this.clientBuilder().build(); + CosmosAsyncClient client = this.clientBuilder().buildAsyncClient(); try { logger.info("creating document"); - createDocument(client.getDatabase(createdDatabase.id()).getContainer(createdCollection.id()), + createDocument(client.getDatabase(createdDatabase.getId()).getContainer(createdCollection.getId()), getDocumentDefinition()); } finally { logger.info("closing client"); @@ -66,7 +63,7 @@ public void resourceLeak() throws Exception { @BeforeClass(groups = {"emulator"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { - CosmosClient client = this.clientBuilder().build(); + CosmosAsyncClient client = this.clientBuilder().buildAsyncClient(); try { createdDatabase = getSharedCosmosDatabase(client); createdCollection = getSharedMultiPartitionCosmosContainer(client); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java similarity index 66% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java index b56ff5bd257c..9b04b04800cf 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/DocumentCrudTest.java @@ -2,17 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.PartitionKey; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncItem; import com.azure.data.cosmos.internal.FailureValidator; import org.apache.commons.lang3.StringUtils; import org.testng.annotations.DataProvider; @@ -33,8 +24,8 @@ public class DocumentCrudTest extends TestSuiteBase { - private CosmosClient client; - private CosmosContainer container; + private CosmosAsyncClient client; + private CosmosAsyncContainer container; @Factory(dataProvider = "clientBuildersWithDirect") public DocumentCrudTest(CosmosClientBuilder clientBuilder) { @@ -55,10 +46,10 @@ public Object[][] documentCrudArgProvider() { public void createDocument(String documentId) throws InterruptedException { CosmosItemProperties properties = getDocumentDefinition(documentId); - Mono createObservable = container.createItem(properties, new CosmosItemRequestOptions()); + Mono createObservable = container.createItem(properties, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(properties.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(properties.getId()) .build(); validateSuccess(createObservable, validator); @@ -72,10 +63,10 @@ public void createLargeDocument(String documentId) throws InterruptedException { int size = (int) (ONE_MB * 1.5); BridgeInternal.setProperty(docDefinition, "largeString", StringUtils.repeat("x", size)); - Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); + Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()) .build(); validateSuccess(createObservable, validator); @@ -90,10 +81,10 @@ public void createDocumentWithVeryLargePartitionKey(String documentId) throws In } BridgeInternal.setProperty(docDefinition, "mypk", sb.toString()); - Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); + Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()) .withProperty("mypk", sb.toString()) .build(); validateSuccess(createObservable, validator); @@ -108,16 +99,16 @@ public void readDocumentWithVeryLargePartitionKey(String documentId) throws Inte } BridgeInternal.setProperty(docDefinition, "mypk", sb.toString()); - CosmosItem createdDocument = TestSuiteBase.createDocument(container, docDefinition); + CosmosAsyncItem createdDocument = TestSuiteBase.createDocument(container, docDefinition); waitIfNeededForReplicasToCatchUp(clientBuilder()); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(sb.toString())); - Mono readObservable = createdDocument.read(options); + options.setPartitionKey(new PartitionKey(sb.toString())); + Mono readObservable = createdDocument.read(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()) .withProperty("mypk", sb.toString()) .build(); validateSuccess(readObservable, validator); @@ -127,7 +118,7 @@ public void readDocumentWithVeryLargePartitionKey(String documentId) throws Inte public void createDocument_AlreadyExists(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); container.createItem(docDefinition, new CosmosItemRequestOptions()).block(); - Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); + Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()); FailureValidator validator = new FailureValidator.Builder().resourceAlreadyExists().build(); validateFailure(createObservable, validator); } @@ -135,7 +126,7 @@ public void createDocument_AlreadyExists(String documentId) throws InterruptedEx @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "documentCrudArgProvider") public void createDocumentTimeout(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()).timeout(Duration.ofMillis(1)); + Mono createObservable = container.createItem(docDefinition, new CosmosItemRequestOptions()).timeout(Duration.ofMillis(1)); FailureValidator validator = new FailureValidator.Builder().instanceOf(TimeoutException.class).build(); validateFailure(createObservable, validator); } @@ -144,16 +135,16 @@ public void createDocumentTimeout(String documentId) throws InterruptedException public void readDocument(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); waitIfNeededForReplicasToCatchUp(clientBuilder()); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); - Mono readObservable = document.read(options); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); + Mono readObservable = document.read(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(document.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(document.getId()) .build(); validateSuccess(readObservable, validator); @@ -166,34 +157,34 @@ public void timestamp(String documentId) throws Exception { OffsetDateTime before = OffsetDateTime.now(); CosmosItemProperties docDefinition = getDocumentDefinition(documentId); Thread.sleep(1000); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); waitIfNeededForReplicasToCatchUp(clientBuilder()); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); - CosmosItemProperties readDocument = document.read(options).block().properties(); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); + CosmosItemProperties readDocument = document.read(options).block().getProperties(); Thread.sleep(1000); OffsetDateTime after = OffsetDateTime.now(); - assertThat(readDocument.timestamp()).isAfterOrEqualTo(before); - assertThat(readDocument.timestamp()).isBeforeOrEqualTo(after); + assertThat(readDocument.getTimestamp()).isAfterOrEqualTo(before); + assertThat(readDocument.getTimestamp()).isBeforeOrEqualTo(after); } @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "documentCrudArgProvider") public void readDocument_DoesntExist(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); document.delete(options).block(); waitIfNeededForReplicasToCatchUp(clientBuilder()); - options.partitionKey(new PartitionKey("looloo")); - Mono readObservable = document.read(options); + options.setPartitionKey(new PartitionKey("looloo")); + Mono readObservable = document.read(options); FailureValidator validator = new FailureValidator.Builder().instanceOf(CosmosClientException.class) .statusCode(404).build(); @@ -204,21 +195,21 @@ public void readDocument_DoesntExist(String documentId) throws InterruptedExcept public void deleteDocument(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); - Mono deleteObservable = document.delete(options); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); + Mono deleteObservable = document.delete(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); // attempt to read document which was deleted waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = document.read(options); + Mono readObservable = document.read(options); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(readObservable, notFoundValidator); } @@ -226,22 +217,22 @@ public void deleteDocument(String documentId) throws InterruptedException { @Test(groups = { "simple" }, timeOut = TIMEOUT, dataProvider = "documentCrudArgProvider") public void deleteDocument_undefinedPK(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = new CosmosItemProperties(); - docDefinition.id(documentId); + docDefinition.setId(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(PartitionKey.None); - Mono deleteObservable = document.delete(options); + options.setPartitionKey(PartitionKey.None); + Mono deleteObservable = document.delete(options); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource().build(); validateSuccess(deleteObservable, validator); // attempt to read document which was deleted waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = document.read(options); + Mono readObservable = document.read(options); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(readObservable, notFoundValidator); } @@ -250,14 +241,14 @@ public void deleteDocument_undefinedPK(String documentId) throws InterruptedExce public void deleteDocument_DoesntExist(String documentId) throws InterruptedException { CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); document.delete(options).block(); // delete again - Mono deleteObservable = document.delete(options); + Mono deleteObservable = document.delete(options); FailureValidator validator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(deleteObservable, validator); @@ -268,18 +259,18 @@ public void replaceDocument(String documentId) throws InterruptedException { // create a document CosmosItemProperties docDefinition = getDocumentDefinition(documentId); - CosmosItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().item(); + CosmosAsyncItem document = container.createItem(docDefinition, new CosmosItemRequestOptions()).block().getItem(); String newPropValue = UUID.randomUUID().toString(); BridgeInternal.setProperty(docDefinition, "newProp", newPropValue); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(docDefinition.get("mypk"))); + options.setPartitionKey(new PartitionKey(docDefinition.get("mypk"))); // replace document - Mono replaceObservable = document.replace(docDefinition, options); + Mono replaceObservable = document.replace(docDefinition, options); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withProperty("newProp", newPropValue).build(); validateSuccess(replaceObservable, validator); } @@ -291,11 +282,11 @@ public void upsertDocument_CreateDocument(String documentId) throws Throwable { // replace document - Mono upsertObservable = container.upsertItem(docDefinition, new CosmosItemRequestOptions()); + Mono upsertObservable = container.upsertItem(docDefinition, new CosmosItemRequestOptions()); // validate - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(upsertObservable, validator); } @@ -304,19 +295,19 @@ public void upsertDocument_CreateDocument(String documentId) throws Throwable { public void upsertDocument_ReplaceDocument(String documentId) throws Throwable { CosmosItemProperties properties = getDocumentDefinition(documentId); - properties = container.createItem(properties, new CosmosItemRequestOptions()).block().properties(); + properties = container.createItem(properties, new CosmosItemRequestOptions()).block().getProperties(); String newPropValue = UUID.randomUUID().toString(); BridgeInternal.setProperty(properties, "newProp", newPropValue); // Replace document - Mono readObservable = container.upsertItem(properties, new CosmosItemRequestOptions()); + Mono readObservable = container.upsertItem(properties, new CosmosItemRequestOptions()); System.out.println(properties); // Validate result - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .withProperty("newProp", newPropValue).build(); validateSuccess(readObservable, validator); @@ -325,7 +316,7 @@ public void upsertDocument_ReplaceDocument(String documentId) throws Throwable { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = this.clientBuilder().build(); + this.client = this.clientBuilder().buildAsyncClient(); this.container = getSharedMultiPartitionCosmosContainer(this.client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java similarity index 77% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java index 15bfbd217e9c..d72e7d28ea08 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/LogLevelTest.java @@ -3,12 +3,8 @@ package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.CosmosResponseValidator; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.apache.log4j.Level; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; @@ -37,8 +33,8 @@ public class LogLevelTest extends TestSuiteBase { public final static String LOG_PATTERN_3 = "USER_EVENT: SslHandshakeCompletionEvent(SUCCESS)"; public final static String LOG_PATTERN_4 = "CONNECT: "; - private static CosmosContainer createdCollection; - private static CosmosClient client; + private static CosmosAsyncContainer createdCollection; + private static CosmosAsyncClient client; public LogLevelTest() { super(createGatewayRxDocumentClient()); @@ -46,7 +42,7 @@ public LogLevelTest() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } @@ -63,13 +59,13 @@ public void createDocumentWithDebugLevel() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); LogManager.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).isEmpty(); @@ -93,13 +89,13 @@ public void createDocumentWithWarningLevel() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).isEmpty(); @@ -124,13 +120,13 @@ public void createDocumentWithTraceLevel() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).contains(LOG_PATTERN_1); @@ -153,13 +149,13 @@ public void createDocumentWithTraceLevelAtRoot() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).contains(LOG_PATTERN_1); @@ -179,13 +175,13 @@ public void createDocumentWithDebugLevelAtRoot() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).isEmpty(); @@ -208,13 +204,13 @@ public void createDocumentWithErrorClient() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).isEmpty(); @@ -237,13 +233,13 @@ public void createDocumentWithInfoLevel() throws Exception { WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(NETWORK_LOGGING_CATEGORY).addAppender(appender); - CosmosClient client = clientBuilder().build(); + CosmosAsyncClient client = clientBuilder().buildAsyncClient(); try { CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = createdCollection.createItem(docDefinition, + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()).build(); + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()).build(); validateSuccess(createObservable, validator); assertThat(consoleWriter.toString()).isEmpty(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java similarity index 63% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java index 0f8996e31132..2615e6c8b904 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiMasterConflictResolutionTest.java @@ -2,19 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeUtils; -import com.azure.data.cosmos.ConflictResolutionMode; -import com.azure.data.cosmos.ConflictResolutionPolicy; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.PartitionKeyDefinition; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.TestUtils; import com.azure.data.cosmos.internal.Utils; @@ -37,8 +26,8 @@ public class MultiMasterConflictResolutionTest extends TestSuiteBase { private final String databaseId = CosmosDatabaseForTest.generateId(); private PartitionKeyDefinition partitionKeyDef; - private CosmosClient client; - private CosmosDatabase database; + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; @Factory(dataProvider = "clientBuilders") public MultiMasterConflictResolutionTest(CosmosClientBuilder clientBuilder) { @@ -50,17 +39,17 @@ public void conflictResolutionPolicyCRUD() { // default last writer wins, path _ts CosmosContainerProperties collectionSettings = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); - CosmosContainer collection = database.createContainer(collectionSettings, new CosmosContainerRequestOptions()).block().container(); - collectionSettings = collection.read().block().properties(); + CosmosAsyncContainer collection = database.createContainer(collectionSettings, new CosmosContainerRequestOptions()).block().getContainer(); + collectionSettings = collection.read().block().getProperties(); - assertThat(collectionSettings.conflictResolutionPolicy().mode()).isEqualTo(ConflictResolutionMode.LAST_WRITER_WINS); + assertThat(collectionSettings.getConflictResolutionPolicy().getMode()).isEqualTo(ConflictResolutionMode.LAST_WRITER_WINS); - // LWW without path specified, should default to _ts - collectionSettings.conflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy()); - collectionSettings = collection.replace(collectionSettings, null).block().properties(); + // LWW without getPath specified, should default to _ts + collectionSettings.setConflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy()); + collectionSettings = collection.replace(collectionSettings, null).block().getProperties(); - assertThat(collectionSettings.conflictResolutionPolicy().mode()).isEqualTo(ConflictResolutionMode.LAST_WRITER_WINS); - assertThat(collectionSettings.conflictResolutionPolicy().conflictResolutionPath()).isEqualTo("/_ts"); + assertThat(collectionSettings.getConflictResolutionPolicy().getMode()).isEqualTo(ConflictResolutionMode.LAST_WRITER_WINS); + assertThat(collectionSettings.getConflictResolutionPolicy().getConflictResolutionPath()).isEqualTo("/_ts"); // Tests the following scenarios // 1. LWW with valid path @@ -69,34 +58,34 @@ public void conflictResolutionPolicyCRUD() { testConflictResolutionPolicyRequiringPath(ConflictResolutionMode.LAST_WRITER_WINS, new String[] { "/a", null, "" }, new String[] { "/a", "/_ts", "/_ts" }); - // LWW invalid path - collectionSettings.conflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy("/a/b")); + // LWW invalid getPath + collectionSettings.setConflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy("/a/b")); try { - collectionSettings = collection.replace(collectionSettings, null).block().properties(); - fail("Expected exception on invalid path."); + collectionSettings = collection.replace(collectionSettings, null).block().getProperties(); + fail("Expected exception on invalid getPath."); } catch (Exception e) { // when (e.StatusCode == HttpStatusCode.BadRequest) CosmosClientException dce = Utils.as(e.getCause(), CosmosClientException.class); - if (dce != null && dce.statusCode() == 400) { + if (dce != null && dce.getStatusCode() == 400) { assertThat(dce.getMessage()).contains("Invalid path '\\/a\\/b' for last writer wins conflict resolution"); } else { throw e; } } - // LWW invalid path + // LWW invalid getPath - collectionSettings.conflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy("someText")); + collectionSettings.setConflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy("someText")); try { - collectionSettings = collection.replace(collectionSettings, null).block().properties(); + collectionSettings = collection.replace(collectionSettings, null).block().getProperties(); fail("Expected exception on invalid path."); } catch (Exception e) { // when (e.StatusCode == HttpStatusCode.BadRequest) CosmosClientException dce = Utils.as(e.getCause(), CosmosClientException.class); - if (dce != null && dce.statusCode() == 400) { + if (dce != null && dce.getStatusCode() == 400) { assertThat(dce.getMessage()).contains("Invalid path 'someText' for last writer wins conflict resolution"); } else { throw e; @@ -104,34 +93,35 @@ public void conflictResolutionPolicyCRUD() { } // Tests the following scenarios - // 1. CUSTOM with valid sprocLink - // 2. CUSTOM with null sprocLink, should default to empty string - // 3. CUSTOM with empty sprocLink, should default to empty string - testConflictResolutionPolicyRequiringPath(ConflictResolutionMode.CUSTOM, - new String[] { "randomSprocName", null, "" }, new String[] { "randomSprocName", "", "" }); + // 1. Custom with valid sprocLink + // 2. Custom with null sprocLink, should default to empty string + // 3. Custom with empty sprocLink, should default to empty string + testConflictResolutionPolicyRequiringPath(ConflictResolutionMode.CUSTOM, new String[] { "dbs/mydb/colls" + + "/mycoll/sprocs/randomSprocName", null, "" }, new String[] { "dbs/mydb/colls/mycoll/sprocs" + + "/randomSprocName", "", "" }); } private void testConflictResolutionPolicyRequiringPath(ConflictResolutionMode conflictResolutionMode, String[] paths, String[] expectedPaths) { - for (int i = 0; i < paths.length; i++) { + for (int i = 0; i < paths.length; i++) { CosmosContainerProperties collectionSettings = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); - + if (conflictResolutionMode == ConflictResolutionMode.LAST_WRITER_WINS) { - collectionSettings.conflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy(paths[i])); + collectionSettings.setConflictResolutionPolicy(ConflictResolutionPolicy.createLastWriterWinsPolicy(paths[i])); } else { - collectionSettings.conflictResolutionPolicy(ConflictResolutionPolicy.createCustomPolicy(paths[i])); + collectionSettings.setConflictResolutionPolicy(ConflictResolutionPolicy.createCustomPolicy(paths[i])); } - collectionSettings = database.createContainer(collectionSettings, new CosmosContainerRequestOptions()).block().properties(); - assertThat(collectionSettings.conflictResolutionPolicy().mode()).isEqualTo(conflictResolutionMode); - + collectionSettings = database.createContainer(collectionSettings, new CosmosContainerRequestOptions()).block().getProperties(); + assertThat(collectionSettings.getConflictResolutionPolicy().getMode()).isEqualTo(conflictResolutionMode); + if (conflictResolutionMode == ConflictResolutionMode.LAST_WRITER_WINS) { - assertThat(collectionSettings.conflictResolutionPolicy().conflictResolutionPath()).isEqualTo(expectedPaths[i]); + assertThat(collectionSettings.getConflictResolutionPolicy().getConflictResolutionPath()).isEqualTo(expectedPaths[i]); } else { - assertThat(collectionSettings.conflictResolutionPolicy().conflictResolutionProcedure()).isEqualTo(expectedPaths[i]); + assertThat(collectionSettings.getConflictResolutionPolicy().getConflictResolutionProcedure()).isEqualTo(expectedPaths[i]); } } } - + @Test(groups = "multi-master", timeOut = TIMEOUT) public void invalidConflictResolutionPolicy_LastWriterWinsWithStoredProc() throws Exception { CosmosContainerProperties collection = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); @@ -140,9 +130,9 @@ public void invalidConflictResolutionPolicy_LastWriterWinsWithStoredProc() throw ConflictResolutionPolicy policy = BridgeUtils.createConflictResolutionPolicy(); BridgeUtils.setMode(policy, ConflictResolutionMode.LAST_WRITER_WINS); BridgeUtils.setStoredProc(policy,"randomSprocName"); - collection.conflictResolutionPolicy(policy); + collection.setConflictResolutionPolicy(policy); - Mono createObservable = database.createContainer( + Mono createObservable = database.createContainer( collection, new CosmosContainerRequestOptions()); @@ -158,13 +148,13 @@ public void invalidConflictResolutionPolicy_LastWriterWinsWithStoredProc() throw public void invalidConflictResolutionPolicy_CustomWithPath() throws Exception { CosmosContainerProperties collection = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); - // LWW without path specified, should default to _ts + // LWW without getPath specified, should default to _ts ConflictResolutionPolicy policy = BridgeUtils.createConflictResolutionPolicy(); BridgeUtils.setMode(policy, ConflictResolutionMode.CUSTOM); BridgeUtils.setPath(policy,"/mypath"); - collection.conflictResolutionPolicy(policy); + collection.setConflictResolutionPolicy(policy); - Mono createObservable = database.createContainer( + Mono createObservable = database.createContainer( collection, new CosmosContainerRequestOptions()); @@ -180,12 +170,12 @@ public void invalidConflictResolutionPolicy_CustomWithPath() throws Exception { public void beforeClass() { // set up the client - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); database = createDatabase(client, databaseId); partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); } @AfterClass(groups = {"multi-master"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java index 6f9474351745..9c6f9fec4807 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/MultiOrderByQueryTests.java @@ -3,18 +3,8 @@ package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CompositePath; -import com.azure.data.cosmos.CompositePathSortOrder; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.fasterxml.jackson.databind.ObjectMapper; @@ -50,8 +40,8 @@ public class MultiOrderByQueryTests extends TestSuiteBase { private static final String LONG_STRING_FIELD = "longStringField"; private static final String PARTITION_KEY = "pk"; private List documents = new ArrayList(); - private CosmosContainer documentCollection; - private CosmosClient client; + private CosmosAsyncContainer documentCollection; + private CosmosAsyncClient client; class CustomComparator implements Comparator { String path; @@ -120,7 +110,7 @@ public void afterClass() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); documentCollection = getSharedMultiPartitionCosmosContainerWithCompositeAndSpatialIndexes(client); truncateCollection(documentCollection); @@ -135,29 +125,29 @@ public void beforeClass() throws Exception { for (int j = 0; j < numberOfDuplicates; j++) { // Add the document itself for exact duplicates CosmosItemProperties initialDocument = new CosmosItemProperties(multiOrderByDocumentString); - initialDocument.id(UUID.randomUUID().toString()); + initialDocument.setId(UUID.randomUUID().toString()); this.documents.add(initialDocument); // Permute all the fields so that there are duplicates with tie breaks CosmosItemProperties numberClone = new CosmosItemProperties(multiOrderByDocumentString); BridgeInternal.setProperty(numberClone, NUMBER_FIELD, random.nextInt(5)); - numberClone.id(UUID.randomUUID().toString()); + numberClone.setId(UUID.randomUUID().toString()); this.documents.add(numberClone); CosmosItemProperties stringClone = new CosmosItemProperties(multiOrderByDocumentString); BridgeInternal.setProperty(stringClone, STRING_FIELD, Integer.toString(random.nextInt(5))); - stringClone.id(UUID.randomUUID().toString()); + stringClone.setId(UUID.randomUUID().toString()); this.documents.add(stringClone); CosmosItemProperties boolClone = new CosmosItemProperties(multiOrderByDocumentString); BridgeInternal.setProperty(boolClone, BOOL_FIELD, random.nextInt(2) % 2 == 0); - boolClone.id(UUID.randomUUID().toString()); + boolClone.setId(UUID.randomUUID().toString()); this.documents.add(boolClone); // Also fuzz what partition it goes to CosmosItemProperties partitionClone = new CosmosItemProperties(multiOrderByDocumentString); BridgeInternal.setProperty(partitionClone, PARTITION_KEY, random.nextInt(5)); - partitionClone.id(UUID.randomUUID().toString()); + partitionClone.setId(UUID.randomUUID().toString()); this.documents.add(partitionClone); } } @@ -170,7 +160,7 @@ public void beforeClass() throws Exception { private CosmosItemProperties generateMultiOrderByDocument() { Random random = new Random(); CosmosItemProperties document = new CosmosItemProperties(); - document.id(UUID.randomUUID().toString()); + document.setId(UUID.randomUUID().toString()); BridgeInternal.setProperty(document, NUMBER_FIELD, random.nextInt(5)); BridgeInternal.setProperty(document, NUMBER_FIELD_2, random.nextInt(5)); BridgeInternal.setProperty(document, BOOL_FIELD, (random.nextInt() % 2) == 0); @@ -189,11 +179,11 @@ private CosmosItemProperties generateMultiOrderByDocument() { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryDocumentsWithMultiOrder() throws CosmosClientException, InterruptedException { FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + feedOptions.setEnableCrossPartitionQuery(true); boolean[] booleanValues = new boolean[] {true, false}; - CosmosContainerProperties containerSettings = documentCollection.read().block().properties(); - Iterator> compositeIndexesIterator = containerSettings.indexingPolicy().compositeIndexes().iterator(); + CosmosContainerProperties containerSettings = documentCollection.read().block().getProperties(); + Iterator> compositeIndexesIterator = containerSettings.getIndexingPolicy().getCompositeIndexes().iterator(); while (compositeIndexesIterator.hasNext()) { List compositeIndex = compositeIndexesIterator.next(); // for every order @@ -210,13 +200,13 @@ public void queryDocumentsWithMultiOrder() throws CosmosClientException, Interru Iterator compositeIndexiterator = compositeIndex.iterator(); while (compositeIndexiterator.hasNext()) { CompositePath compositePath = compositeIndexiterator.next(); - isDesc = compositePath.order() == CompositePathSortOrder.DESCENDING ? true : false; + isDesc = compositePath.getOrder() == CompositePathSortOrder.DESCENDING ? true : false; if (invert) { isDesc = !isDesc; } String isDescString = isDesc ? "DESC" : "ASC"; - String compositePathName = compositePath.path().replaceAll("/", ""); + String compositePathName = compositePath.getPath().replaceAll("/", ""); String orderByItemsString = "root." + compositePathName + " " + isDescString; String selectItemsString = "root." + compositePathName; orderByItems.add(orderByItemsString); @@ -293,7 +283,7 @@ private List sort(List arrayList, Li Iterator compositeIndexIterator = compositeIndex.iterator(); while (compositeIndexIterator.hasNext()) { CompositePath compositePath = compositeIndexIterator.next(); - CompositePathSortOrder order = compositePath.order(); + CompositePathSortOrder order = compositePath.getOrder(); if (invert) { if (order == CompositePathSortOrder.DESCENDING) { order = CompositePathSortOrder.ASCENDING; @@ -301,7 +291,7 @@ private List sort(List arrayList, Li order = CompositePathSortOrder.DESCENDING; } } - String path = compositePath.path().replace("/", ""); + String path = compositePath.getPath().replace("/", ""); comparators.add(new CustomComparator(path, order)); } Collections.sort(arrayList, ComparatorUtils.chainedComparator(comparators)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java index 700609e63162..8f70819be9ed 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferQueryTest.java @@ -46,14 +46,14 @@ public OfferQueryTest(Builder clientBuilder) { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void queryOffersWithFilter() throws Exception { - String collectionResourceId = createdCollections.get(0).resourceId(); + String collectionResourceId = createdCollections.get(0).getResourceId(); String query = String.format("SELECT * from c where c.offerResourceId = '%s'", collectionResourceId); FeedOptions options = new FeedOptions(); options.maxItemCount(2); Flux> queryObservable = client.queryOffers(query, null); - List allOffers = client.readOffers(null).flatMap(f -> Flux.fromIterable(f.results())).collectList().single().block(); + List allOffers = client.readOffers(null).flatMap(f -> Flux.fromIterable(f.getResults())).collectList().single().block(); List expectedOffers = allOffers.stream().filter(o -> collectionResourceId.equals(o.getString("offerResourceId"))).collect(Collectors.toList()); assertThat(expectedOffers).isNotEmpty(); @@ -62,7 +62,7 @@ public void queryOffersWithFilter() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedOffers.size()) - .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -74,7 +74,7 @@ public void queryOffersWithFilter() throws Exception { @Test(groups = { "emulator" }, timeOut = TIMEOUT * 100) public void queryOffersFilterMorePages() throws Exception { - List collectionResourceIds = createdCollections.stream().map(c -> c.resourceId()).collect(Collectors.toList()); + List collectionResourceIds = createdCollections.stream().map(c -> c.getResourceId()).collect(Collectors.toList()); String query = String.format("SELECT * from c where c.offerResourceId in (%s)", Strings.join(collectionResourceIds.stream().map(s -> "'" + s + "'").collect(Collectors.toList())).with(",")); @@ -82,7 +82,7 @@ public void queryOffersFilterMorePages() throws Exception { options.maxItemCount(1); Flux> queryObservable = client.queryOffers(query, options); - List expectedOffers = client.readOffers(null).flatMap(f -> Flux.fromIterable(f.results())) + List expectedOffers = client.readOffers(null).flatMap(f -> Flux.fromIterable(f.getResults())) .collectList() .single().block() .stream().filter(o -> collectionResourceIds.contains(o.getOfferResourceId())) @@ -94,7 +94,7 @@ public void queryOffersFilterMorePages() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedOffers.size()) - .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -124,17 +124,17 @@ public void beforeClass() throws Exception { client = clientBuilder().build(); Database d1 = new Database(); - d1.id(databaseId); + d1.setId(databaseId); createDatabase(client, d1); for(int i = 0; i < 3; i++) { DocumentCollection collection = new DocumentCollection(); - collection.id(UUID.randomUUID().toString()); + collection.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collection.setPartitionKey(partitionKeyDef); createdCollections.add(createCollection(client, databaseId, collection)); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java similarity index 92% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java index 0256708d3d75..b0468c60e5b9 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OfferReadReplaceTest.java @@ -36,17 +36,17 @@ public void readAndReplaceOffer() { client.readOffers(null).subscribe((offersFeed) -> { try { int i; - List offers = offersFeed.results(); + List offers = offersFeed.getResults(); for (i = 0; i < offers.size(); i++) { - if (offers.get(i).getOfferResourceId().equals(createdCollection.resourceId())) { + if (offers.get(i).getOfferResourceId().equals(createdCollection.getResourceId())) { break; } } - Offer rOffer = client.readOffer(offers.get(i).selfLink()).single().block().getResource(); + Offer rOffer = client.readOffer(offers.get(i).getSelfLink()).single().block().getResource(); int oldThroughput = rOffer.getThroughput(); - Flux> readObservable = client.readOffer(offers.get(i).selfLink()); + Flux> readObservable = client.readOffer(offers.get(i).getSelfLink()); // validate offer read ResourceResponseValidator validatorForRead = new ResourceResponseValidator.Builder() @@ -80,7 +80,7 @@ public void readAndReplaceOffer() { public void beforeClass() { client = clientBuilder().build(); createdDatabase = createDatabase(client, databaseId); - createdCollection = createCollection(client, createdDatabase.id(), + createdCollection = createCollection(client, createdDatabase.getId(), getCollectionDefinition()); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java index 8f60fd8dc632..691c4a6ef6b5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/OrderbyDocumentQueryTest.java @@ -2,18 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.Resource; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.*; import com.azure.data.cosmos.internal.Utils.ValueHolder; import com.azure.data.cosmos.internal.query.CompositeContinuationToken; @@ -50,9 +40,9 @@ public class OrderbyDocumentQueryTest extends TestSuiteBase { private final double minQueryRequestChargePerPartition = 2.0; - private CosmosClient client; - private CosmosContainer createdCollection; - private CosmosDatabase createdDatabase; + private CosmosAsyncClient client; + private CosmosAsyncContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; private List createdDocuments = new ArrayList<>(); private int numberOfPartitions; @@ -73,17 +63,17 @@ public void queryDocumentsValidateContent(boolean qmEnabled) throws Exception { , expectedDocument.getString("propStr")); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(qmEnabled); Flux> queryObservable = createdCollection.queryItems(query, options); List expectedResourceIds = new ArrayList<>(); - expectedResourceIds.add(expectedDocument.resourceId()); + expectedResourceIds.add(expectedDocument.getResourceId()); Map> resourceIDToValidator = new HashMap<>(); - resourceIDToValidator.put(expectedDocument.resourceId(), + resourceIDToValidator.put(expectedDocument.getResourceId(), new ResourceValidator.Builder().areEqual(expectedDocument).build()); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -102,7 +92,7 @@ public void queryDocumentsValidateContent(boolean qmEnabled) throws Exception { public void queryDocuments_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2' ORDER BY r.propInt"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -125,7 +115,7 @@ public Object[][] sortOrder() { public void queryOrderBy(String sortOrder) throws Exception { String query = String.format("SELECT * FROM r ORDER BY r.propInt %s", sortOrder); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); int pageSize = 3; options.maxItemCount(pageSize); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -153,7 +143,7 @@ public void queryOrderBy(String sortOrder) throws Exception { public void queryOrderByInt() throws Exception { String query = "SELECT * FROM r ORDER BY r.propInt"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); int pageSize = 3; options.maxItemCount(pageSize); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -177,7 +167,7 @@ public void queryOrderByInt() throws Exception { public void queryOrderByString() throws Exception { String query = "SELECT * FROM r ORDER BY r.propStr"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); int pageSize = 3; options.maxItemCount(pageSize); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -207,7 +197,7 @@ public Object[][] topValueParameter() { public void queryOrderWithTop(int topValue) throws Exception { String query = String.format("SELECT TOP %d * FROM r ORDER BY r.propInt", topValue); FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); int pageSize = 3; options.maxItemCount(pageSize); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -235,7 +225,7 @@ private List sortDocumentsAndCollectResourceIds(String propName, Fun return createdDocuments.stream() .filter(d -> d.getMap().containsKey(propName)) // removes undefined .sorted((d1, d2) -> comparer.compare(extractProp.apply(d1), extractProp.apply(d2))) - .map(Resource::resourceId).collect(Collectors.toList()); + .map(Resource::getResourceId).collect(Collectors.toList()); } @Test(groups = { "simple" }, timeOut = TIMEOUT) @@ -267,12 +257,12 @@ public void queryScopedToSinglePartition_StartWithContinuationToken() throws Exc subscriber.assertNoErrors(); assertThat(subscriber.valueCount()).isEqualTo(1); FeedResponse page = (FeedResponse) subscriber.getEvents().get(0).get(0); - assertThat(page.results()).hasSize(3); + assertThat(page.getResults()).hasSize(3); - assertThat(page.continuationToken()).isNotEmpty(); + assertThat(page.getContinuationToken()).isNotEmpty(); - options.requestContinuation(page.continuationToken()); + options.requestContinuation(page.getContinuationToken()); queryObservable = createdCollection.queryItems(query, options); List expectedDocs = createdDocuments.stream() @@ -287,7 +277,7 @@ public void queryScopedToSinglePartition_StartWithContinuationToken() throws Exc validator = new FeedResponseListValidator.Builder() .containsExactly(expectedDocs.stream() .sorted((e1, e2) -> Integer.compare(e1.getInt("propScopedPartitionInt"), e2.getInt("propScopedPartitionInt"))) - .map(d -> d.resourceId()).collect(Collectors.toList())) + .map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -382,13 +372,13 @@ public void queryDocumentsWithInvalidOrderByContinuationTokensString(String sort this.assertInvalidContinuationToken(query, new int[] { 1, 5, 10, 100 }, expectedResourceIds); } - public CosmosItemProperties createDocument(CosmosContainer cosmosContainer, Map keyValueProps) + public CosmosItemProperties createDocument(CosmosAsyncContainer cosmosContainer, Map keyValueProps) throws CosmosClientException { CosmosItemProperties docDefinition = getDocumentDefinition(keyValueProps); - return cosmosContainer.createItem(docDefinition).block().properties(); + return cosmosContainer.createItem(docDefinition).block().getProperties(); } - public List bulkInsert(CosmosContainer cosmosContainer, List> keyValuePropsList) { + public List bulkInsert(CosmosAsyncContainer cosmosContainer, List> keyValuePropsList) { ArrayList result = new ArrayList(); @@ -408,7 +398,7 @@ public void beforeMethod() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -434,14 +424,14 @@ public void beforeClass() throws Exception { p.put("propScopedPartitionInt", i); CosmosItemProperties doc = getDocumentDefinition("duplicateParitionKeyValue", UUID.randomUUID().toString(), p); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(new PartitionKey(doc.get("mypk"))); - createdDocuments.add(createDocument(createdCollection, doc).read(options).block().properties()); + options.setPartitionKey(new PartitionKey(doc.get("mypk"))); + createdDocuments.add(createDocument(createdCollection, doc).read(options).block().getProperties()); } numberOfPartitions = CosmosBridgeInternal.getAsyncDocumentClient(client) - .readPartitionKeyRanges("dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(), null) - .flatMap(p -> Flux.fromIterable(p.results())).collectList().single().block().size(); + .readPartitionKeyRanges("dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(), null) + .flatMap(p -> Flux.fromIterable(p.getResults())).collectList().single().block().size(); waitIfNeededForReplicasToCatchUp(clientBuilder()); } @@ -456,8 +446,8 @@ private void assertInvalidContinuationToken(String query, int[] pageSize, List receivedDocuments = this.queryWithContinuationTokens(query, pageSize); List actualIds = new ArrayList(); for (CosmosItemProperties document : receivedDocuments) { - actualIds.add(document.resourceId()); + actualIds.add(document.getResourceId()); } assertThat(actualIds).containsExactlyElementsOf(expectedIds); @@ -496,8 +486,8 @@ private List queryWithContinuationTokens(String query, int do { FeedOptions options = new FeedOptions(); options.maxItemCount(pageSize); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + options.setEnableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(2); options.requestContinuation(requestContinuation); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -510,8 +500,8 @@ private List queryWithContinuationTokens(String query, int testSubscriber.assertComplete(); FeedResponse firstPage = (FeedResponse) testSubscriber.getEvents().get(0).get(0); - requestContinuation = firstPage.continuationToken(); - receivedDocuments.addAll(firstPage.results()); + requestContinuation = firstPage.getContinuationToken(); + receivedDocuments.addAll(firstPage.getResults()); continuationTokens.add(requestContinuation); } while (requestContinuation != null); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java index f367b9ec71cc..0571e78b616b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParallelDocumentQueryTest.java @@ -2,18 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.*; -import com.azure.data.cosmos.Resource; import com.azure.data.cosmos.internal.Utils.ValueHolder; import com.azure.data.cosmos.internal.query.CompositeContinuationToken; import com.azure.data.cosmos.internal.routing.Range; @@ -39,14 +30,14 @@ //FIXME beforeClass times out inconsistently @Ignore public class ParallelDocumentQueryTest extends TestSuiteBase { - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; private List createdDocuments; - private CosmosClient client; + private CosmosAsyncClient client; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } @Factory(dataProvider = "clientBuildersWithDirect") @@ -69,9 +60,9 @@ public void queryDocuments(boolean qmEnabled) { String query = "SELECT * from c where c.prop = 99"; FeedOptions options = new FeedOptions(); options.maxItemCount(5); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(qmEnabled); - options.maxDegreeOfParallelism(2); + options.setMaxDegreeOfParallelism(2); Flux> queryObservable = createdCollection.queryItems(query, options); List expectedDocs = createdDocuments.stream().filter(d -> 99 == d.getInt("prop") ).collect(Collectors.toList()); @@ -79,7 +70,7 @@ public void queryDocuments(boolean qmEnabled) { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) .hasValidQueryMetrics(qmEnabled) @@ -93,14 +84,14 @@ public void queryMetricEquality() throws Exception { String query = "SELECT * from c where c.prop = 99"; FeedOptions options = new FeedOptions(); options.maxItemCount(5); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(true); - options.maxDegreeOfParallelism(0); + options.setMaxDegreeOfParallelism(0); Flux> queryObservable = createdCollection.queryItems(query, options); List> resultList1 = queryObservable.collectList().block(); - options.maxDegreeOfParallelism(4); + options.setMaxDegreeOfParallelism(4); Flux> threadedQueryObs = createdCollection.queryItems(query, options); List> resultList2 = threadedQueryObs.collectList().block(); @@ -128,7 +119,7 @@ private void compareQueryMetrics(Map qm1, Map> queryObservable = createdCollection.queryItems(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -147,8 +138,8 @@ public void queryDocumentsWithPageSize() { FeedOptions options = new FeedOptions(); int pageSize = 3; options.maxItemCount(pageSize); - options.maxDegreeOfParallelism(-1); - options.enableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(-1); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); List expectedDocs = createdDocuments; @@ -158,7 +149,7 @@ public void queryDocumentsWithPageSize() { .Builder() .exactlyContainsInAnyOrder(expectedDocs .stream() - .map(d -> d.resourceId()) + .map(d -> d.getResourceId()) .collect(Collectors.toList())) .numberOfPagesIsGreaterThanOrEqualTo((expectedDocs.size() + 1) / 3) .allPagesSatisfy(new FeedResponseValidator.Builder() @@ -173,7 +164,7 @@ public void queryDocumentsWithPageSize() { public void invalidQuerySyntax() { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); FailureValidator validator = new FailureValidator.Builder() @@ -203,13 +194,13 @@ public void partitionKeyRangeId() { for (String partitionKeyRangeId : CosmosBridgeInternal.getAsyncDocumentClient(client).readPartitionKeyRanges(getCollectionLink(), null) - .flatMap(p -> Flux.fromIterable(p.results())) - .map(Resource::id).collectList().single().block()) { + .flatMap(p -> Flux.fromIterable(p.getResults())) + .map(Resource::getId).collectList().single().block()) { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); partitionKeyRangeIdInternal(options, partitionKeyRangeId); int queryResultCount = createdCollection.queryItems(query, options) - .flatMap(p -> Flux.fromIterable(p.results())) + .flatMap(p -> Flux.fromIterable(p.getResults())) .collectList().block().size(); sum += queryResultCount; @@ -253,7 +244,7 @@ public void compositeContinuationTokenRoundTrip() throws Exception { } } - // TODO: This test has been timing out on build, related work item - https://msdata.visualstudio.com/CosmosDB/_workitems/edit/402438/ + // TODO: This test has been timing out on buildAsyncClient, related work item - https://msdata.visualstudio.com/CosmosDB/_workitems/edit/402438/ @Test(groups = { "non-emulator" }, timeOut = TIMEOUT * 10) public void queryDocumentsWithCompositeContinuationTokens() throws Exception { String query = "SELECT * FROM c"; @@ -267,7 +258,7 @@ public void queryDocumentsWithCompositeContinuationTokens() throws Exception { @BeforeClass(groups = { "simple", "non-emulator" }, timeOut = 2 * SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -307,7 +298,7 @@ public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); FailureValidator validator = new FailureValidator.Builder().instanceOf(CosmosClientException.class) @@ -315,11 +306,11 @@ public void invalidQuerySytax() throws Exception { validateQueryFailure(queryObservable, validator); } - public CosmosItemProperties createDocument(CosmosContainer cosmosContainer, int cnt) throws CosmosClientException { + public CosmosItemProperties createDocument(CosmosAsyncContainer cosmosContainer, int cnt) throws CosmosClientException { CosmosItemProperties docDefinition = getDocumentDefinition(cnt); - return cosmosContainer.createItem(docDefinition).block().properties(); + return cosmosContainer.createItem(docDefinition).block().getProperties(); } private void queryWithContinuationTokensAndPageSizes(String query, int[] pageSizes, List expectedDocs) { @@ -327,12 +318,12 @@ private void queryWithContinuationTokensAndPageSizes(String query, int[] pageSiz List receivedDocuments = this.queryWithContinuationTokens(query, pageSize); List actualIds = new ArrayList(); for (CosmosItemProperties document : receivedDocuments) { - actualIds.add(document.resourceId()); + actualIds.add(document.getResourceId()); } List expectedIds = new ArrayList(); for (CosmosItemProperties document : expectedDocs) { - expectedIds.add(document.resourceId()); + expectedIds.add(document.getResourceId()); } assertThat(actualIds).containsOnlyElementsOf(expectedIds); @@ -346,8 +337,8 @@ private List queryWithContinuationTokens(String query, int do { FeedOptions options = new FeedOptions(); options.maxItemCount(pageSize); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + options.setEnableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(2); options.requestContinuation(requestContinuation); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -358,8 +349,8 @@ private List queryWithContinuationTokens(String query, int testSubscriber.assertComplete(); FeedResponse firstPage = (FeedResponse) testSubscriber.getEvents().get(0).get(0); - requestContinuation = firstPage.continuationToken(); - receivedDocuments.addAll(firstPage.results()); + requestContinuation = firstPage.getContinuationToken(); + receivedDocuments.addAll(firstPage.getResults()); continuationTokens.add(requestContinuation); } while (requestContinuation != null); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParsingEnvTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParsingEnvTest.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParsingEnvTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ParsingEnvTest.java diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java new file mode 100644 index 000000000000..fe896f02b227 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.cosmos.rx; + +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; +import com.azure.data.cosmos.internal.FailureValidator; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; +import reactor.core.publisher.Mono; + +import java.util.UUID; + +//TODO: change to use external TestSuiteBase +public class PermissionCrudTest extends TestSuiteBase { + + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncUser createdUser; + private final String databaseId = CosmosDatabaseForTest.generateId(); + + private CosmosAsyncClient client; + + @Factory(dataProvider = "clientBuilders") + public PermissionCrudTest(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void createPermission() throws Exception { + + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); + //create getPermission + CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() + .setId(UUID.randomUUID().toString()) + .setPermissionMode(PermissionMode.READ) + .setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); + + Mono createObservable = createdUser.createPermission(permissionSettings, null); + + // validate getPermission creation + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(permissionSettings.getId()) + .withPermissionMode(PermissionMode.READ) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(createObservable, validator); + } + + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void readPermission() throws Exception { + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); + + // create permission + CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() + .setId(UUID.randomUUID().toString()) + .setPermissionMode(PermissionMode.READ) + .setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); + CosmosAsyncPermissionResponse readBackPermission = createdUser.createPermission(permissionSettings, null) + .block(); + + // read Permission + Mono readObservable = readBackPermission.getPermission().read(null); + + // validate permission read + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(permissionSettings.getId()) + .withPermissionMode(PermissionMode.READ) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(readObservable, validator); + } + + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void deletePermission() throws Exception { + + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); + + // create getPermission + CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() + .setId(UUID.randomUUID().toString()) + .setPermissionMode(PermissionMode.READ) + .setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); + CosmosAsyncPermissionResponse readBackPermission = createdUser.createPermission(permissionSettings, null) + .block(); + // delete + Mono deleteObservable = readBackPermission.getPermission() + .delete(null); + + // validate delete permission + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .nullResource() + .build(); + validateSuccess(deleteObservable, validator); + + waitIfNeededForReplicasToCatchUp(clientBuilder()); + + // attempt to read the getPermission which was deleted + Mono readObservable = readBackPermission.getPermission() + .read( null); + FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); + validateFailure(readObservable, notFoundValidator); + } + + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void upsertPermission() throws Exception { + + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); + + // create permission + CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() + .setId(UUID.randomUUID().toString()) + .setPermissionMode(PermissionMode.READ) + .setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); + CosmosAsyncPermissionResponse readBackPermissionResponse = createdUser.createPermission(permissionSettings, null) + .block(); + CosmosPermissionProperties readBackPermission = readBackPermissionResponse.getProperties(); + // read Permission + Mono readObservable = readBackPermissionResponse.getPermission() + .read( null); + + // validate getPermission creation + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(readBackPermission.getId()) + .withPermissionMode(PermissionMode.READ) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(readObservable, validator); + + //update getPermission + readBackPermission = readBackPermission.setPermissionMode(PermissionMode.ALL); + + Mono updateObservable = createdUser.upsertPermission(readBackPermission, null); + + // validate permission update + CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() + .withId(readBackPermission.getId()) + .withPermissionMode(PermissionMode.ALL) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(updateObservable, validatorForUpdate); + } + + @Test(groups = { "simple" }, timeOut = TIMEOUT) + public void replacePermission() throws Exception { + + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); + + String id = UUID.randomUUID().toString(); + // create permission + CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() + .setId(id) + .setPermissionMode(PermissionMode.READ) + .setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); + CosmosAsyncPermissionResponse readBackPermissionResponse = createdUser.createPermission(permissionSettings, null) + .block(); + // read Permission + Mono readObservable = readBackPermissionResponse.getPermission() + .read(null); + + // validate getPermission creation + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(readBackPermissionResponse.getPermission().id()) + .withPermissionMode(PermissionMode.READ) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(readObservable, validator); + + //update getPermission + CosmosPermissionProperties readBackPermission = readBackPermissionResponse.getProperties(); + readBackPermission = readBackPermission.setPermissionMode(PermissionMode.ALL); + + CosmosAsyncPermission cosmosPermission = createdUser.getPermission(id); + Mono updateObservable = readBackPermissionResponse.getPermission() + .replace(readBackPermission, null); + + // validate permission replace + CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() + .withId(readBackPermission.getId()) + .withPermissionMode(PermissionMode.ALL) + .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") + .notNullEtag() + .build(); + validateSuccess(updateObservable, validatorForUpdate); + } + + @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) + public void beforeClass() { + client = clientBuilder().buildAsyncClient(); + createdDatabase = createDatabase(client, databaseId); + } + + @AfterClass(groups = { "simple" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + public void afterClass() { + safeClose(client); + } + + private static CosmosUserProperties getUserDefinition() { + return new CosmosUserProperties() + .setId(UUID.randomUUID().toString()); + } + +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java index e9ad89b3ce60..7902d992d562 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionQueryTest.java @@ -46,7 +46,7 @@ public PermissionQueryTest(AsyncDocumentClient.Builder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryWithFilter() throws Exception { - String filterId = createdPermissions.get(0).id(); + String filterId = createdPermissions.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterId); FeedOptions options = new FeedOptions(); @@ -54,14 +54,14 @@ public void queryWithFilter() throws Exception { Flux> queryObservable = client .queryPermissions(getUserLink(), query, options); - List expectedDocs = createdPermissions.stream().filter(sp -> filterId.equals(sp.id()) ).collect(Collectors.toList()); + List expectedDocs = createdPermissions.stream().filter(sp -> filterId.equals(sp.getId()) ).collect(Collectors.toList()); assertThat(expectedDocs).isNotEmpty(); int expectedPageSize = (expectedDocs.size() + options.maxItemCount() - 1) / options.maxItemCount(); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -74,7 +74,7 @@ public void query_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = client .queryPermissions(getUserLink(), query, options); @@ -93,7 +93,7 @@ public void queryAll() throws Exception { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); options.maxItemCount(3); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = client .queryPermissions(getUserLink(), query, options); @@ -103,7 +103,7 @@ public void queryAll() throws Exception { .Builder() .exactlyContainsInAnyOrder(createdPermissions .stream() - .map(d -> d.resourceId()) + .map(d -> d.getResourceId()) .collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() @@ -116,7 +116,7 @@ public void queryAll() throws Exception { public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = client .queryPermissions(getUserLink(), query, options); @@ -132,9 +132,9 @@ public void invalidQuerySytax() throws Exception { public void beforeClass() { client = clientBuilder().build(); Database d = new Database(); - d.id(databaseId); + d.setId(databaseId); createdDatabase = createDatabase(client, d); - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); for(int i = 0; i < 5; i++) { createdPermissions.add(createPermissions(client, i)); @@ -151,16 +151,16 @@ public void afterClass() { private static User getUserDefinition() { User user = new User(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); return user; } public Permission createPermissions(AsyncDocumentClient client, int index) { DocumentCollection collection = new DocumentCollection(); - collection.id(UUID.randomUUID().toString()); + collection.setId(UUID.randomUUID().toString()); Permission permission = new Permission(); - permission.id(UUID.randomUUID().toString()); + permission.setId(UUID.randomUUID().toString()); permission.setPermissionMode(PermissionMode.READ); permission.setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgT" + Integer.toString(index) + "="); @@ -172,10 +172,10 @@ private String getUserLink() { } private String getDatabaseId() { - return createdDatabase.id(); + return createdDatabase.getId(); } private String getUserId() { - return createdUser.id(); + return createdUser.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java similarity index 71% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java index 357c39ae3b3b..ef384eec50da 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ProxyHostTest.java @@ -2,15 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.CosmosResponseValidator; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.TestConfigurations; import com.azure.data.cosmos.rx.proxy.HttpProxyServer; import org.apache.log4j.Level; @@ -42,10 +35,10 @@ */ public class ProxyHostTest extends TestSuiteBase { - private static CosmosDatabase createdDatabase; - private static CosmosContainer createdCollection; + private static CosmosAsyncDatabase createdDatabase; + private static CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; private final String PROXY_HOST = "localhost"; private final int PROXY_PORT = 8080; private HttpProxyServer httpProxyServer; @@ -56,7 +49,7 @@ public ProxyHostTest() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); createdCollection = getSharedMultiPartitionCosmosContainer(client); httpProxyServer = new HttpProxyServer(); @@ -72,19 +65,19 @@ public void beforeClass() throws Exception { */ @Test(groups = { "simple" }, timeOut = TIMEOUT) public void createDocumentWithValidHttpProxy() throws Exception { - CosmosClient clientWithRightProxy = null; + CosmosAsyncClient clientWithRightProxy = null; try { ConnectionPolicy connectionPolicy =new ConnectionPolicy(); - connectionPolicy.proxy(PROXY_HOST, PROXY_PORT); - clientWithRightProxy = CosmosClient.builder().endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .connectionPolicy(connectionPolicy) - .consistencyLevel(ConsistencyLevel.SESSION).build(); + connectionPolicy.setProxy(PROXY_HOST, PROXY_PORT); + clientWithRightProxy = CosmosAsyncClient.builder().setEndpoint(TestConfigurations.HOST) + .setKey(TestConfigurations.MASTER_KEY) + .setConnectionPolicy(connectionPolicy) + .setConsistencyLevel(ConsistencyLevel.SESSION).buildAsyncClient(); CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = clientWithRightProxy.getDatabase(createdDatabase.id()).getContainer(createdCollection.id()) + Mono createObservable = clientWithRightProxy.getDatabase(createdDatabase.getId()).getContainer(createdCollection.getId()) .createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()) .build(); validateSuccess(createObservable, validator); } finally { @@ -103,23 +96,23 @@ public void createDocumentWithValidHttpProxy() throws Exception { public void createDocumentWithValidHttpProxyWithNettyWireLogging() throws Exception { LogManager.getRootLogger().setLevel(Level.INFO); LogManager.getLogger(LogLevelTest.NETWORK_LOGGING_CATEGORY).setLevel(Level.TRACE); - CosmosClient clientWithRightProxy = null; + CosmosAsyncClient clientWithRightProxy = null; try { StringWriter consoleWriter = new StringWriter(); WriterAppender appender = new WriterAppender(new PatternLayout(), consoleWriter); Logger.getLogger(LogLevelTest.NETWORK_LOGGING_CATEGORY).addAppender(appender); ConnectionPolicy connectionPolicy =new ConnectionPolicy(); - connectionPolicy.proxy(PROXY_HOST, PROXY_PORT); - clientWithRightProxy = CosmosClient.builder().endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .connectionPolicy(connectionPolicy) - .consistencyLevel(ConsistencyLevel.SESSION).build(); + connectionPolicy.setProxy(PROXY_HOST, PROXY_PORT); + clientWithRightProxy = CosmosAsyncClient.builder().setEndpoint(TestConfigurations.HOST) + .setKey(TestConfigurations.MASTER_KEY) + .setConnectionPolicy(connectionPolicy) + .setConsistencyLevel(ConsistencyLevel.SESSION).buildAsyncClient(); CosmosItemProperties docDefinition = getDocumentDefinition(); - Mono createObservable = clientWithRightProxy.getDatabase(createdDatabase.id()).getContainer(createdCollection.id()) + Mono createObservable = clientWithRightProxy.getDatabase(createdDatabase.getId()).getContainer(createdCollection.getId()) .createItem(docDefinition, new CosmosItemRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(docDefinition.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(docDefinition.getId()) .build(); validateSuccess(createObservable, validator); @@ -135,7 +128,7 @@ public void createDocumentWithValidHttpProxyWithNettyWireLogging() throws Except public void afterClass() throws Exception { safeClose(client); httpProxyServer.shutDown(); - // wait for proxy server to be shutdown + // wait for getProxy server to be shutdown TimeUnit.SECONDS.sleep(1); LogManager.resetConfiguration(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java similarity index 75% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java index 4f2f951877ed..4666389cfc11 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedCollectionsTest.java @@ -2,16 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.PartitionKeyDefinition; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.AfterClass; @@ -33,10 +25,10 @@ public class ReadFeedCollectionsTest extends TestSuiteBase { public final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosDatabase createdDatabase; - private List createdCollections = new ArrayList<>(); + private CosmosAsyncDatabase createdDatabase; + private List createdCollections = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuilders") public ReadFeedCollectionsTest(CosmosClientBuilder clientBuilder) { @@ -55,7 +47,7 @@ public void readCollections() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdCollections.size()) - .exactlyContainsInAnyOrder(createdCollections.stream().map(d -> d.read().block().properties().resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(createdCollections.stream().map(d -> d.read().block().getProperties().getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -67,7 +59,7 @@ public void readCollections() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, databaseId); for(int i = 0; i < 3; i++) { @@ -81,12 +73,12 @@ public void afterClass() { safeClose(client); } - public CosmosContainer createCollections(CosmosDatabase database) { + public CosmosAsyncContainer createCollections(CosmosAsyncDatabase database) { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collection = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); - return database.createContainer(collection, new CosmosContainerRequestOptions()).block().container(); + return database.createContainer(collection, new CosmosContainerRequestOptions()).block().getContainer(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java index c8be67ea4b7c..655dc7f51652 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDatabasesTest.java @@ -2,12 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.CosmosDatabaseRequestOptions; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.AfterClass; @@ -27,7 +23,7 @@ public class ReadFeedDatabasesTest extends TestSuiteBase { private List createdDatabases = new ArrayList<>(); private List allDatabases = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuilders") public ReadFeedDatabasesTest(CosmosClientBuilder clientBuilder) { @@ -45,7 +41,7 @@ public void readDatabases() throws Exception { int expectedPageSize = (allDatabases.size() + options.maxItemCount() - 1) / options.maxItemCount(); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(allDatabases.size()) - .exactlyContainsInAnyOrder(allDatabases.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(allDatabases.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -56,9 +52,9 @@ public void readDatabases() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws URISyntaxException { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); allDatabases = client.readAllDatabases(null) - .map(frp -> frp.results()) + .map(frp -> frp.getResults()) .collectList() .map(list -> list.stream().flatMap(x -> x.stream()).collect(Collectors.toList())) .block(); @@ -68,15 +64,15 @@ public void beforeClass() throws URISyntaxException { allDatabases.addAll(createdDatabases); } - public CosmosDatabaseProperties createDatabase(CosmosClient client) { + public CosmosDatabaseProperties createDatabase(CosmosAsyncClient client) { CosmosDatabaseProperties db = new CosmosDatabaseProperties(UUID.randomUUID().toString()); - return client.createDatabase(db, new CosmosDatabaseRequestOptions()).block().properties(); + return client.createDatabase(db, new CosmosDatabaseRequestOptions()).block().getProperties(); } @AfterClass(groups = { "simple" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { for (int i = 0; i < 5; i ++) { - safeDeleteDatabase(client.getDatabase(createdDatabases.get(i).id())); + safeDeleteDatabase(client.getDatabase(createdDatabases.get(i).getId())); } safeClose(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java index 1268614a9757..f941205f4e6f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedDocumentsTest.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; @@ -29,11 +23,11 @@ @Ignore public class ReadFeedDocumentsTest extends TestSuiteBase { - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; private List createdDocuments; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public ReadFeedDocumentsTest(CosmosClientBuilder clientBuilder) { @@ -43,14 +37,14 @@ public ReadFeedDocumentsTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = FEED_TIMEOUT) public void readDocuments() { FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(2); Flux> feedObservable = createdCollection.readAllItems(options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdDocuments.size()) .numberOfPagesIsGreaterThanOrEqualTo(1) - .exactlyContainsInAnyOrder(createdDocuments.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(createdDocuments.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0) .pageSizeIsLessThanOrEqualTo(options.maxItemCount()) @@ -77,7 +71,7 @@ public void readDocuments_withoutEnableCrossPartitionQuery() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -112,10 +106,10 @@ public String getCollectionLink() { } private String getCollectionId() { - return createdCollection.id(); + return createdCollection.getId(); } private String getDatabaseId() { - return createdDatabase.id(); + return createdDatabase.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java index d1468ed0e21a..93062088c516 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedExceptionHandlingTest.java @@ -2,11 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import io.reactivex.subscribers.TestSubscriber; import org.mockito.Mockito; import org.testng.annotations.AfterClass; @@ -21,7 +18,7 @@ public class ReadFeedExceptionHandlingTest extends TestSuiteBase { - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public ReadFeedExceptionHandlingTest(CosmosClientBuilder clientBuilder) { @@ -43,7 +40,7 @@ public void readFeedException() throws Exception { .mergeWith(Flux.error(BridgeInternal.createCosmosClientException(0))) .mergeWith(Flux.fromIterable(frps)); - final CosmosClient mockClient = Mockito.spy(client); + final CosmosAsyncClient mockClient = Mockito.spy(client); Mockito.when(mockClient.readAllDatabases(null)).thenReturn(response); TestSubscriber> subscriber = new TestSubscriber>(); mockClient.readAllDatabases(null).subscribe(subscriber); @@ -55,7 +52,7 @@ public void readFeedException() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); } @AfterClass(groups = { "simple" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java similarity index 93% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java index f291d9b4914e..f7676ccc2446 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedOffersTest.java @@ -53,7 +53,7 @@ public void readOffers() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(allOffers.size()) - .exactlyContainsInAnyOrder(allOffers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(allOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -71,7 +71,7 @@ public void beforeClass() { } allOffers = client.readOffers(null) - .map(FeedResponse::results) + .map(FeedResponse::getResults) .collectList() .map(list -> list.stream().flatMap(Collection::stream).collect(Collectors.toList())) .single() @@ -86,18 +86,18 @@ public void afterClass() { public DocumentCollection createCollections(AsyncDocumentClient client) { DocumentCollection collection = new DocumentCollection(); - collection.id(UUID.randomUUID().toString()); + collection.setId(UUID.randomUUID().toString()); PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); collection.setPartitionKey(partitionKeyDef); return client.createCollection(getDatabaseLink(), collection, null).single().block().getResource(); } private String getDatabaseLink() { - return "dbs/" + createdDatabase.id(); + return "dbs/" + createdDatabase.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java similarity index 90% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java index 81c7ad6b5884..ba3c668befda 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPermissionsTest.java @@ -50,7 +50,7 @@ public void readPermissions() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdPermissions.size()) .numberOfPages(expectedPageSize) - .exactlyContainsInAnyOrder(createdPermissions.stream().map(Resource::resourceId).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(createdPermissions.stream().map(Resource::getResourceId).collect(Collectors.toList())) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) .build(); @@ -61,9 +61,9 @@ public void readPermissions() throws Exception { public void beforeClass() { client = clientBuilder().build(); Database d = new Database(); - d.id(databaseId); + d.setId(databaseId); createdDatabase = createDatabase(client, d); - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); + createdUser = safeCreateUser(client, createdDatabase.getId(), getUserDefinition()); for(int i = 0; i < 5; i++) { createdPermissions.add(createPermissions(client, i)); @@ -80,13 +80,13 @@ public void afterClass() { private static User getUserDefinition() { User user = new User(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); return user; } public Permission createPermissions(AsyncDocumentClient client, int index) { Permission permission = new Permission(); - permission.id(UUID.randomUUID().toString()); + permission.setId(UUID.randomUUID().toString()); permission.setPermissionMode(PermissionMode.READ); permission.setResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgT" + Integer.toString(index) + "="); return client.createPermission(getUserLink(), permission, null).single().block().getResource(); @@ -97,10 +97,10 @@ private String getUserLink() { } private String getDatabaseId() { - return createdDatabase.id(); + return createdDatabase.getId(); } private String getUserId() { - return createdUser.id(); + return createdUser.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java index cf429130e39e..0a995ac371cc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedPkrTests.java @@ -2,14 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; +import com.azure.data.cosmos.*; import com.azure.data.cosmos.internal.AsyncDocumentClient; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.PartitionKeyRange; import org.testng.annotations.AfterClass; @@ -21,8 +16,8 @@ public class ReadFeedPkrTests extends TestSuiteBase { - private CosmosDatabase createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncDatabase createdDatabase; + private CosmosAsyncContainer createdCollection; private AsyncDocumentClient client; @@ -48,8 +43,8 @@ public void readPartitionKeyRanges() throws Exception { @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = CosmosBridgeInternal.getAsyncDocumentClient(clientBuilder().build()); - createdDatabase = getSharedCosmosDatabase(clientBuilder().build()); + client = CosmosBridgeInternal.getAsyncDocumentClient(clientBuilder().buildAsyncClient()); + createdDatabase = getSharedCosmosDatabase(clientBuilder().buildAsyncClient()); createdCollection = createCollection(createdDatabase, getCollectionDefinition(), new CosmosContainerRequestOptions()); @@ -62,6 +57,6 @@ public void afterClass() { } private String getCollectionLink() { - return "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id(); + return "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java similarity index 81% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java index ff3ab1df574e..d3017535b41d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedStoredProceduresTest.java @@ -2,13 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.Factory; @@ -27,10 +22,10 @@ @Ignore public class ReadFeedStoredProceduresTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdStoredProcedures = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public ReadFeedStoredProceduresTest(CosmosClientBuilder clientBuilder) { @@ -51,7 +46,7 @@ public void readStoredProcedures() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdStoredProcedures.size()) .exactlyContainsInAnyOrder( - createdStoredProcedures.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + createdStoredProcedures.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -61,7 +56,7 @@ public void readStoredProcedures() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -77,11 +72,11 @@ public void afterClass() { safeClose(client); } - public CosmosStoredProcedureProperties createStoredProcedures(CosmosContainer cosmosContainer) { + public CosmosStoredProcedureProperties createStoredProcedures(CosmosAsyncContainer cosmosContainer) { CosmosStoredProcedureProperties sproc = new CosmosStoredProcedureProperties(); - sproc.id(UUID.randomUUID().toString()); - sproc.body("function() {var x = 10;}"); + sproc.setId(UUID.randomUUID().toString()); + sproc.setBody("function() {var x = 10;}"); return cosmosContainer.getScripts().createStoredProcedure(sproc, new CosmosStoredProcedureRequestOptions()) - .block().properties(); + .block().getProperties(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java similarity index 74% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java index a390051f74b8..78634a06e5e8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedTriggersTest.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.TriggerOperation; -import com.azure.data.cosmos.TriggerType; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.Factory; @@ -28,10 +22,10 @@ @Ignore public class ReadFeedTriggersTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdTriggers = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public ReadFeedTriggersTest(CosmosClientBuilder clientBuilder) { @@ -51,7 +45,7 @@ public void readTriggers() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdTriggers.size()) .exactlyContainsInAnyOrder( - createdTriggers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + createdTriggers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -61,7 +55,7 @@ public void readTriggers() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -77,12 +71,12 @@ public void afterClass() { safeClose(client); } - public CosmosTriggerProperties createTriggers(CosmosContainer cosmosContainer) { + public CosmosTriggerProperties createTriggers(CosmosAsyncContainer cosmosContainer) { CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); - return cosmosContainer.getScripts().createTrigger(trigger).block().properties(); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); + return cosmosContainer.getScripts().createTrigger(trigger).block().getProperties(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java similarity index 82% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java index 27708f6f248a..5c34dc864bd7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUdfsTest.java @@ -2,13 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.Database; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.Factory; @@ -28,10 +24,10 @@ public class ReadFeedUdfsTest extends TestSuiteBase { private Database createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdUserDefinedFunctions = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public ReadFeedUdfsTest(CosmosClientBuilder clientBuilder) { @@ -53,7 +49,7 @@ public void readUserDefinedFunctions() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdUserDefinedFunctions.size()) .exactlyContainsInAnyOrder( - createdUserDefinedFunctions.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + createdUserDefinedFunctions.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -63,7 +59,7 @@ public void readUserDefinedFunctions() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -79,12 +75,12 @@ public void afterClass() { safeClose(client); } - public CosmosUserDefinedFunctionProperties createUserDefinedFunctions(CosmosContainer cosmosContainer) { + public CosmosUserDefinedFunctionProperties createUserDefinedFunctions(CosmosAsyncContainer cosmosContainer) { CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); return cosmosContainer.getScripts().createUserDefinedFunction(udf).block() - .properties(); + .getProperties(); } private String getCollectionLink() { @@ -92,10 +88,10 @@ private String getCollectionLink() { } private String getCollectionId() { - return createdCollection.id(); + return createdCollection.getId(); } private String getDatabaseId() { - return createdDatabase.id(); + return createdDatabase.getId(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java similarity index 78% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java index 2acad9621f4e..13e19180ac52 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ReadFeedUsersTest.java @@ -2,13 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.AfterClass; @@ -25,9 +20,9 @@ public class ReadFeedUsersTest extends TestSuiteBase { public final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosDatabase createdDatabase; + private CosmosAsyncDatabase createdDatabase; - private CosmosClient client; + private CosmosAsyncClient client; private List createdUsers = new ArrayList<>(); @Factory(dataProvider = "clientBuilders") @@ -47,7 +42,7 @@ public void readUsers() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdUsers.size()) - .exactlyContainsInAnyOrder(createdUsers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(createdUsers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -57,7 +52,7 @@ public void readUsers() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, databaseId); for(int i = 0; i < 5; i++) { @@ -73,9 +68,9 @@ public void afterClass() { safeClose(client); } - public CosmosUserProperties createUsers(CosmosDatabase cosmosDatabase) { + public CosmosUserProperties createUsers(CosmosAsyncDatabase cosmosDatabase) { CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); - return cosmosDatabase.createUser(user).block().properties(); + user.setId(UUID.randomUUID().toString()); + return cosmosDatabase.createUser(user).block().getProperties(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java similarity index 74% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java index 3a1eebb636fc..a3853b314a82 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/ResourceTokenTest.java @@ -87,23 +87,23 @@ public ResourceTokenTest(AsyncDocumentClient.Builder clientBuilder) { public void beforeClass() throws Exception { client = clientBuilder().build(); Database d = new Database(); - d.id(databaseId); + d.setId(databaseId); createdDatabase = createDatabase(client, d); // CREATE collection - createdCollection = createCollection(client, createdDatabase.id(), getCollectionDefinitionWithPartitionKey(PARTITION_KEY_PATH_2)); + createdCollection = createCollection(client, createdDatabase.getId(), getCollectionDefinitionWithPartitionKey(PARTITION_KEY_PATH_2)); // CREATE document - createdDocument = createDocument(client, createdDatabase.id(),createdCollection.id(), getDocument()); - // CREATE collection with partition key - createdCollectionWithPartitionKey = createCollection(client, createdDatabase.id(), getCollectionDefinitionWithPartitionKey(PARTITION_KEY_PATH_1)); - // CREATE document with partition key - createdDocumentWithPartitionKey = createDocument(client, createdDatabase.id(), createdCollectionWithPartitionKey.id(), + createdDocument = createDocument(client, createdDatabase.getId(),createdCollection.getId(), getDocument()); + // CREATE collection with partition getKey + createdCollectionWithPartitionKey = createCollection(client, createdDatabase.getId(), getCollectionDefinitionWithPartitionKey(PARTITION_KEY_PATH_1)); + // CREATE document with partition getKey + createdDocumentWithPartitionKey = createDocument(client, createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), getDocumentDefinitionWithPartitionKey()); - // CREATE second document with partition key - createdDocumentWithPartitionKey2 = createDocument(client, createdDatabase.id(),createdCollectionWithPartitionKey.id(), + // CREATE second document with partition getKey + createdDocumentWithPartitionKey2 = createDocument(client, createdDatabase.getId(),createdCollectionWithPartitionKey.getId(), getDocumentDefinitionWithPartitionKey2()); - // CREATE user - createdUser = createUser(client, createdDatabase.id(), getUserDefinition()); - // CREATE permission for collection + // CREATE getUser + createdUser = createUser(client, createdDatabase.getId(), getUserDefinition()); + // CREATE getPermission for collection createdCollPermission = client.createPermission(getUserLink(), getCollPermission(), null).single().block() .getResource(); createdCollPermissionWithName = client.createPermission(getUserLink(), getCollPermissionWithName(), null).single().block() @@ -146,40 +146,40 @@ public void beforeClass() throws Exception { @DataProvider(name = "collectionAndPermissionData") public Object[][] collectionAndPermissionData() { return new Object[][]{ - //This test will try to read collection from its own permission and validate it, both with request Id and name. - {createdCollection.selfLink(), createdCollPermission}, - {TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()), createdDocPermissionWithName}, + //This test will try to read collection from its own getPermission and validate it, both with request Id and getName. + {createdCollection.getSelfLink(), createdCollPermission}, + {TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()), createdDocPermissionWithName}, }; } @DataProvider(name = "documentAndPermissionData") public Object[][] documentAndPermissionData() { return new Object[][]{ - //These tests will try to read document from its own permission and validate it, both with request Id and name. - {createdDocument.selfLink(), createdDocPermission, createdDocument.id(), null}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollection.id(), createdDocument.id()), createdDocPermissionWithName, createdDocument.id(), null}, + //These tests will try to read document from its own getPermission and validate it, both with request Id and getName. + {createdDocument.getSelfLink(), createdDocPermission, createdDocument.getId(), null}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollection.getId(), createdDocument.getId()), createdDocPermissionWithName, createdDocument.getId(), null}, - //These tests will try to read document from its permission having partition key 1 and validate it, both with request Id and name. - {createdDocumentWithPartitionKey.selfLink(), createdDocPermissionWithPartitionKey, createdDocumentWithPartitionKey.id(), PARTITION_KEY_VALUE}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey.id()), createdDocPermissionWithPartitionKeyWithName - , createdDocumentWithPartitionKey.id(), PARTITION_KEY_VALUE}, + //These tests will try to read document from its getPermission having partition getKey 1 and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey.getSelfLink(), createdDocPermissionWithPartitionKey, createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey.getId()), createdDocPermissionWithPartitionKeyWithName + , createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, - //These tests will try to read document from its permission having partition key 2 and validate it, both with request Id and name. - {createdDocumentWithPartitionKey2.selfLink(), createdDocPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.id(), PARTITION_KEY_VALUE_2}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey2.id()), - createdDocPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.id(), PARTITION_KEY_VALUE_2}, + //These tests will try to read document from its getPermission having partition getKey 2 and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey2.getSelfLink(), createdDocPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey2.getId()), + createdDocPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2}, - // These tests will try to read document from its parent collection permission and validate it, both with request Id and name. - {createdDocument.selfLink(), createdCollPermission, createdDocument.id(), null}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollection.id(), createdDocument.id()), createdCollPermissionWithName, createdDocument.id(), null}, + // These tests will try to read document from its parent collection getPermission and validate it, both with request Id and getName. + {createdDocument.getSelfLink(), createdCollPermission, createdDocument.getId(), null}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollection.getId(), createdDocument.getId()), createdCollPermissionWithName, createdDocument.getId(), null}, - //This test will try to read document from collection permission having partition key 1 and validate it, both with request Id and name. - {createdDocumentWithPartitionKey.selfLink(), createdColPermissionWithPartitionKey, createdDocumentWithPartitionKey.id(), PARTITION_KEY_VALUE}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey.id()), createdColPermissionWithPartitionKeyWithName, createdDocumentWithPartitionKey.id(), PARTITION_KEY_VALUE}, + //This test will try to read document from collection getPermission having partition getKey 1 and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey.getSelfLink(), createdColPermissionWithPartitionKey, createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey.getId()), createdColPermissionWithPartitionKeyWithName, createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, - //This test will try to read document from collection permission having partition key 2 and validate it, both with request Id and name. - {createdDocumentWithPartitionKey2.selfLink(), createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.id(), PARTITION_KEY_VALUE_2}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey2.id()), createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.id(), PARTITION_KEY_VALUE_2} + //This test will try to read document from collection getPermission having partition getKey 2 and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey2.getSelfLink(), createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey2.getId()), createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2} }; } @@ -188,9 +188,9 @@ public Object[][] documentAndPermissionData() { public Object[][] documentAndPermissionDataForResourceNotFound() { return new Object[][]{ //This test will try to read document from its resource token directly and validate it. - {createdDocumentWithPartitionKey2.selfLink(), createdColPermissionWithPartitionKey, PARTITION_KEY_VALUE}, + {createdDocumentWithPartitionKey2.getSelfLink(), createdColPermissionWithPartitionKey, PARTITION_KEY_VALUE}, //This test will try to read document from its parent collection resource token directly and validate it. - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey2.id()), + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey2.getId()), createdColPermissionWithPartitionKeyWithName, PARTITION_KEY_VALUE} }; } @@ -198,17 +198,17 @@ public Object[][] documentAndPermissionDataForResourceNotFound() { @DataProvider(name = "documentAndMultipleCollPermissionData") public Object[][] documentAndMultipleCollPermissionData() { return new Object[][]{ - //These tests will try to read document from partition 1 with two collection permissions having different partition keys and validate it, both with request Id and name. - {createdDocumentWithPartitionKey.selfLink(), createdColPermissionWithPartitionKey, createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey.id(), + //These tests will try to read document from partition 1 with two collection getPermissions having different partition keys and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey.getSelfLink(), createdColPermissionWithPartitionKey, createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey.id()), createdColPermissionWithPartitionKeyWithName - , createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey.id(), PARTITION_KEY_VALUE}, + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey.getId()), createdColPermissionWithPartitionKeyWithName + , createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey.getId(), PARTITION_KEY_VALUE}, - //These tests will try to read document from partition 1 with two collection permissions having different partition keys and validate it, both with request Id and name. - {createdDocumentWithPartitionKey2.selfLink(), createdColPermissionWithPartitionKey, createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.id(), + //These tests will try to read document from partition 1 with two collection getPermissions having different partition keys and validate it, both with request Id and getName. + {createdDocumentWithPartitionKey2.getSelfLink(), createdColPermissionWithPartitionKey, createdColPermissionWithPartitionKey2, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2}, - {TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey2.id()), createdColPermissionWithPartitionKeyWithName - , createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.id(), PARTITION_KEY_VALUE_2} + {TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey2.getId()), createdColPermissionWithPartitionKeyWithName + , createdColPermissionWithPartitionKey2WithName, createdDocumentWithPartitionKey2.getId(), PARTITION_KEY_VALUE_2} }; } @@ -234,13 +234,13 @@ public void readCollectionFromPermissionFeed(String collectionUrl, Permission pe List permissionFeed = new ArrayList<>(); permissionFeed.add(permission); asyncClientResourceToken = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) - .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.defaultPolicy()) + .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); Flux> readObservable = asyncClientResourceToken .readCollection(collectionUrl, null); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(createdCollection.id()).build(); + .withId(createdCollection.getId()).build(); validateSuccess(readObservable, validator); } finally { safeClose(asyncClientResourceToken); @@ -259,7 +259,7 @@ public void readDocumentFromPermissionFeed(String documentUrl, Permission permis List permissionFeed = new ArrayList<>(); permissionFeed.add(permission); asyncClientResourceToken = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) - .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.defaultPolicy()) + .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); RequestOptions options = new RequestOptions(); if (StringUtils.isNotEmpty(partitionKey)) { @@ -288,14 +288,14 @@ public void readDocumentFromResouceToken(String resourceToken) throws Exception try { asyncClientResourceToken = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) .withMasterKeyOrResourceToken(resourceToken) - .withConnectionPolicy(ConnectionPolicy.defaultPolicy()).withConsistencyLevel(ConsistencyLevel.SESSION) + .withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()).withConsistencyLevel(ConsistencyLevel.SESSION) .build(); RequestOptions options = new RequestOptions(); options.setPartitionKey(PartitionKey.None); Flux> readObservable = asyncClientResourceToken - .readDocument(createdDocument.selfLink(), options); + .readDocument(createdDocument.getSelfLink(), options); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(createdDocument.id()).build(); + .withId(createdDocument.getId()).build(); validateSuccess(readObservable, validator); } finally { safeClose(asyncClientResourceToken); @@ -315,7 +315,7 @@ public void readDocumentOfParKeyFromTwoCollPermissionWithDiffPartitionKeys(Strin permissionFeed.add(collPermission1); permissionFeed.add(collPermission2); asyncClientResourceToken = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) - .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.defaultPolicy()) + .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(partitionKey)); @@ -342,7 +342,7 @@ public void readDocumentFromCollPermissionWithDiffPartitionKey_ResourceNotFound( List permissionFeed = new ArrayList<>(); permissionFeed.add(permission); asyncClientResourceToken = new AsyncDocumentClient.Builder().withServiceEndpoint(TestConfigurations.HOST) - .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.defaultPolicy()) + .withPermissionFeed(permissionFeed).withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) .withConsistencyLevel(ConsistencyLevel.SESSION).build(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(partitionKey)); @@ -369,14 +369,14 @@ public void readDocumentFromCollPermissionWithDiffPartitionKey_WithException() t permissionFeed.add(createdColPermissionWithPartitionKey); asyncClientResourceToken = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) - .withConnectionPolicy(ConnectionPolicy.defaultPolicy()) + .withConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) .withConsistencyLevel(ConsistencyLevel.SESSION) .withPermissionFeed(permissionFeed) .build(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(PARTITION_KEY_VALUE_2)); Flux> readObservable = asyncClientResourceToken - .readDocument(createdDocumentWithPartitionKey.selfLink(), options); + .readDocument(createdDocumentWithPartitionKey.getSelfLink(), options); FailureValidator validator = new FailureValidator.Builder().resourceTokenNotFound().build(); validateFailure(readObservable, validator); } finally { @@ -392,7 +392,7 @@ public void afterClass() { private static User getUserDefinition() { User user = new User(); - user.id(USER_NAME); + user.setId(USER_NAME); return user; } @@ -403,99 +403,99 @@ private static Document getDocument() { private Permission getCollPermission() { Permission permission = new Permission(); - permission.id(PERMISSION_FOR_COLL); + permission.setId(PERMISSION_FOR_COLL); permission.setPermissionMode(PermissionMode.READ); - permission.setResourceLink(createdCollection.selfLink()); + permission.setResourceLink(createdCollection.getSelfLink()); return permission; } private Permission getCollPermissionWithName() { Permission permission = new Permission(); - permission.id(PERMISSION_FOR_COLL_WITH_NAME); + permission.setId(PERMISSION_FOR_COLL_WITH_NAME); permission.setPermissionMode(PermissionMode.READ); - permission.setResourceLink(TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id())); + permission.setResourceLink(TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId())); return permission; } private Permission getDocPermission() { Permission permission = new Permission(); - permission.id(PERMISSION_FOR_DOC); + permission.setId(PERMISSION_FOR_DOC); permission.setPermissionMode(PermissionMode.READ); - permission.setResourceLink(createdDocument.selfLink()); + permission.setResourceLink(createdDocument.getSelfLink()); return permission; } private Permission getDocPermissionWithName() { Permission permission = new Permission(); - permission.id(PERMISSION_FOR_DOC_WITH_NAME); + permission.setId(PERMISSION_FOR_DOC_WITH_NAME); permission.setPermissionMode(PermissionMode.READ); - permission.setResourceLink(TestUtils.getDocumentNameLink(createdDatabase.id(),createdCollection.id(),createdDocument.id())); + permission.setResourceLink(TestUtils.getDocumentNameLink(createdDatabase.getId(),createdCollection.getId(),createdDocument.getId())); return permission; } private Permission getDocPermissionWithPartitionKey() { - String permissionStr = String.format(PERMISSION_DEFINITION, createdDocumentWithPartitionKey.selfLink(), + String permissionStr = String.format(PERMISSION_DEFINITION, createdDocumentWithPartitionKey.getSelfLink(), PARTITION_KEY_VALUE); Permission permission = new Permission(permissionStr); return permission; } private Permission getDocPermissionWithPartitionKeyWithName() { - String permissionStr = String.format(PERMISSION_DEFINITION, TestUtils.getDocumentNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id(), createdDocumentWithPartitionKey.id()), + String permissionStr = String.format(PERMISSION_DEFINITION, TestUtils.getDocumentNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId(), createdDocumentWithPartitionKey.getId()), PARTITION_KEY_VALUE); Permission permission = new Permission(permissionStr); - permission.id("PermissionForDocWithPartitionKeyWithName"); + permission.setId("PermissionForDocWithPartitionKeyWithName"); return permission; } private Permission getDocPermissionWithPartitionKey2() { - String permissionStr = String.format(PERMISSION_DEFINITION, createdDocumentWithPartitionKey2.selfLink(), + String permissionStr = String.format(PERMISSION_DEFINITION, createdDocumentWithPartitionKey2.getSelfLink(), PARTITION_KEY_VALUE_2); Permission permission = new Permission(permissionStr); - permission.id("PermissionForDocWithPartitionKey2"); + permission.setId("PermissionForDocWithPartitionKey2"); return permission; } private Permission getDocPermissionWithPartitionKey2WithName() { - String permissionStr = String.format(PERMISSION_DEFINITION, TestUtils.getDocumentNameLink(createdDatabase.id(),createdCollectionWithPartitionKey.id(),createdDocumentWithPartitionKey2.id()), + String permissionStr = String.format(PERMISSION_DEFINITION, TestUtils.getDocumentNameLink(createdDatabase.getId(),createdCollectionWithPartitionKey.getId(),createdDocumentWithPartitionKey2.getId()), PARTITION_KEY_VALUE_2); Permission permission = new Permission(permissionStr); - permission.id("PermissionForDocWithPartitionKey2WithName"); + permission.setId("PermissionForDocWithPartitionKey2WithName"); return permission; } private Permission getColPermissionWithPartitionKey() { - String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, createdCollectionWithPartitionKey.selfLink(), + String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, createdCollectionWithPartitionKey.getSelfLink(), PARTITION_KEY_VALUE); Permission permission = new Permission(permissionStr); return permission; } private Permission getColPermissionWithPartitionKeyWithName() { - String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id()), + String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId()), PARTITION_KEY_VALUE); Permission permission = new Permission(permissionStr); - permission.id("PermissionForColWithPartitionKeyWithName"); + permission.setId("PermissionForColWithPartitionKeyWithName"); return permission; } private Permission getColPermissionWithPartitionKey2() { - String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, createdCollectionWithPartitionKey.selfLink(), + String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, createdCollectionWithPartitionKey.getSelfLink(), PARTITION_KEY_VALUE_2); Permission permission = new Permission(permissionStr); - permission.id("PermissionForColWithPartitionKey2"); + permission.setId("PermissionForColWithPartitionKey2"); return permission; } private Permission getColPermissionWithPartitionKey2WithName() { - String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollectionWithPartitionKey.id()), + String permissionStr = String.format(COLLECTION_PERMISSION_DEFINITION, TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollectionWithPartitionKey.getId()), PARTITION_KEY_VALUE_2); Permission permission = new Permission(permissionStr); - permission.id("PermissionForColWithPartitionKey2WithName"); + permission.setId("PermissionForColWithPartitionKey2WithName"); return permission; } private String getUserLink() { - return createdUser.selfLink(); + return createdUser.getSelfLink(); } private Document getDocumentDefinitionWithPartitionKey() { @@ -513,12 +513,12 @@ private DocumentCollection getCollectionDefinitionWithPartitionKey(String pkDefP PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add(pkDefPath); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); DocumentCollection collectionDefinition = new DocumentCollection(); - collectionDefinition.id(UUID.randomUUID().toString()); + collectionDefinition.setId(UUID.randomUUID().toString()); collectionDefinition.setPartitionKey(partitionKeyDef); return collectionDefinition; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java similarity index 91% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java index 7b60ec95e4b4..058fbc86cc25 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SimpleSerializationTest.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; +import com.azure.data.cosmos.CosmosAsyncClient; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonMappingException; @@ -24,8 +24,8 @@ public class SimpleSerializationTest extends TestSuiteBase { - private CosmosContainer createdCollection; - private CosmosClient client; + private CosmosAsyncContainer createdCollection; + private CosmosAsyncClient client; private static class TestObject { public static class BadSerializer extends JsonSerializer { @@ -70,7 +70,7 @@ public void createDocument() throws InterruptedException { @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java similarity index 87% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java index 892b879de541..de272e8da503 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionDocumentQueryTest.java @@ -2,18 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.Database; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.SqlParameter; -import com.azure.data.cosmos.SqlParameterList; -import com.azure.data.cosmos.SqlQuerySpec; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; @@ -38,13 +29,13 @@ public class SinglePartitionDocumentQueryTest extends TestSuiteBase { private Database createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdDocuments = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } @Factory(dataProvider = "clientBuildersWithDirect") @@ -61,7 +52,7 @@ public void queryDocuments(boolean queryMetricsEnabled) throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(5); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.populateQueryMetrics(queryMetricsEnabled); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -72,7 +63,7 @@ public void queryDocuments(boolean queryMetricsEnabled) throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -90,7 +81,7 @@ public void queryDocuments_ParameterizedQueryWithInClause() throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(5); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(sqs, options); List expectedDocs = createdDocuments.stream().filter(d -> (3 == d.getInt("prop") || 4 == d.getInt("prop"))).collect(Collectors.toList()); @@ -100,7 +91,7 @@ public void queryDocuments_ParameterizedQueryWithInClause() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -117,7 +108,7 @@ public void queryDocuments_ParameterizedQuery() throws Exception { FeedOptions options = new FeedOptions(); options.maxItemCount(5); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(sqs, options); List expectedDocs = createdDocuments.stream().filter(d -> 3 == d.getInt("prop")).collect(Collectors.toList()); @@ -127,7 +118,7 @@ public void queryDocuments_ParameterizedQuery() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -141,7 +132,7 @@ public void queryDocuments_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -159,7 +150,7 @@ public void queryDocumentsWithPageSize() throws Exception { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); options.maxItemCount(3); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); List expectedDocs = createdDocuments; @@ -169,7 +160,7 @@ public void queryDocumentsWithPageSize() throws Exception { .Builder() .exactlyContainsInAnyOrder(createdDocuments .stream() - .map(d -> d.resourceId()) + .map(d -> d.getResourceId()) .collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() @@ -184,7 +175,7 @@ public void queryOrderBy() throws Exception { String query = "SELECT * FROM r ORDER BY r.prop ASC"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(3); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -194,7 +185,7 @@ public void queryOrderBy() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .containsExactly(createdDocuments.stream() .sorted((e1, e2) -> Integer.compare(e1.getInt("prop"), e2.getInt("prop"))) - .map(d -> d.resourceId()).collect(Collectors.toList())) + .map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -207,7 +198,7 @@ public void queryOrderBy() throws Exception { public void continuationToken() throws Exception { String query = "SELECT * FROM r ORDER BY r.prop ASC"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(3); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -219,12 +210,12 @@ public void continuationToken() throws Exception { subscriber.assertNoErrors(); assertThat(subscriber.valueCount()).isEqualTo(1); FeedResponse page = ((FeedResponse) subscriber.getEvents().get(0).get(0)); - assertThat(page.results()).hasSize(3); + assertThat(page.getResults()).hasSize(3); - assertThat(page.continuationToken()).isNotEmpty(); + assertThat(page.getContinuationToken()).isNotEmpty(); - options.requestContinuation(page.continuationToken()); + options.requestContinuation(page.getContinuationToken()); queryObservable = createdCollection.queryItems(query, options); List expectedDocs = createdDocuments.stream().filter(d -> (d.getInt("prop") > 2)).collect(Collectors.toList()); @@ -235,7 +226,7 @@ public void continuationToken() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .containsExactly(expectedDocs.stream() .sorted((e1, e2) -> Integer.compare(e1.getInt("prop"), e2.getInt("prop"))) - .map(d -> d.resourceId()).collect(Collectors.toList())) + .map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -247,7 +238,7 @@ public void continuationToken() throws Exception { public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.queryItems(query, options); FailureValidator validator = new FailureValidator.Builder() @@ -258,14 +249,14 @@ public void invalidQuerySytax() throws Exception { validateQueryFailure(queryObservable, validator); } - public CosmosItemProperties createDocument(CosmosContainer cosmosContainer, int cnt) { + public CosmosItemProperties createDocument(CosmosAsyncContainer cosmosContainer, int cnt) { CosmosItemProperties docDefinition = getDocumentDefinition(cnt); - return cosmosContainer.createItem(docDefinition, new CosmosItemRequestOptions()).block().properties(); + return cosmosContainer.createItem(docDefinition, new CosmosItemRequestOptions()).block().getProperties(); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedSinglePartitionCosmosContainer(client); truncateCollection(createdCollection); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java index f10436ab1667..50cc9eea486b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/SinglePartitionReadFeedDocumentsTest.java @@ -2,12 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import org.testng.annotations.AfterClass; @@ -23,10 +19,10 @@ public class SinglePartitionReadFeedDocumentsTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdDocuments; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public SinglePartitionReadFeedDocumentsTest(CosmosClientBuilder clientBuilder) { @@ -36,7 +32,7 @@ public SinglePartitionReadFeedDocumentsTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = FEED_TIMEOUT) public void readDocuments() { final FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(2); final Flux> feedObservable = createdCollection.readAllItems(options); final int expectedPageSize = (createdDocuments.size() + options.maxItemCount() - 1) / options.maxItemCount(); @@ -44,7 +40,7 @@ public void readDocuments() { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(createdDocuments.size()) .numberOfPages(expectedPageSize) - .exactlyContainsInAnyOrder(createdDocuments.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(createdDocuments.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) .build(); @@ -53,7 +49,7 @@ public void readDocuments() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedSinglePartitionCosmosContainer(client); truncateCollection(createdCollection); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java similarity index 53% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java index 10e802ff0c39..276d2c10ac0c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureCrudTest.java @@ -2,15 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosStoredProcedure; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.CosmosStoredProcedureResponse; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -24,8 +17,8 @@ public class StoredProcedureCrudTest extends TestSuiteBase { - private CosmosClient client; - private CosmosContainer container; + private CosmosAsyncClient client; + private CosmosAsyncContainer container; @Factory(dataProvider = "clientBuildersWithDirect") public StoredProcedureCrudTest(CosmosClientBuilder clientBuilder) { @@ -36,13 +29,13 @@ public StoredProcedureCrudTest(CosmosClientBuilder clientBuilder) { public void createStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); - Mono createObservable = container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()); + Mono createObservable = container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(storedProcedureDef.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(storedProcedureDef.getId()) .withStoredProcedureBody("function() {var x = 10;}") .notNullEtag() .build(); @@ -54,15 +47,15 @@ public void createStoredProcedure() throws Exception { public void readStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); - CosmosStoredProcedure storedProcedure = container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block().storedProcedure(); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); + CosmosAsyncStoredProcedure storedProcedure = container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block().getStoredProcedure(); waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = storedProcedure.read(null); + Mono readObservable = storedProcedure.read(null); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(storedProcedureDef.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(storedProcedureDef.getId()) .withStoredProcedureBody("function() {var x = 10;}") .notNullEtag() .build(); @@ -74,13 +67,13 @@ public void readStoredProcedure() throws Exception { public void deleteStoredProcedure() throws Exception { CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); - CosmosStoredProcedure storedProcedure = this.container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block().storedProcedure(); - Mono deleteObservable = storedProcedure.delete(new CosmosStoredProcedureRequestOptions()); + CosmosAsyncStoredProcedure storedProcedure = this.container.getScripts().createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block().getStoredProcedure(); + Mono deleteObservable = storedProcedure.delete(new CosmosStoredProcedureRequestOptions()); - CosmosResponseValidator validator = new CosmosResponseValidator.Builder<>() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource() .build(); @@ -88,7 +81,7 @@ public void deleteStoredProcedure() throws Exception { waitIfNeededForReplicasToCatchUp(this.clientBuilder()); - Mono readObservable = storedProcedure.read(null); + Mono readObservable = storedProcedure.read(null); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(readObservable, notFoundValidator); } @@ -96,7 +89,7 @@ public void deleteStoredProcedure() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = 10_000 * SETUP_TIMEOUT) public void beforeClass() { assertThat(this.client).isNull(); - this.client = clientBuilder().build(); + this.client = clientBuilder().buildAsyncClient(); this.container = getSharedMultiPartitionCosmosContainer(this.client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java similarity index 85% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java index 6c82848b423d..60a5b3cb7c0d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureQueryTest.java @@ -2,13 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; @@ -30,10 +25,10 @@ @Ignore public class StoredProcedureQueryTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdStoredProcs = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public StoredProcedureQueryTest(CosmosClientBuilder clientBuilder) { @@ -43,7 +38,7 @@ public StoredProcedureQueryTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryWithFilter() throws Exception { - String filterId = createdStoredProcs.get(0).id(); + String filterId = createdStoredProcs.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterId); FeedOptions options = new FeedOptions(); @@ -52,14 +47,14 @@ public void queryWithFilter() throws Exception { .queryStoredProcedures(query, options); List expectedDocs = createdStoredProcs.stream() - .filter(sp -> filterId.equals(sp.id())).collect(Collectors.toList()); + .filter(sp -> filterId.equals(sp.getId())).collect(Collectors.toList()); assertThat(expectedDocs).isNotEmpty(); int expectedPageSize = (expectedDocs.size() + options.maxItemCount() - 1) / options.maxItemCount(); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -73,7 +68,7 @@ public void query_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts() .queryStoredProcedures(query, options); @@ -91,7 +86,7 @@ public void queryAll() throws Exception { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); options.maxItemCount(3); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts() .queryStoredProcedures(query, options); @@ -100,7 +95,7 @@ public void queryAll() throws Exception { int expectedPageSize = (expectedDocs.size() + options.maxItemCount() - 1) / options.maxItemCount(); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -113,7 +108,7 @@ public void queryAll() throws Exception { public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts() .queryStoredProcedures(query, options); @@ -122,14 +117,14 @@ public void invalidQuerySytax() throws Exception { validateQueryFailure(queryObservable, validator); } - public CosmosStoredProcedureProperties createStoredProc(CosmosContainer cosmosContainer) { + public CosmosStoredProcedureProperties createStoredProc(CosmosAsyncContainer cosmosContainer) { CosmosStoredProcedureProperties storedProcedure = getStoredProcedureDef(); - return cosmosContainer.getScripts().createStoredProcedure(storedProcedure).block().properties(); + return cosmosContainer.getScripts().createStoredProcedure(storedProcedure).block().getProperties(); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -147,8 +142,8 @@ public void afterClass() { private static CosmosStoredProcedureProperties getStoredProcedureDef() { CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); return storedProcedureDef; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java similarity index 60% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java index ab2df249453d..441c953d63ee 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/StoredProcedureUpsertReplaceTest.java @@ -2,16 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosStoredProcedure; -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.CosmosStoredProcedureResponse; -import com.azure.data.cosmos.PartitionKey; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.testng.annotations.Factory; import org.testng.annotations.Test; import org.testng.annotations.Ignore; @@ -25,9 +17,9 @@ public class StoredProcedureUpsertReplaceTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public StoredProcedureUpsertReplaceTest(CosmosClientBuilder clientBuilder) { @@ -39,31 +31,31 @@ public void replaceStoredProcedure() throws Exception { // create a stored procedure CosmosStoredProcedureProperties storedProcedureDef = new CosmosStoredProcedureProperties(); - storedProcedureDef.id(UUID.randomUUID().toString()); - storedProcedureDef.body("function() {var x = 10;}"); + storedProcedureDef.setId(UUID.randomUUID().toString()); + storedProcedureDef.setBody("function() {var x = 10;}"); CosmosStoredProcedureProperties readBackSp = createdCollection.getScripts() .createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block() - .properties(); + .getProperties(); // read stored procedure to validate creation waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = createdCollection.getScripts() - .getStoredProcedure(readBackSp.id()).read(null); + Mono readObservable = createdCollection.getScripts() + .getStoredProcedure(readBackSp.getId()).read(null); // validate stored procedure creation - CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() - .withId(readBackSp.id()).withStoredProcedureBody("function() {var x = 10;}").notNullEtag().build(); + CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() + .withId(readBackSp.getId()).withStoredProcedureBody("function() {var x = 10;}").notNullEtag().build(); validateSuccess(readObservable, validatorForRead); // update stored procedure - readBackSp.body("function() {var x = 11;}"); + readBackSp.setBody("function() {var x = 11;}"); - Mono replaceObservable = createdCollection.getScripts() - .getStoredProcedure(readBackSp.id()).replace(readBackSp); + Mono replaceObservable = createdCollection.getScripts() + .getStoredProcedure(readBackSp.getId()).replace(readBackSp); // validate stored procedure replace - CosmosResponseValidator validatorForReplace = new CosmosResponseValidator.Builder() - .withId(readBackSp.id()).withStoredProcedureBody("function() {var x = 11;}").notNullEtag().build(); + CosmosResponseValidator validatorForReplace = new CosmosResponseValidator.Builder() + .withId(readBackSp.getId()).withStoredProcedureBody("function() {var x = 11;}").notNullEtag().build(); validateSuccess(replaceObservable, validatorForReplace); } @@ -77,24 +69,24 @@ public void executeStoredProcedure() throws Exception { + " 'body':" + " 'function () {" + " for (var i = 0; i < 10; i++) {" + " getContext().getResponse().appendValue(\"Body\", i);" + " }" + " }'" + "}"); - CosmosStoredProcedure storedProcedure = null; + CosmosAsyncStoredProcedure storedProcedure = null; storedProcedure = createdCollection.getScripts() .createStoredProcedure(storedProcedureDef, new CosmosStoredProcedureRequestOptions()).block() - .storedProcedure(); + .getStoredProcedure(); String result = null; CosmosStoredProcedureRequestOptions options = new CosmosStoredProcedureRequestOptions(); - options.partitionKey(PartitionKey.None); - result = storedProcedure.execute(null, options).block().responseAsString(); + options.setPartitionKey(PartitionKey.None); + result = storedProcedure.execute(null, options).block().getResponseAsString(); assertThat(result).isEqualTo("\"0123456789\""); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java similarity index 73% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java index 9a6387ae9e7e..a91724c4597b 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TestSuiteBase.java @@ -2,44 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CompositePath; -import com.azure.data.cosmos.CompositePathSortOrder; -import com.azure.data.cosmos.ConnectionMode; -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosBridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosClientTest; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerRequestOptions; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.CosmosDatabaseResponse; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.CosmosKeyCredential; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosStoredProcedureRequestOptions; -import com.azure.data.cosmos.CosmosUser; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.DataType; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.IncludedPath; -import com.azure.data.cosmos.Index; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.PartitionKeyDefinition; -import com.azure.data.cosmos.Resource; -import com.azure.data.cosmos.RetryOptions; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.Configs; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; @@ -47,8 +11,8 @@ import com.azure.data.cosmos.internal.TestConfigurations; import com.azure.data.cosmos.internal.Utils; import com.azure.data.cosmos.internal.directconnectivity.Protocol; -import com.azure.data.cosmos.sync.CosmosSyncClient; -import com.azure.data.cosmos.sync.CosmosSyncDatabase; +import com.azure.data.cosmos.CosmosClient; +import com.azure.data.cosmos.CosmosDatabase; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -81,7 +45,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.spy; -public class TestSuiteBase extends CosmosClientTest { +public class TestSuiteBase extends CosmosAsyncClientTest { private static final int DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL = 500; private static final ObjectMapper objectMapper = new ObjectMapper(); @@ -106,28 +70,28 @@ public class TestSuiteBase extends CosmosClientTest { protected int subscriberValidationTimeout = TIMEOUT; - private static CosmosDatabase SHARED_DATABASE; - private static CosmosContainer SHARED_MULTI_PARTITION_COLLECTION; - private static CosmosContainer SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES; - private static CosmosContainer SHARED_SINGLE_PARTITION_COLLECTION; + private static CosmosAsyncDatabase SHARED_DATABASE; + private static CosmosAsyncContainer SHARED_MULTI_PARTITION_COLLECTION; + private static CosmosAsyncContainer SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES; + private static CosmosAsyncContainer SHARED_SINGLE_PARTITION_COLLECTION; public TestSuiteBase(CosmosClientBuilder clientBuilder) { super(clientBuilder); } - protected static CosmosDatabase getSharedCosmosDatabase(CosmosClient client) { + protected static CosmosAsyncDatabase getSharedCosmosDatabase(CosmosAsyncClient client) { return CosmosBridgeInternal.getCosmosDatabaseWithNewClient(SHARED_DATABASE, client); } - protected static CosmosContainer getSharedMultiPartitionCosmosContainer(CosmosClient client) { + protected static CosmosAsyncContainer getSharedMultiPartitionCosmosContainer(CosmosAsyncClient client) { return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_MULTI_PARTITION_COLLECTION, SHARED_DATABASE, client); } - protected static CosmosContainer getSharedMultiPartitionCosmosContainerWithCompositeAndSpatialIndexes(CosmosClient client) { + protected static CosmosAsyncContainer getSharedMultiPartitionCosmosContainerWithCompositeAndSpatialIndexes(CosmosAsyncClient client) { return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES, SHARED_DATABASE, client); } - protected static CosmosContainer getSharedSinglePartitionCosmosContainer(CosmosClient client) { + protected static CosmosAsyncContainer getSharedSinglePartitionCosmosContainer(CosmosAsyncClient client) { return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_SINGLE_PARTITION_COLLECTION, SHARED_DATABASE, client); } @@ -158,13 +122,13 @@ private static ImmutableList immutableListOrNull(List list) { } private static class DatabaseManagerImpl implements CosmosDatabaseForTest.DatabaseManager { - public static DatabaseManagerImpl getInstance(CosmosClient client) { + public static DatabaseManagerImpl getInstance(CosmosAsyncClient client) { return new DatabaseManagerImpl(client); } - private final CosmosClient client; + private final CosmosAsyncClient client; - private DatabaseManagerImpl(CosmosClient client) { + private DatabaseManagerImpl(CosmosAsyncClient client) { this.client = client; } @@ -174,12 +138,12 @@ public Flux> queryDatabases(SqlQuerySpec } @Override - public Mono createDatabase(CosmosDatabaseProperties databaseDefinition) { + public Mono createDatabase(CosmosDatabaseProperties databaseDefinition) { return client.createDatabase(databaseDefinition); } @Override - public CosmosDatabase getDatabase(String id) { + public CosmosAsyncDatabase getDatabase(String id) { return client.getDatabase(id); } } @@ -189,7 +153,7 @@ public static void beforeSuite() { logger.info("beforeSuite Started"); - try (CosmosClient houseKeepingClient = createGatewayHouseKeepingDocumentClient().build()) { + try (CosmosAsyncClient houseKeepingClient = createGatewayHouseKeepingDocumentClient().buildAsyncClient()) { CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.create(DatabaseManagerImpl.getInstance(houseKeepingClient)); SHARED_DATABASE = dbForTest.createdDatabase; CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); @@ -204,27 +168,27 @@ public static void afterSuite() { logger.info("afterSuite Started"); - try (CosmosClient houseKeepingClient = createGatewayHouseKeepingDocumentClient().build()) { + try (CosmosAsyncClient houseKeepingClient = createGatewayHouseKeepingDocumentClient().buildAsyncClient()) { safeDeleteDatabase(SHARED_DATABASE); CosmosDatabaseForTest.cleanupStaleTestDatabases(DatabaseManagerImpl.getInstance(houseKeepingClient)); } } - protected static void truncateCollection(CosmosContainer cosmosContainer) { - CosmosContainerProperties cosmosContainerProperties = cosmosContainer.read().block().properties(); - String cosmosContainerId = cosmosContainerProperties.id(); + protected static void truncateCollection(CosmosAsyncContainer cosmosContainer) { + CosmosContainerProperties cosmosContainerProperties = cosmosContainer.read().block().getProperties(); + String cosmosContainerId = cosmosContainerProperties.getId(); logger.info("Truncating collection {} ...", cosmosContainerId); - List paths = cosmosContainerProperties.partitionKeyDefinition().paths(); + List paths = cosmosContainerProperties.getPartitionKeyDefinition().getPaths(); FeedOptions options = new FeedOptions(); - options.maxDegreeOfParallelism(-1); - options.enableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(-1); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(100); - logger.info("Truncating collection {} documents ...", cosmosContainer.id()); + logger.info("Truncating collection {} documents ...", cosmosContainer.getId()); cosmosContainer.queryItems("SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(doc -> { Object propertyValue = null; @@ -236,57 +200,63 @@ protected static void truncateCollection(CosmosContainer cosmosContainer) { } } - return cosmosContainer.getItem(doc.id(), propertyValue).delete(); + return cosmosContainer.getItem(doc.getId(), propertyValue).delete(); }).then().block(); logger.info("Truncating collection {} triggers ...", cosmosContainerId); cosmosContainer.getScripts().queryTriggers("SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(trigger -> { // if (paths != null && !paths.isEmpty()) { // Object propertyValue = trigger.getObjectByPath(PathParser.getPathParts(paths.get(0))); // requestOptions.partitionKey(new PartitionKey(propertyValue)); +// Object propertyValue = getTrigger.getObjectByPath(PathParser.getPathParts(getPaths.get(0))); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); // } - return cosmosContainer.getScripts().getTrigger(trigger.id()).delete(); + return cosmosContainer.getScripts().getTrigger(trigger.getId()).delete(); }).then().block(); logger.info("Truncating collection {} storedProcedures ...", cosmosContainerId); cosmosContainer.getScripts().queryStoredProcedures("SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(storedProcedure -> { +// if (getPaths != null && !getPaths.isEmpty()) { // if (paths != null && !paths.isEmpty()) { // Object propertyValue = storedProcedure.getObjectByPath(PathParser.getPathParts(paths.get(0))); // requestOptions.partitionKey(new PartitionKey(propertyValue)); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); // } - return cosmosContainer.getScripts().getStoredProcedure(storedProcedure.id()).delete(new CosmosStoredProcedureRequestOptions()); + return cosmosContainer.getScripts().getStoredProcedure(storedProcedure.getId()).delete(new CosmosStoredProcedureRequestOptions()); }).then().block(); logger.info("Truncating collection {} udfs ...", cosmosContainerId); cosmosContainer.getScripts().queryUserDefinedFunctions("SELECT * FROM root", options) .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .flatMap(udf -> { +// if (getPaths != null && !getPaths.isEmpty()) { // if (paths != null && !paths.isEmpty()) { // Object propertyValue = udf.getObjectByPath(PathParser.getPathParts(paths.get(0))); // requestOptions.partitionKey(new PartitionKey(propertyValue)); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); // } - return cosmosContainer.getScripts().getUserDefinedFunction(udf.id()).delete(); + return cosmosContainer.getScripts().getUserDefinedFunction(udf.getId()).delete(); }).then().block(); logger.info("Finished truncating collection {}.", cosmosContainerId); } protected static void waitIfNeededForReplicasToCatchUp(CosmosClientBuilder clientBuilder) { - switch (clientBuilder.consistencyLevel()) { + switch (clientBuilder.getConsistencyLevel()) { case EVENTUAL: case CONSISTENT_PREFIX: logger.info(" additional wait in EVENTUAL mode so the replica catch up"); @@ -305,14 +275,14 @@ protected static void waitIfNeededForReplicasToCatchUp(CosmosClientBuilder clien } } - public static CosmosContainer createCollection(CosmosDatabase database, CosmosContainerProperties cosmosContainerProperties, - CosmosContainerRequestOptions options, int throughput) { - return database.createContainer(cosmosContainerProperties, throughput, options).block().container(); + public static CosmosAsyncContainer createCollection(CosmosAsyncDatabase database, CosmosContainerProperties cosmosContainerProperties, + CosmosContainerRequestOptions options, int throughput) { + return database.createContainer(cosmosContainerProperties, throughput, options).block().getContainer(); } - public static CosmosContainer createCollection(CosmosDatabase database, CosmosContainerProperties cosmosContainerProperties, - CosmosContainerRequestOptions options) { - return database.createContainer(cosmosContainerProperties, options).block().container(); + public static CosmosAsyncContainer createCollection(CosmosAsyncDatabase database, CosmosContainerProperties cosmosContainerProperties, + CosmosContainerRequestOptions options) { + return database.createContainer(cosmosContainerProperties, options).block().getContainer(); } private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWithCompositeAndSpatialIndexes() { @@ -332,7 +302,7 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); ArrayList partitionKeyPaths = new ArrayList(); partitionKeyPaths.add("/" + PARTITION_KEY); - partitionKeyDefinition.paths(partitionKeyPaths); + partitionKeyDefinition.setPaths(partitionKeyPaths); CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDefinition); @@ -342,12 +312,12 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi //Simple ArrayList compositeIndexSimple = new ArrayList(); CompositePath compositePath1 = new CompositePath(); - compositePath1.path("/" + NUMBER_FIELD); - compositePath1.order(CompositePathSortOrder.ASCENDING); + compositePath1.setPath("/" + NUMBER_FIELD); + compositePath1.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath2 = new CompositePath(); - compositePath2.path("/" + STRING_FIELD); - compositePath2.order(CompositePathSortOrder.DESCENDING); + compositePath2.setPath("/" + STRING_FIELD); + compositePath2.setOrder(CompositePathSortOrder.DESCENDING); compositeIndexSimple.add(compositePath1); compositeIndexSimple.add(compositePath2); @@ -355,20 +325,20 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi //Max Columns ArrayList compositeIndexMaxColumns = new ArrayList(); CompositePath compositePath3 = new CompositePath(); - compositePath3.path("/" + NUMBER_FIELD); - compositePath3.order(CompositePathSortOrder.DESCENDING); + compositePath3.setPath("/" + NUMBER_FIELD); + compositePath3.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath4 = new CompositePath(); - compositePath4.path("/" + STRING_FIELD); - compositePath4.order(CompositePathSortOrder.ASCENDING); + compositePath4.setPath("/" + STRING_FIELD); + compositePath4.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath5 = new CompositePath(); - compositePath5.path("/" + NUMBER_FIELD_2); - compositePath5.order(CompositePathSortOrder.DESCENDING); + compositePath5.setPath("/" + NUMBER_FIELD_2); + compositePath5.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath6 = new CompositePath(); - compositePath6.path("/" + STRING_FIELD_2); - compositePath6.order(CompositePathSortOrder.ASCENDING); + compositePath6.setPath("/" + STRING_FIELD_2); + compositePath6.setOrder(CompositePathSortOrder.ASCENDING); compositeIndexMaxColumns.add(compositePath3); compositeIndexMaxColumns.add(compositePath4); @@ -378,20 +348,20 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi //Primitive Values ArrayList compositeIndexPrimitiveValues = new ArrayList(); CompositePath compositePath7 = new CompositePath(); - compositePath7.path("/" + NUMBER_FIELD); - compositePath7.order(CompositePathSortOrder.DESCENDING); + compositePath7.setPath("/" + NUMBER_FIELD); + compositePath7.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath8 = new CompositePath(); - compositePath8.path("/" + STRING_FIELD); - compositePath8.order(CompositePathSortOrder.ASCENDING); + compositePath8.setPath("/" + STRING_FIELD); + compositePath8.setOrder(CompositePathSortOrder.ASCENDING); CompositePath compositePath9 = new CompositePath(); - compositePath9.path("/" + BOOL_FIELD); - compositePath9.order(CompositePathSortOrder.DESCENDING); + compositePath9.setPath("/" + BOOL_FIELD); + compositePath9.setOrder(CompositePathSortOrder.DESCENDING); CompositePath compositePath10 = new CompositePath(); - compositePath10.path("/" + NULL_FIELD); - compositePath10.order(CompositePathSortOrder.ASCENDING); + compositePath10.setPath("/" + NULL_FIELD); + compositePath10.setOrder(CompositePathSortOrder.ASCENDING); compositeIndexPrimitiveValues.add(compositePath7); compositeIndexPrimitiveValues.add(compositePath8); @@ -401,16 +371,16 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi //Long Strings ArrayList compositeIndexLongStrings = new ArrayList(); CompositePath compositePath11 = new CompositePath(); - compositePath11.path("/" + STRING_FIELD); + compositePath11.setPath("/" + STRING_FIELD); CompositePath compositePath12 = new CompositePath(); - compositePath12.path("/" + SHORT_STRING_FIELD); + compositePath12.setPath("/" + SHORT_STRING_FIELD); CompositePath compositePath13 = new CompositePath(); - compositePath13.path("/" + MEDIUM_STRING_FIELD); + compositePath13.setPath("/" + MEDIUM_STRING_FIELD); CompositePath compositePath14 = new CompositePath(); - compositePath14.path("/" + LONG_STRING_FIELD); + compositePath14.setPath("/" + LONG_STRING_FIELD); compositeIndexLongStrings.add(compositePath11); compositeIndexLongStrings.add(compositePath12); @@ -422,63 +392,63 @@ private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWi compositeIndexes.add(compositeIndexPrimitiveValues); compositeIndexes.add(compositeIndexLongStrings); - indexingPolicy.compositeIndexes(compositeIndexes); - cosmosContainerProperties.indexingPolicy(indexingPolicy); + indexingPolicy.setCompositeIndexes(compositeIndexes); + cosmosContainerProperties.setIndexingPolicy(indexingPolicy); return cosmosContainerProperties; } - public static CosmosContainer createCollection(CosmosClient client, String dbId, CosmosContainerProperties collectionDefinition) { - return client.getDatabase(dbId).createContainer(collectionDefinition).block().container(); + public static CosmosAsyncContainer createCollection(CosmosAsyncClient client, String dbId, CosmosContainerProperties collectionDefinition) { + return client.getDatabase(dbId).createContainer(collectionDefinition).block().getContainer(); } - public static void deleteCollection(CosmosClient client, String dbId, String collectionId) { + public static void deleteCollection(CosmosAsyncClient client, String dbId, String collectionId) { client.getDatabase(dbId).getContainer(collectionId).delete().block(); } - public static CosmosItem createDocument(CosmosContainer cosmosContainer, CosmosItemProperties item) { - return cosmosContainer.createItem(item).block().item(); + public static CosmosAsyncItem createDocument(CosmosAsyncContainer cosmosContainer, CosmosItemProperties item) { + return cosmosContainer.createItem(item).block().getItem(); } - public Flux bulkInsert(CosmosContainer cosmosContainer, - List documentDefinitionList, - int concurrencyLevel) { - List> result = new ArrayList<>(documentDefinitionList.size()); + public Flux bulkInsert(CosmosAsyncContainer cosmosContainer, + List documentDefinitionList, + int concurrencyLevel) { + List> result = new ArrayList<>(documentDefinitionList.size()); for (CosmosItemProperties docDef : documentDefinitionList) { result.add(cosmosContainer.createItem(docDef)); } return Flux.merge(Flux.fromIterable(result), concurrencyLevel); } - public List bulkInsertBlocking(CosmosContainer cosmosContainer, + public List bulkInsertBlocking(CosmosAsyncContainer cosmosContainer, List documentDefinitionList) { return bulkInsert(cosmosContainer, documentDefinitionList, DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL) .publishOn(Schedulers.parallel()) - .map(CosmosItemResponse::properties) + .map(CosmosAsyncItemResponse::getProperties) .collectList() .block(); } - public void voidBulkInsertBlocking(CosmosContainer cosmosContainer, - List documentDefinitionList) { + public void voidBulkInsertBlocking(CosmosAsyncContainer cosmosContainer, + List documentDefinitionList) { bulkInsert(cosmosContainer, documentDefinitionList, DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL) .publishOn(Schedulers.parallel()) - .map(CosmosItemResponse::properties) + .map(CosmosAsyncItemResponse::getProperties) .then() .block(); } - public static CosmosUser createUser(CosmosClient client, String databaseId, CosmosUserProperties userSettings) { - return client.getDatabase(databaseId).read().block().database().createUser(userSettings).block().user(); + public static CosmosAsyncUser createUser(CosmosAsyncClient client, String databaseId, CosmosUserProperties userSettings) { + return client.getDatabase(databaseId).read().block().getDatabase().createUser(userSettings).block().getUser(); } - public static CosmosUser safeCreateUser(CosmosClient client, String databaseId, CosmosUserProperties user) { - deleteUserIfExists(client, databaseId, user.id()); + public static CosmosAsyncUser safeCreateUser(CosmosAsyncClient client, String databaseId, CosmosUserProperties user) { + deleteUserIfExists(client, databaseId, user.getId()); return createUser(client, databaseId, user); } - private static CosmosContainer safeCreateCollection(CosmosClient client, String databaseId, CosmosContainerProperties collection, CosmosContainerRequestOptions options) { - deleteCollectionIfExists(client, databaseId, collection.id()); + private static CosmosAsyncContainer safeCreateCollection(CosmosAsyncClient client, String databaseId, CosmosContainerProperties collection, CosmosContainerRequestOptions options) { + deleteCollectionIfExists(client, databaseId, collection.getId()); return createCollection(client.getDatabase(databaseId), collection, options); } @@ -486,7 +456,7 @@ static protected CosmosContainerProperties getCollectionDefinition() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); @@ -497,33 +467,33 @@ static protected CosmosContainerProperties getCollectionDefinitionWithRangeRange PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList<>(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); IndexingPolicy indexingPolicy = new IndexingPolicy(); List includedPaths = new ArrayList<>(); IncludedPath includedPath = new IncludedPath(); - includedPath.path("/*"); + includedPath.setPath("/*"); Collection indexes = new ArrayList<>(); Index stringIndex = Index.Range(DataType.STRING); - BridgeInternal.setProperty(stringIndex, "precision", -1); + BridgeInternal.setProperty(stringIndex, "getPrecision", -1); indexes.add(stringIndex); Index numberIndex = Index.Range(DataType.NUMBER); BridgeInternal.setProperty(numberIndex, "precision", -1); indexes.add(numberIndex); - includedPath.indexes(indexes); + includedPath.setIndexes(indexes); includedPaths.add(includedPath); indexingPolicy.setIncludedPaths(includedPaths); CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); - cosmosContainerProperties.indexingPolicy(indexingPolicy); + cosmosContainerProperties.setIndexingPolicy(indexingPolicy); return cosmosContainerProperties; } - public static void deleteCollectionIfExists(CosmosClient client, String databaseId, String collectionId) { - CosmosDatabase database = client.getDatabase(databaseId).read().block().database(); + public static void deleteCollectionIfExists(CosmosAsyncClient client, String databaseId, String collectionId) { + CosmosAsyncDatabase database = client.getDatabase(databaseId).read().block().getDatabase(); List res = database.queryContainers(String.format("SELECT * FROM root r where r.id = '%s'", collectionId), null) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .collectList() .block(); @@ -532,21 +502,21 @@ public static void deleteCollectionIfExists(CosmosClient client, String database } } - public static void deleteCollection(CosmosDatabase cosmosDatabase, String collectionId) { + public static void deleteCollection(CosmosAsyncDatabase cosmosDatabase, String collectionId) { cosmosDatabase.getContainer(collectionId).delete().block(); } - public static void deleteCollection(CosmosContainer cosmosContainer) { + public static void deleteCollection(CosmosAsyncContainer cosmosContainer) { cosmosContainer.delete().block(); } - public static void deleteDocumentIfExists(CosmosClient client, String databaseId, String collectionId, String docId) { + public static void deleteDocumentIfExists(CosmosAsyncClient client, String databaseId, String collectionId, String docId) { FeedOptions options = new FeedOptions(); options.partitionKey(new PartitionKey(docId)); - CosmosContainer cosmosContainer = client.getDatabase(databaseId).read().block().database().getContainer(collectionId).read().block().container(); + CosmosAsyncContainer cosmosContainer = client.getDatabase(databaseId).read().block().getDatabase().getContainer(collectionId).read().block().getContainer(); List res = cosmosContainer .queryItems(String.format("SELECT * FROM root r where r.id = '%s'", docId), options) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .collectList().block(); if (!res.isEmpty()) { @@ -554,72 +524,72 @@ public static void deleteDocumentIfExists(CosmosClient client, String databaseId } } - public static void safeDeleteDocument(CosmosContainer cosmosContainer, String documentId, Object partitionKey) { + public static void safeDeleteDocument(CosmosAsyncContainer cosmosContainer, String documentId, Object partitionKey) { if (cosmosContainer != null && documentId != null) { try { - cosmosContainer.getItem(documentId, partitionKey).read().block().item().delete().block(); + cosmosContainer.getItem(documentId, partitionKey).read().block().getItem().delete().block(); } catch (Exception e) { CosmosClientException dce = Utils.as(e, CosmosClientException.class); - if (dce == null || dce.statusCode() != 404) { + if (dce == null || dce.getStatusCode() != 404) { throw e; } } } } - public static void deleteDocument(CosmosContainer cosmosContainer, String documentId) { - cosmosContainer.getItem(documentId, PartitionKey.None).read().block().item().delete(); + public static void deleteDocument(CosmosAsyncContainer cosmosContainer, String documentId) { + cosmosContainer.getItem(documentId, PartitionKey.None).read().block().getItem().delete(); } - public static void deleteUserIfExists(CosmosClient client, String databaseId, String userId) { - CosmosDatabase database = client.getDatabase(databaseId).read().block().database(); + public static void deleteUserIfExists(CosmosAsyncClient client, String databaseId, String userId) { + CosmosAsyncDatabase database = client.getDatabase(databaseId).read().block().getDatabase(); List res = database .queryUsers(String.format("SELECT * FROM root r where r.id = '%s'", userId), null) - .flatMap(page -> Flux.fromIterable(page.results())) + .flatMap(page -> Flux.fromIterable(page.getResults())) .collectList().block(); if (!res.isEmpty()) { deleteUser(database, userId); } } - public static void deleteUser(CosmosDatabase database, String userId) { - database.getUser(userId).read().block().user().delete().block(); + public static void deleteUser(CosmosAsyncDatabase database, String userId) { + database.getUser(userId).read().block().getUser().delete().block(); } - static private CosmosDatabase safeCreateDatabase(CosmosClient client, CosmosDatabaseProperties databaseSettings) { - safeDeleteDatabase(client.getDatabase(databaseSettings.id())); - return client.createDatabase(databaseSettings).block().database(); + static private CosmosAsyncDatabase safeCreateDatabase(CosmosAsyncClient client, CosmosDatabaseProperties databaseSettings) { + safeDeleteDatabase(client.getDatabase(databaseSettings.getId())); + return client.createDatabase(databaseSettings).block().getDatabase(); } - static protected CosmosDatabase createDatabase(CosmosClient client, String databaseId) { + static protected CosmosAsyncDatabase createDatabase(CosmosAsyncClient client, String databaseId) { CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); - return client.createDatabase(databaseSettings).block().database(); + return client.createDatabase(databaseSettings).block().getDatabase(); } - static protected CosmosSyncDatabase createSyncDatabase(CosmosSyncClient client, String databaseId) { + static protected CosmosDatabase createSyncDatabase(CosmosClient client, String databaseId) { CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); try { - return client.createDatabase(databaseSettings).database(); + return client.createDatabase(databaseSettings).getDatabase(); } catch (CosmosClientException e) { e.printStackTrace(); } return null; } - static protected CosmosDatabase createDatabaseIfNotExists(CosmosClient client, String databaseId) { + static protected CosmosAsyncDatabase createDatabaseIfNotExists(CosmosAsyncClient client, String databaseId) { List res = client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), null) - .flatMap(p -> Flux.fromIterable(p.results())) + .flatMap(p -> Flux.fromIterable(p.getResults())) .collectList() .block(); if (res.size() != 0) { - return client.getDatabase(databaseId).read().block().database(); + return client.getDatabase(databaseId).read().block().getDatabase(); } else { CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); - return client.createDatabase(databaseSettings).block().database(); + return client.createDatabase(databaseSettings).block().getDatabase(); } } - static protected void safeDeleteDatabase(CosmosDatabase database) { + static protected void safeDeleteDatabase(CosmosAsyncDatabase database) { if (database != null) { try { database.delete().block(); @@ -628,7 +598,7 @@ static protected void safeDeleteDatabase(CosmosDatabase database) { } } - static protected void safeDeleteSyncDatabase(CosmosSyncDatabase database) { + static protected void safeDeleteSyncDatabase(CosmosDatabase database) { if (database != null) { try { database.delete(); @@ -638,20 +608,20 @@ static protected void safeDeleteSyncDatabase(CosmosSyncDatabase database) { } } - static protected void safeDeleteAllCollections(CosmosDatabase database) { + static protected void safeDeleteAllCollections(CosmosAsyncDatabase database) { if (database != null) { List collections = database.readAllContainers() - .flatMap(p -> Flux.fromIterable(p.results())) + .flatMap(p -> Flux.fromIterable(p.getResults())) .collectList() .block(); for(CosmosContainerProperties collection: collections) { - database.getContainer(collection.id()).delete().block(); + database.getContainer(collection.getId()).delete().block(); } } } - static protected void safeDeleteCollection(CosmosContainer collection) { + static protected void safeDeleteCollection(CosmosAsyncContainer collection) { if (collection != null) { try { collection.delete().block(); @@ -660,7 +630,7 @@ static protected void safeDeleteCollection(CosmosContainer collection) { } } - static protected void safeDeleteCollection(CosmosDatabase database, String collectionId) { + static protected void safeDeleteCollection(CosmosAsyncDatabase database, String collectionId) { if (database != null && collectionId != null) { try { database.getContainer(collectionId).delete().block(); @@ -669,7 +639,7 @@ static protected void safeDeleteCollection(CosmosDatabase database, String colle } } - static protected void safeCloseAsync(CosmosClient client) { + static protected void safeCloseAsync(CosmosAsyncClient client) { if (client != null) { new Thread(() -> { try { @@ -681,7 +651,7 @@ static protected void safeCloseAsync(CosmosClient client) { } } - static protected void safeClose(CosmosClient client) { + static protected void safeClose(CosmosAsyncClient client) { if (client != null) { try { client.close(); @@ -691,7 +661,7 @@ static protected void safeClose(CosmosClient client) { } } - static protected void safeCloseSyncClient(CosmosSyncClient client) { + static protected void safeCloseSyncClient(CosmosClient client) { if (client != null) { try { client.close(); @@ -853,8 +823,8 @@ private static Object[][] simpleClientBuildersWithDirect(Protocol... protocols) } cosmosConfigurations.forEach(c -> logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", - c.connectionPolicy().connectionMode(), - c.consistencyLevel(), + c.getConnectionPolicy().getConnectionMode(), + c.getConsistencyLevel(), extractConfigs(c).getProtocol() )); @@ -944,8 +914,8 @@ private static Object[][] clientBuildersWithDirect(List testCo } cosmosConfigurations.forEach(c -> logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", - c.connectionPolicy().connectionMode(), - c.consistencyLevel(), + c.getConnectionPolicy().getConnectionMode(), + c.getConsistencyLevel(), extractConfigs(c).getProtocol() )); @@ -956,25 +926,25 @@ private static Object[][] clientBuildersWithDirect(List testCo static protected CosmosClientBuilder createGatewayHouseKeepingDocumentClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); RetryOptions options = new RetryOptions(); - options.maxRetryWaitTimeInSeconds(SUITE_SETUP_TIMEOUT); - connectionPolicy.retryOptions(options); - return CosmosClient.builder().endpoint(TestConfigurations.HOST) - .cosmosKeyCredential(cosmosKeyCredential) - .connectionPolicy(connectionPolicy) - .consistencyLevel(ConsistencyLevel.SESSION); + options.setMaxRetryWaitTimeInSeconds(SUITE_SETUP_TIMEOUT); + connectionPolicy.setRetryOptions(options); + return CosmosAsyncClient.builder().setEndpoint(TestConfigurations.HOST) + .setCosmosKeyCredential(cosmosKeyCredential) + .setConnectionPolicy(connectionPolicy) + .setConsistencyLevel(ConsistencyLevel.SESSION); } static protected CosmosClientBuilder createGatewayRxDocumentClient(ConsistencyLevel consistencyLevel, boolean multiMasterEnabled, List preferredLocations) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.GATEWAY); - connectionPolicy.usingMultipleWriteLocations(multiMasterEnabled); - connectionPolicy.preferredLocations(preferredLocations); - return CosmosClient.builder().endpoint(TestConfigurations.HOST) - .cosmosKeyCredential(cosmosKeyCredential) - .connectionPolicy(connectionPolicy) - .consistencyLevel(consistencyLevel); + connectionPolicy.setConnectionMode(ConnectionMode.GATEWAY); + connectionPolicy.setUsingMultipleWriteLocations(multiMasterEnabled); + connectionPolicy.setPreferredLocations(preferredLocations); + return CosmosAsyncClient.builder().setEndpoint(TestConfigurations.HOST) + .setCosmosKeyCredential(cosmosKeyCredential) + .setConnectionPolicy(connectionPolicy) + .setConsistencyLevel(consistencyLevel); } static protected CosmosClientBuilder createGatewayRxDocumentClient() { @@ -986,23 +956,23 @@ static protected CosmosClientBuilder createDirectRxDocumentClient(ConsistencyLev boolean multiMasterEnabled, List preferredLocations) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(ConnectionMode.DIRECT); + connectionPolicy.setConnectionMode(ConnectionMode.DIRECT); if (preferredLocations != null) { - connectionPolicy.preferredLocations(preferredLocations); + connectionPolicy.setPreferredLocations(preferredLocations); } if (multiMasterEnabled && consistencyLevel == ConsistencyLevel.SESSION) { - connectionPolicy.usingMultipleWriteLocations(true); + connectionPolicy.setUsingMultipleWriteLocations(true); } Configs configs = spy(new Configs()); doAnswer((Answer)invocation -> protocol).when(configs).getProtocol(); - CosmosClientBuilder builder = CosmosClient.builder().endpoint(TestConfigurations.HOST) - .cosmosKeyCredential(cosmosKeyCredential) - .connectionPolicy(connectionPolicy) - .consistencyLevel(consistencyLevel); + CosmosClientBuilder builder = CosmosAsyncClient.builder().setEndpoint(TestConfigurations.HOST) + .setCosmosKeyCredential(cosmosKeyCredential) + .setConnectionPolicy(connectionPolicy) + .setConsistencyLevel(consistencyLevel); return injectConfigs(builder, configs); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java similarity index 89% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java index 94d8e958a9e2..a5a4b96541f5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TokenResolverTest.java @@ -82,12 +82,12 @@ public void beforeClass() { client = clientBuilder().build(); - userWithReadPermission = createUser(client, createdDatabase.id(), getUserDefinition()); - readPermission = client.createPermission(userWithReadPermission.selfLink(), getPermission(createdCollection, "ReadPermissionOnColl", PermissionMode.READ), null).single().block() + userWithReadPermission = createUser(client, createdDatabase.getId(), getUserDefinition()); + readPermission = client.createPermission(userWithReadPermission.getSelfLink(), getPermission(createdCollection, "ReadPermissionOnColl", PermissionMode.READ), null).single().block() .getResource(); - userWithAllPermission = createUser(client, createdDatabase.id(), getUserDefinition()); - allPermission = client.createPermission(userWithAllPermission.selfLink(), getPermission(createdCollection, "AllPermissionOnColl", PermissionMode.ALL), null).single().block() + userWithAllPermission = createUser(client, createdDatabase.getId(), getUserDefinition()); + allPermission = client.createPermission(userWithAllPermission.getSelfLink(), getPermission(createdCollection, "AllPermissionOnColl", PermissionMode.ALL), null).single().block() .getResource(); } @@ -104,9 +104,9 @@ public void readDocumentWithReadPermission(ConnectionMode connectionMode) { HashMap properties = new HashMap(); properties.put("UserId", "readUser"); requestOptions.setProperties(properties); - Flux> readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().selfLink(), requestOptions); + Flux> readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().getSelfLink(), requestOptions); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(resourceResponse.getResource().id()).build(); + .withId(resourceResponse.getResource().getId()).build(); validateSuccess(readObservable, validator); } finally { safeClose(asyncClientWithTokenResolver); @@ -123,7 +123,7 @@ public void deleteDocumentWithReadPermission(ConnectionMode connectionMode) { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.READ); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(resourceResponse.getResource().get("mypk"))); - Flux> readObservable = asyncClientWithTokenResolver.deleteDocument(resourceResponse.getResource().selfLink(), requestOptions); + Flux> readObservable = asyncClientWithTokenResolver.deleteDocument(resourceResponse.getResource().getSelfLink(), requestOptions); FailureValidator validator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.FORBIDDEN).build(); validateFailure(readObservable, validator); } finally { @@ -136,7 +136,7 @@ public void writeDocumentWithReadPermission(ConnectionMode connectionMode) { AsyncDocumentClient asyncClientWithTokenResolver = null; try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.READ); - Flux> readObservable = asyncClientWithTokenResolver.createDocument(createdCollection.selfLink(), getDocumentDefinition(), null, true); + Flux> readObservable = asyncClientWithTokenResolver.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), null, true); FailureValidator validator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.FORBIDDEN).build(); validateFailure(readObservable, validator); } finally { @@ -152,9 +152,9 @@ public void writeDocumentWithAllPermission(ConnectionMode connectionMode) { try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.ALL); Document documentDefinition = getDocumentDefinition(); - Flux> readObservable = asyncClientWithTokenResolver.createDocument(createdCollection.selfLink(), documentDefinition, null, true); + Flux> readObservable = asyncClientWithTokenResolver.createDocument(createdCollection.getSelfLink(), documentDefinition, null, true); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(documentDefinition.id()).build(); + .withId(documentDefinition.getId()).build(); validateSuccess(readObservable, validator); } finally { safeClose(asyncClientWithTokenResolver); @@ -171,7 +171,7 @@ public void deleteDocumentWithAllPermission(ConnectionMode connectionMode) { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.ALL); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(resourceResponse.getResource().get("mypk"))); - Flux> readObservable = asyncClientWithTokenResolver.deleteDocument(resourceResponse.getResource().selfLink(), requestOptions); + Flux> readObservable = asyncClientWithTokenResolver.deleteDocument(resourceResponse.getResource().getSelfLink(), requestOptions); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() .nullResource().build(); validateSuccess(readObservable, validator); @@ -185,9 +185,9 @@ public void readCollectionWithReadPermission(ConnectionMode connectionMode) { AsyncDocumentClient asyncClientWithTokenResolver = null; try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.READ); - Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), null); + Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), null); ResourceResponseValidator validator = new ResourceResponseValidator.Builder() - .withId(createdCollection.id()).build(); + .withId(createdCollection.getId()).build(); validateSuccess(readObservable, validator); } finally { safeClose(asyncClientWithTokenResolver); @@ -199,7 +199,7 @@ public void deleteCollectionWithReadPermission(ConnectionMode connectionMode) { AsyncDocumentClient asyncClientWithTokenResolver = null; try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.READ); - Flux> readObservable = asyncClientWithTokenResolver.deleteCollection(createdCollection.selfLink(), null); + Flux> readObservable = asyncClientWithTokenResolver.deleteCollection(createdCollection.getSelfLink(), null); FailureValidator validator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.FORBIDDEN).build(); validateFailure(readObservable, validator); } finally { @@ -215,7 +215,7 @@ public void verifyingAuthTokenAPISequence(ConnectionMode connectionMode) { AsyncDocumentClient asyncClientWithTokenResolver = null; try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(connectionMode); + connectionPolicy.setConnectionMode(connectionMode); //Unauthorized error with invalid token resolver, valid master key and valid permission feed, making it sure tokenResolver has higher priority than all. List permissionFeed = new ArrayList<>(); @@ -230,7 +230,7 @@ public void verifyingAuthTokenAPISequence(ConnectionMode connectionMode) { .build(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(resourceResponse.getResource().get("mypk"))); - Flux> readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().selfLink(), requestOptions); + Flux> readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().getSelfLink(), requestOptions); FailureValidator failureValidator = new FailureValidator.Builder().statusCode(HttpConstants.StatusCodes.UNAUTHORIZED).build(); validateFailure(readObservable, failureValidator); @@ -243,9 +243,9 @@ public void verifyingAuthTokenAPISequence(ConnectionMode connectionMode) { .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .withPermissionFeed(permissionFeed) .build(); - readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().selfLink(), requestOptions); + readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().getSelfLink(), requestOptions); ResourceResponseValidator sucessValidator = new ResourceResponseValidator.Builder() - .withId(resourceResponse.getResource().id()).build(); + .withId(resourceResponse.getResource().getId()).build(); validateSuccess(readObservable, sucessValidator); @@ -256,7 +256,7 @@ public void verifyingAuthTokenAPISequence(ConnectionMode connectionMode) { .withConsistencyLevel(ConsistencyLevel.SESSION) .withPermissionFeed(permissionFeed) .build(); - readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().selfLink(), requestOptions); + readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().getSelfLink(), requestOptions); validateSuccess(readObservable, sucessValidator); @@ -267,7 +267,7 @@ public void verifyingAuthTokenAPISequence(ConnectionMode connectionMode) { .withConsistencyLevel(ConsistencyLevel.SESSION) .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) .build(); - readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().selfLink(), requestOptions); + readObservable = asyncClientWithTokenResolver.readDocument(resourceResponse.getResource().getSelfLink(), requestOptions); validateSuccess(readObservable, sucessValidator); } finally { @@ -297,14 +297,14 @@ public void createAndExecuteSprocWithWritePermission(ConnectionMode connectionMo " }'" + "}"); - Flux> createObservable = asyncClientWithTokenResolver.createStoredProcedure(createdCollection.selfLink(), sproc, null); + Flux> createObservable = asyncClientWithTokenResolver.createStoredProcedure(createdCollection.getSelfLink(), sproc, null); ResourceResponseValidator createSucessValidator = new ResourceResponseValidator.Builder() .withId(sprocId).build(); validateSuccess(createObservable, createSucessValidator); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey("")); - String sprocLink = "dbs/" + createdDatabase.id() + "/colls/" + createdCollection.id() + "/sprocs/" + sprocId; + String sprocLink = "dbs/" + createdDatabase.getId() + "/colls/" + createdCollection.getId() + "/sprocs/" + sprocId; StoredProcedureResponse result = asyncClientWithTokenResolver.executeStoredProcedure(sprocLink, options, null).single().block(); assertThat(result.getResponseAsString()).isEqualTo("\"Success!\""); } finally { @@ -320,20 +320,20 @@ public void readDocumentsWithAllPermission(ConnectionMode connectionMode) { try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.ALL); - Document document1 = asyncClientWithTokenResolver.createDocument(createdCollection.selfLink(), new Document("{'id': '" + id1 + "'}"), null, false) + Document document1 = asyncClientWithTokenResolver.createDocument(createdCollection.getSelfLink(), new Document("{'id': '" + id1 + "'}"), null, false) .single().block().getResource(); - Document document2 = asyncClientWithTokenResolver.createDocument(createdCollection.selfLink(), new Document("{'id': '" + id2 + "'}"), null, false) + Document document2 = asyncClientWithTokenResolver.createDocument(createdCollection.getSelfLink(), new Document("{'id': '" + id2 + "'}"), null, false) .single().block().getResource(); List expectedIds = new ArrayList(); - String rid1 = document1.resourceId(); - String rid2 = document2.resourceId(); + String rid1 = document1.getResourceId(); + String rid2 = document2.getResourceId(); expectedIds.add(rid1); expectedIds.add(rid2); String query = "SELECT * FROM r WHERE r._rid=\"" + rid1 + "\" or r._rid=\"" + rid2 + "\""; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - Flux> queryObservable = asyncClientWithTokenResolver.queryDocuments(createdCollection.selfLink(), query, options); + options.setEnableCrossPartitionQuery(true); + Flux> queryObservable = asyncClientWithTokenResolver.queryDocuments(createdCollection.getSelfLink(), query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(2) .exactlyContainsInAnyOrder(expectedIds).build(); @@ -354,13 +354,13 @@ public void readChangeFeedWithAllPermission(ConnectionMode connectionMode) throw AsyncDocumentClient asyncClientWithTokenResolver = null; String id1 = UUID.randomUUID().toString(); String id2 = UUID.randomUUID().toString(); - String partitionKey = createdCollection.getPartitionKey().paths().get(0).substring(1); + String partitionKey = createdCollection.getPartitionKey().getPaths().get(0).substring(1); String partitionKeyValue = "pk"; Document document1 = new Document(); - document1.id(id1); + document1.setId(id1); BridgeInternal.setProperty(document1, partitionKey, partitionKeyValue); Document document2 = new Document(); - document2.id(id2); + document2.setId(id2); BridgeInternal.setProperty(document2, partitionKey, partitionKeyValue); try { asyncClientWithTokenResolver = buildClient(connectionMode, PermissionMode.ALL); @@ -368,24 +368,24 @@ public void readChangeFeedWithAllPermission(ConnectionMode connectionMode) throw Thread.sleep(1500); document1 = asyncClientWithTokenResolver - .createDocument(createdCollection.selfLink(), document1, null, false).single().block() + .createDocument(createdCollection.getSelfLink(), document1, null, false).single().block() .getResource(); document2 = asyncClientWithTokenResolver - .createDocument(createdCollection.selfLink(), document2, null, false).single().block() + .createDocument(createdCollection.getSelfLink(), document2, null, false).single().block() .getResource(); List expectedIds = new ArrayList(); - String rid1 = document1.resourceId(); - String rid2 = document2.resourceId(); + String rid1 = document1.getResourceId(); + String rid2 = document2.getResourceId(); expectedIds.add(rid1); expectedIds.add(rid2); ChangeFeedOptions options = new ChangeFeedOptions(); - options.partitionKey(new PartitionKey(partitionKeyValue)); - options.startDateTime(befTime); + options.setPartitionKey(new PartitionKey(partitionKeyValue)); + options.setStartDateTime(befTime); Thread.sleep(1000); Flux> queryObservable = asyncClientWithTokenResolver - .queryDocumentChangeFeed(createdCollection.selfLink(), options); + .queryDocumentChangeFeed(createdCollection.getSelfLink(), options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .exactlyContainsInAnyOrder(expectedIds).build(); validateQuerySuccess(queryObservable, validator, 10000); @@ -400,7 +400,7 @@ public void verifyRuntimeExceptionWhenUserModifiesProperties(ConnectionMode conn try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(connectionMode); + connectionPolicy.setConnectionMode(connectionMode); asyncClientWithTokenResolver = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -410,7 +410,7 @@ public void verifyRuntimeExceptionWhenUserModifiesProperties(ConnectionMode conn RequestOptions options = new RequestOptions(); options.setProperties(new HashMap()); - Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), options); + Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), options); FailureValidator validator = new FailureValidator.Builder().withRuntimeExceptionClass(UnsupportedOperationException.class).build(); validateFailure(readObservable, validator); } finally { @@ -427,7 +427,7 @@ public void verifyBlockListedUserThrows(ConnectionMode connectionMode) { AsyncDocumentClient asyncClientWithTokenResolver = null; try { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(connectionMode); + connectionPolicy.setConnectionMode(connectionMode); asyncClientWithTokenResolver = new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -439,15 +439,15 @@ public void verifyBlockListedUserThrows(ConnectionMode connectionMode) { HashMap properties = new HashMap(); properties.put(field, blockListedUser); options.setProperties(properties); - Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), options); + Flux> readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), options); FailureValidator validator = new FailureValidator.Builder().withRuntimeExceptionMessage(errorMessage).build(); validateFailure(readObservable, validator); properties.put(field, new UserClass("valid user", 1)); options.setProperties(properties); - readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.selfLink(), options); + readObservable = asyncClientWithTokenResolver.readCollection(createdCollection.getSelfLink(), options); ResourceResponseValidator sucessValidator = new ResourceResponseValidator.Builder() - .withId(createdCollection.id()).build(); + .withId(createdCollection.getId()).build(); validateSuccess(readObservable, sucessValidator); } finally { safeClose(asyncClientWithTokenResolver); @@ -472,7 +472,7 @@ private Document getDocumentDefinition() { private AsyncDocumentClient buildClient(ConnectionMode connectionMode, PermissionMode permissionMode) { ConnectionPolicy connectionPolicy = new ConnectionPolicy(); - connectionPolicy.connectionMode(connectionMode); + connectionPolicy.setConnectionMode(connectionMode); return new AsyncDocumentClient.Builder() .withServiceEndpoint(TestConfigurations.HOST) .withConnectionPolicy(connectionPolicy) @@ -483,15 +483,15 @@ private AsyncDocumentClient buildClient(ConnectionMode connectionMode, Permissio private static User getUserDefinition() { User user = new User(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); return user; } private Permission getPermission(Resource resource, String permissionId, PermissionMode permissionMode) { Permission permission = new Permission(); - permission.id(permissionId); + permission.setId(permissionId); permission.setPermissionMode(permissionMode); - permission.setResourceLink(resource.selfLink()); + permission.setResourceLink(resource.getSelfLink()); return permission; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java similarity index 88% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java index 6e862ceb8bbe..1519fae23722 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TopQueryTests.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.PartitionKey; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.RetryAnalyzer; import com.azure.data.cosmos.internal.Utils.ValueHolder; @@ -31,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class TopQueryTests extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private ArrayList docs = new ArrayList(); private String partitionKey = "mypk"; @@ -39,7 +33,7 @@ public class TopQueryTests extends TestSuiteBase { private int secondPk = 1; private String field = "field"; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public TopQueryTests(CosmosClientBuilder clientBuilder) { @@ -52,9 +46,9 @@ public TopQueryTests(CosmosClientBuilder clientBuilder) { public void queryDocumentsWithTop(boolean qmEnabled) throws Exception { FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); options.maxItemCount(9); - options.maxDegreeOfParallelism(2); + options.setMaxDegreeOfParallelism(2); options.populateQueryMetrics(qmEnabled); int expectedTotalSize = 20; @@ -86,7 +80,7 @@ public void queryDocumentsWithTop(boolean qmEnabled) throws Exception { if (i == 0) { options.partitionKey(new PartitionKey(firstPk)); - options.enableCrossPartitionQuery(false); + options.setEnableCrossPartitionQuery(false); expectedTotalSize = 10; expectedNumberOfPages = 2; @@ -131,7 +125,7 @@ private void queryWithContinuationTokensAndPageSizes(String query, int[] pageSiz List receivedDocuments = this.queryWithContinuationTokens(query, pageSize); Set actualIds = new HashSet(); for (CosmosItemProperties document : receivedDocuments) { - actualIds.add(document.resourceId()); + actualIds.add(document.getResourceId()); } assertThat(actualIds.size()).describedAs("total number of results").isEqualTo(topCount); @@ -146,8 +140,8 @@ private List queryWithContinuationTokens(String query, int do { FeedOptions options = new FeedOptions(); options.maxItemCount(pageSize); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + options.setEnableCrossPartitionQuery(true); + options.setMaxDegreeOfParallelism(2); options.requestContinuation(requestContinuation); Flux> queryObservable = createdCollection.queryItems(query, options); @@ -159,15 +153,15 @@ private List queryWithContinuationTokens(String query, int testSubscriber.assertComplete(); FeedResponse firstPage = (FeedResponse) testSubscriber.getEvents().get(0).get(0); - requestContinuation = firstPage.continuationToken(); - receivedDocuments.addAll(firstPage.results()); + requestContinuation = firstPage.getContinuationToken(); + receivedDocuments.addAll(firstPage.getResults()); continuationTokens.add(requestContinuation); } while (requestContinuation != null); return receivedDocuments; } - public void bulkInsert(CosmosClient client) { + public void bulkInsert(CosmosAsyncClient client) { generateTestData(); for (int i = 0; i < docs.size(); i++) { @@ -179,7 +173,7 @@ public void generateTestData() { for (int i = 0; i < 10; i++) { CosmosItemProperties d = new CosmosItemProperties(); - d.id(Integer.toString(i)); + d.setId(Integer.toString(i)); BridgeInternal.setProperty(d, field, i); BridgeInternal.setProperty(d, partitionKey, firstPk); docs.add(d); @@ -187,7 +181,7 @@ public void generateTestData() { for (int i = 10; i < 20; i++) { CosmosItemProperties d = new CosmosItemProperties(); - d.id(Integer.toString(i)); + d.setId(Integer.toString(i)); BridgeInternal.setProperty(d, field, i); BridgeInternal.setProperty(d, partitionKey, secondPk); docs.add(d); @@ -201,7 +195,7 @@ public void afterClass() { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedSinglePartitionCosmosContainer(client); truncateCollection(createdCollection); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java similarity index 53% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java index 1338ae6f3111..c1df35d4b3b0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerCrudTest.java @@ -2,16 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosTrigger; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.CosmosTriggerResponse; -import com.azure.data.cosmos.TriggerOperation; -import com.azure.data.cosmos.TriggerType; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.testng.annotations.Factory; import org.testng.annotations.Test; import org.testng.annotations.Ignore; @@ -22,9 +14,9 @@ import java.util.UUID; public class TriggerCrudTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public TriggerCrudTest(CosmosClientBuilder clientBuilder) { @@ -36,16 +28,16 @@ public void createTrigger() throws Exception { // create a trigger CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); - Mono createObservable = createdCollection.getScripts().createTrigger(trigger); + Mono createObservable = createdCollection.getScripts().createTrigger(trigger); // validate trigger creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(trigger.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(trigger.getId()) .withTriggerBody("function() {var x = 10;}") .withTriggerInternals(TriggerType.PRE, TriggerOperation.CREATE) .notNullEtag() @@ -57,19 +49,19 @@ public void createTrigger() throws Exception { public void readTrigger() throws Exception { // create a trigger CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); - CosmosTrigger readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().trigger(); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); + CosmosAsyncTrigger readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().getTrigger(); // read trigger waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = readBackTrigger.read(); + Mono readObservable = readBackTrigger.read(); // validate read trigger - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(trigger.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(trigger.getId()) .withTriggerBody("function() {var x = 10;}") .withTriggerInternals(TriggerType.PRE, TriggerOperation.CREATE) .notNullEtag() @@ -83,17 +75,17 @@ public void readTrigger() throws Exception { public void deleteTrigger() throws Exception { // create a trigger CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); - CosmosTrigger readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().trigger(); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); + CosmosAsyncTrigger readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().getTrigger(); // delete trigger - Mono deleteObservable = readBackTrigger.delete(); + Mono deleteObservable = readBackTrigger.delete(); // validate delete trigger - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource() .build(); validateSuccess(deleteObservable, validator); @@ -101,7 +93,7 @@ public void deleteTrigger() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java similarity index 81% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java index 2105614ae79a..d98a7658fcfb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerQueryTest.java @@ -2,16 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.Resource; -import com.azure.data.cosmos.TriggerOperation; -import com.azure.data.cosmos.TriggerType; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; @@ -33,10 +25,10 @@ @Ignore public class TriggerQueryTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private static final List createdTriggers = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public TriggerQueryTest(CosmosClientBuilder clientBuilder) { @@ -46,7 +38,7 @@ public TriggerQueryTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryWithFilter() throws Exception { - String filterId = createdTriggers.get(0).id(); + String filterId = createdTriggers.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterId); FeedOptions options = new FeedOptions(); @@ -55,7 +47,7 @@ public void queryWithFilter() throws Exception { List expectedDocs = createdTriggers .stream() - .filter(sp -> filterId.equals(sp.id()) ) + .filter(sp -> filterId.equals(sp.getId()) ) .collect(Collectors.toList()); assertThat(expectedDocs).isNotEmpty(); @@ -63,7 +55,7 @@ public void queryWithFilter() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(Resource::resourceId).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(Resource::getResourceId).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -77,7 +69,7 @@ public void query_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryTriggers(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -95,10 +87,10 @@ public void queryAll() throws Exception { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); options.maxItemCount(3); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryTriggers(query, options); - createdTriggers.forEach(cosmosTriggerSettings -> logger.info("Created trigger in method: {}", cosmosTriggerSettings.resourceId())); + createdTriggers.forEach(cosmosTriggerSettings -> logger.info("Created trigger in method: {}", cosmosTriggerSettings.getResourceId())); List expectedDocs = createdTriggers; @@ -108,7 +100,7 @@ public void queryAll() throws Exception { .Builder() .exactlyContainsInAnyOrder(expectedDocs .stream() - .map(Resource::resourceId) + .map(Resource::getResourceId) .collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() @@ -121,7 +113,7 @@ public void queryAll() throws Exception { public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryTriggers(query, options); FailureValidator validator = new FailureValidator.Builder() @@ -132,14 +124,14 @@ public void invalidQuerySytax() throws Exception { validateQueryFailure(queryObservable, validator); } - public CosmosTriggerProperties createTrigger(CosmosContainer cosmosContainer) { + public CosmosTriggerProperties createTrigger(CosmosAsyncContainer cosmosContainer) { CosmosTriggerProperties storedProcedure = getTriggerDef(); - return cosmosContainer.getScripts().createTrigger(storedProcedure).block().properties(); + return cosmosContainer.getScripts().createTrigger(storedProcedure).block().getProperties(); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); createdTriggers.clear(); @@ -158,10 +150,10 @@ public void afterClass() { private static CosmosTriggerProperties getTriggerDef() { CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); return trigger; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java similarity index 56% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java index bb3766ba7242..9d22571b2f3f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/TriggerUpsertReplaceTest.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosTriggerProperties; -import com.azure.data.cosmos.CosmosTriggerResponse; -import com.azure.data.cosmos.TriggerOperation; -import com.azure.data.cosmos.TriggerType; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.testng.annotations.Factory; import org.testng.annotations.Test; import org.testng.annotations.Ignore; @@ -23,9 +17,9 @@ @Ignore public class TriggerUpsertReplaceTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public TriggerUpsertReplaceTest(CosmosClientBuilder clientBuilder) { @@ -37,33 +31,33 @@ public void replaceTrigger() throws Exception { // create a trigger CosmosTriggerProperties trigger = new CosmosTriggerProperties(); - trigger.id(UUID.randomUUID().toString()); - trigger.body("function() {var x = 10;}"); - trigger.triggerOperation(TriggerOperation.CREATE); - trigger.triggerType(TriggerType.PRE); - CosmosTriggerProperties readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().properties(); + trigger.setId(UUID.randomUUID().toString()); + trigger.setBody("function() {var x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); + CosmosTriggerProperties readBackTrigger = createdCollection.getScripts().createTrigger(trigger).block().getProperties(); // read trigger to validate creation waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = createdCollection.getScripts().getTrigger(readBackTrigger.id()).read(); + Mono readObservable = createdCollection.getScripts().getTrigger(readBackTrigger.getId()).read(); // validate trigger creation - CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() - .withId(readBackTrigger.id()) + CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() + .withId(readBackTrigger.getId()) .withTriggerBody("function() {var x = 10;}") .withTriggerInternals(TriggerType.PRE, TriggerOperation.CREATE) .notNullEtag() .build(); validateSuccess(readObservable, validatorForRead); - //update trigger - readBackTrigger.body("function() {var x = 11;}"); + //update getTrigger + readBackTrigger.setBody("function() {var x = 11;}"); - Mono updateObservable = createdCollection.getScripts().getTrigger(readBackTrigger.id()).replace(readBackTrigger); + Mono updateObservable = createdCollection.getScripts().getTrigger(readBackTrigger.getId()).replace(readBackTrigger); - // validate trigger replace - CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() - .withId(readBackTrigger.id()) + // validate getTrigger replace + CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() + .withId(readBackTrigger.getId()) .withTriggerBody("function() {var x = 11;}") .withTriggerInternals(TriggerType.PRE, TriggerOperation.CREATE) .notNullEtag() @@ -73,7 +67,7 @@ public void replaceTrigger() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java similarity index 58% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java index 9c18b99cd93e..db5c3bacfa40 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UniqueIndexTest.java @@ -2,30 +2,10 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosItem; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.DataType; -import com.azure.data.cosmos.ExcludedPath; -import com.azure.data.cosmos.HashIndex; -import com.azure.data.cosmos.IncludedPath; -import com.azure.data.cosmos.IndexingMode; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.data.cosmos.PartitionKey; -import com.azure.data.cosmos.PartitionKeyDefinition; -import com.azure.data.cosmos.UniqueKey; -import com.azure.data.cosmos.UniqueKeyPolicy; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.HttpConstants; import com.azure.data.cosmos.internal.TestConfigurations; -import com.azure.data.cosmos.internal.TestUtils; import com.azure.data.cosmos.internal.Utils; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -50,40 +30,41 @@ public class UniqueIndexTest extends TestSuiteBase { protected static final int SHUTDOWN_TIMEOUT = 20000; private final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosClient client; - private CosmosDatabase database; + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; - private CosmosContainer collection; + private CosmosAsyncContainer collection; @Test(groups = { "long" }, timeOut = TIMEOUT) public void insertWithUniqueIndex() throws Exception { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); UniqueKeyPolicy uniqueKeyPolicy = new UniqueKeyPolicy(); UniqueKey uniqueKey = new UniqueKey(); - uniqueKey.paths(ImmutableList.of("/name", "/description")); + uniqueKey.setPaths(ImmutableList.of("/name", "/description")); uniqueKeyPolicy.uniqueKeys(Lists.newArrayList(uniqueKey)); - collectionDefinition.uniqueKeyPolicy(uniqueKeyPolicy); + collectionDefinition.setUniqueKeyPolicy(uniqueKeyPolicy); IndexingPolicy indexingPolicy = new IndexingPolicy(); - indexingPolicy.indexingMode(IndexingMode.CONSISTENT); + indexingPolicy.setIndexingMode(IndexingMode.CONSISTENT); ExcludedPath excludedPath = new ExcludedPath(); - excludedPath.path("/*"); - indexingPolicy.excludedPaths(Collections.singletonList(excludedPath)); + excludedPath.setPath("/*"); + indexingPolicy.setExcludedPaths(Collections.singletonList(excludedPath)); IncludedPath includedPath1 = new IncludedPath(); - includedPath1.path("/name/?"); - includedPath1.indexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); + includedPath1.setPath("/name/?"); + includedPath1.setIndexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); + includedPath1.setIndexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); IncludedPath includedPath2 = new IncludedPath(); - includedPath2.path("/description/?"); - includedPath2.indexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); + includedPath2.setPath("/description/?"); + includedPath2.setIndexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); indexingPolicy.setIncludedPaths(ImmutableList.of(includedPath1, includedPath2)); - collectionDefinition.indexingPolicy(indexingPolicy); + collectionDefinition.setIndexingPolicy(indexingPolicy); ObjectMapper om = new ObjectMapper(); @@ -91,20 +72,20 @@ public void insertWithUniqueIndex() throws Exception { JsonNode doc2 = om.readValue("{\"name\":\"Alexander Pushkin\",\"description\":\"playwright\",\"id\": \"" + UUID.randomUUID().toString() + "\"}", JsonNode.class); JsonNode doc3 = om.readValue("{\"name\":\"حافظ شیرازی\",\"description\":\"poet\",\"id\": \"" + UUID.randomUUID().toString() + "\"}", JsonNode.class); - collection = database.createContainer(collectionDefinition).block().container(); + collection = database.createContainer(collectionDefinition).block().getContainer(); - CosmosItem item = collection.createItem(doc1).block().item(); + CosmosAsyncItem item = collection.createItem(doc1).block().getItem(); CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(PartitionKey.None); - CosmosItemProperties itemSettings = item.read(options).block().properties(); - assertThat(itemSettings.id()).isEqualTo(doc1.get("id").textValue()); + options.setPartitionKey(PartitionKey.None); + CosmosItemProperties itemSettings = item.read(options).block().getProperties(); + assertThat(itemSettings.getId()).isEqualTo(doc1.get("id").textValue()); try { collection.createItem(doc1).block(); fail("Did not throw due to unique constraint (create)"); } catch (RuntimeException e) { - assertThat(getDocumentClientException(e).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(getDocumentClientException(e).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } collection.createItem(doc2).block(); @@ -116,16 +97,16 @@ public void replaceAndDeleteWithUniqueIndex() throws Exception { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); UniqueKeyPolicy uniqueKeyPolicy = new UniqueKeyPolicy(); UniqueKey uniqueKey = new UniqueKey(); - uniqueKey.paths(ImmutableList.of("/name", "/description")); + uniqueKey.setPaths(ImmutableList.of("/name", "/description")); uniqueKeyPolicy.uniqueKeys(Lists.newArrayList(uniqueKey)); - collectionDefinition.uniqueKeyPolicy(uniqueKeyPolicy); + collectionDefinition.setUniqueKeyPolicy(uniqueKeyPolicy); - collection = database.createContainer(collectionDefinition).block().container(); + collection = database.createContainer(collectionDefinition).block().getContainer(); ObjectMapper om = new ObjectMapper(); @@ -133,26 +114,26 @@ public void replaceAndDeleteWithUniqueIndex() throws Exception { ObjectNode doc3 = om.readValue("{\"name\":\"Rabindranath Tagore\",\"description\":\"poet\",\"id\": \""+ UUID.randomUUID().toString() +"\"}", ObjectNode.class); ObjectNode doc2 = om.readValue("{\"name\":\"عمر خیّام\",\"description\":\"mathematician\",\"id\": \""+ UUID.randomUUID().toString() +"\"}", ObjectNode.class); - CosmosItemProperties doc1Inserted = collection.createItem(doc1, new CosmosItemRequestOptions()).block().properties(); + CosmosItemProperties doc1Inserted = collection.createItem(doc1, new CosmosItemRequestOptions()).block().getProperties(); - collection.getItem(doc1.get("id").asText(), PartitionKey.None).replace(doc1Inserted, new CosmosItemRequestOptions()).block().properties(); // REPLACE with same values -- OK. + collection.getItem(doc1.get("id").asText(), PartitionKey.None).replace(doc1Inserted, new CosmosItemRequestOptions()).block().getProperties(); // REPLACE with same values -- OK. - CosmosItemProperties doc2Inserted = collection.createItem(doc2, new CosmosItemRequestOptions()).block().properties(); + CosmosItemProperties doc2Inserted = collection.createItem(doc2, new CosmosItemRequestOptions()).block().getProperties(); CosmosItemProperties doc2Replacement = new CosmosItemProperties(doc1Inserted.toJson()); - doc2Replacement.id( doc2Inserted.id()); + doc2Replacement.setId( doc2Inserted.getId()); try { - collection.getItem(doc2Inserted.id(), PartitionKey.None).replace(doc2Replacement, new CosmosItemRequestOptions()).block(); // REPLACE doc2 with values from doc1 -- Conflict. + collection.getItem(doc2Inserted.getId(), PartitionKey.None).replace(doc2Replacement, new CosmosItemRequestOptions()).block(); // REPLACE doc2 with values from doc1 -- Conflict. fail("Did not throw due to unique constraint"); } catch (RuntimeException ex) { - assertThat(getDocumentClientException(ex).statusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); + assertThat(getDocumentClientException(ex).getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CONFLICT); } - doc3.put("id", doc1Inserted.id()); - collection.getItem(doc1Inserted.id(), PartitionKey.None).replace(doc3).block(); // REPLACE with values from doc3 -- OK. + doc3.put("id", doc1Inserted.getId()); + collection.getItem(doc1Inserted.getId(), PartitionKey.None).replace(doc3).block(); // REPLACE with values from doc3 -- OK. - collection.getItem(doc1Inserted.id(), PartitionKey.None).delete().block(); + collection.getItem(doc1Inserted.getId(), PartitionKey.None).delete().block(); collection.createItem(doc1, new CosmosItemRequestOptions()).block(); } @@ -161,42 +142,42 @@ public void uniqueKeySerializationDeserialization() { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); ArrayList paths = new ArrayList(); paths.add("/mypk"); - partitionKeyDef.paths(paths); + partitionKeyDef.setPaths(paths); CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); UniqueKeyPolicy uniqueKeyPolicy = new UniqueKeyPolicy(); UniqueKey uniqueKey = new UniqueKey(); - uniqueKey.paths(ImmutableList.of("/name", "/description")); + uniqueKey.setPaths(ImmutableList.of("/name", "/description")); uniqueKeyPolicy.uniqueKeys(Lists.newArrayList(uniqueKey)); - collectionDefinition.uniqueKeyPolicy(uniqueKeyPolicy); + collectionDefinition.setUniqueKeyPolicy(uniqueKeyPolicy); IndexingPolicy indexingPolicy = new IndexingPolicy(); - indexingPolicy.indexingMode(IndexingMode.CONSISTENT); + indexingPolicy.setIndexingMode(IndexingMode.CONSISTENT); ExcludedPath excludedPath = new ExcludedPath(); - excludedPath.path("/*"); - indexingPolicy.excludedPaths(Collections.singletonList(excludedPath)); + excludedPath.setPath("/*"); + indexingPolicy.setExcludedPaths(Collections.singletonList(excludedPath)); IncludedPath includedPath1 = new IncludedPath(); - includedPath1.path("/name/?"); - includedPath1.indexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); + includedPath1.setPath("/name/?"); + includedPath1.setIndexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); IncludedPath includedPath2 = new IncludedPath(); - includedPath2.path("/description/?"); - includedPath2.indexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); + includedPath2.setPath("/description/?"); + includedPath2.setIndexes(Collections.singletonList(new HashIndex(DataType.STRING, 7))); indexingPolicy.setIncludedPaths(ImmutableList.of(includedPath1, includedPath2)); - collectionDefinition.indexingPolicy(indexingPolicy); + collectionDefinition.setIndexingPolicy(indexingPolicy); - CosmosContainer createdCollection = database.createContainer(collectionDefinition).block().container(); + CosmosAsyncContainer createdCollection = database.createContainer(collectionDefinition).block().getContainer(); - CosmosContainerProperties collection = createdCollection.read().block().properties(); + CosmosContainerProperties collection = createdCollection.read().block().getProperties(); - assertThat(collection.uniqueKeyPolicy()).isNotNull(); - assertThat(collection.uniqueKeyPolicy().uniqueKeys()).isNotNull(); - assertThat(collection.uniqueKeyPolicy().uniqueKeys()) - .hasSameSizeAs(collectionDefinition.uniqueKeyPolicy().uniqueKeys()); - assertThat(collection.uniqueKeyPolicy().uniqueKeys() - .stream().map(ui -> ui.paths()).collect(Collectors.toList())) + assertThat(collection.getUniqueKeyPolicy()).isNotNull(); + assertThat(collection.getUniqueKeyPolicy().uniqueKeys()).isNotNull(); + assertThat(collection.getUniqueKeyPolicy().uniqueKeys()) + .hasSameSizeAs(collectionDefinition.getUniqueKeyPolicy().uniqueKeys()); + assertThat(collection.getUniqueKeyPolicy().uniqueKeys() + .stream().map(ui -> ui.getPaths()).collect(Collectors.toList())) .containsExactlyElementsOf( ImmutableList.of(ImmutableList.of("/name", "/description"))); } @@ -210,11 +191,11 @@ private CosmosClientException getDocumentClientException(RuntimeException e) { @BeforeClass(groups = { "long" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { // set up the client - client = CosmosClient.builder() - .endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .connectionPolicy(ConnectionPolicy.defaultPolicy()) - .consistencyLevel(ConsistencyLevel.SESSION).build(); + client = CosmosAsyncClient.builder() + .setEndpoint(TestConfigurations.HOST) + .setKey(TestConfigurations.MASTER_KEY) + .setConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) + .setConsistencyLevel(ConsistencyLevel.SESSION).buildAsyncClient(); database = createDatabase(client, databaseId); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java similarity index 56% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java index b521bbed23de..94e34b30874c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserCrudTest.java @@ -3,14 +3,8 @@ package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosUser; -import com.azure.data.cosmos.CosmosUserResponse; -import com.azure.data.cosmos.CosmosUserProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import com.azure.data.cosmos.internal.FailureValidator; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -24,9 +18,9 @@ public class UserCrudTest extends TestSuiteBase { public final String databaseId = CosmosDatabaseForTest.generateId(); - private CosmosDatabase createdDatabase; + private CosmosAsyncDatabase createdDatabase; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuilders") public UserCrudTest(CosmosClientBuilder clientBuilder) { @@ -37,13 +31,13 @@ public UserCrudTest(CosmosClientBuilder clientBuilder) { public void createUser() throws Exception { //create user CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); - Mono createObservable = createdDatabase.createUser(user); + Mono createObservable = createdDatabase.createUser(user); // validate user creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(user.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(user.getId()) .notNullEtag() .build(); validateSuccess(createObservable, validator); @@ -54,16 +48,16 @@ public void readUser() throws Exception { //create user CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); - CosmosUser readBackUser = createdDatabase.createUser(user).block().user(); + CosmosAsyncUser readBackUser = createdDatabase.createUser(user).block().getUser(); // read user - Mono readObservable = readBackUser.read(); + Mono readObservable = readBackUser.read(); //validate user read - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(readBackUser.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(readBackUser.getId()) .notNullEtag() .build(); @@ -74,21 +68,21 @@ public void readUser() throws Exception { public void deleteUser() throws Exception { //create user CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); - CosmosUser readBackUser = createdDatabase.createUser(user).block().user(); + CosmosAsyncUser readBackUser = createdDatabase.createUser(user).block().getUser(); // delete user - Mono deleteObservable = readBackUser.delete(); + Mono deleteObservable = readBackUser.delete(); // validate user delete - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource() .build(); validateSuccess(deleteObservable, validator); // attempt to read the user which was deleted - Mono readObservable = readBackUser.read(); + Mono readObservable = readBackUser.read(); FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); validateFailure(readObservable, notFoundValidator); } @@ -98,13 +92,13 @@ public void upsertUser() throws Exception { //create user CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); - Mono upsertObservable = createdDatabase.upsertUser(user); + Mono upsertObservable = createdDatabase.upsertUser(user); //validate user upsert - CosmosResponseValidator validatorForUpsert = new CosmosResponseValidator.Builder() - .withId(user.id()) + CosmosResponseValidator validatorForUpsert = new CosmosResponseValidator.Builder() + .withId(user.getId()) .notNullEtag() .build(); @@ -116,30 +110,30 @@ public void replaceUser() throws Exception { //create user CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); + user.setId(UUID.randomUUID().toString()); - CosmosUserProperties readBackUser = createdDatabase.createUser(user).block().properties(); + CosmosUserProperties readBackUser = createdDatabase.createUser(user).block().getProperties(); - // read user to validate creation - Mono readObservable = createdDatabase.getUser(user.id()).read(); + // read getUser to validate creation + Mono readObservable = createdDatabase.getUser(user.getId()).read(); //validate user read - CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() - .withId(readBackUser.id()) + CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() + .withId(readBackUser.getId()) .notNullEtag() .build(); validateSuccess(readObservable, validatorForRead); - //update user - String oldId = readBackUser.id(); - readBackUser.id(UUID.randomUUID().toString()); + //update getUser + String oldId = readBackUser.getId(); + readBackUser.setId(UUID.randomUUID().toString()); - Mono updateObservable = createdDatabase.getUser(oldId).replace(readBackUser); + Mono updateObservable = createdDatabase.getUser(oldId).replace(readBackUser); // validate user replace - CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() - .withId(readBackUser.id()) + CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() + .withId(readBackUser.getId()) .notNullEtag() .build(); @@ -148,7 +142,7 @@ public void replaceUser() throws Exception { @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, databaseId); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java similarity index 55% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java index db717e4f3878..3159d8ee6b4f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionCrudTest.java @@ -2,14 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosUserDefinedFunction; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; -import com.azure.data.cosmos.CosmosUserDefinedFunctionResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Factory; @@ -20,8 +14,8 @@ public class UserDefinedFunctionCrudTest extends TestSuiteBase { - private CosmosContainer createdCollection; - private CosmosClient client; + private CosmosAsyncContainer createdCollection; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public UserDefinedFunctionCrudTest(CosmosClientBuilder clientBuilder) { @@ -32,14 +26,14 @@ public UserDefinedFunctionCrudTest(CosmosClientBuilder clientBuilder) { public void createUserDefinedFunction() throws Exception { // create udf CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); - Mono createObservable = createdCollection.getScripts().createUserDefinedFunction(udf); + Mono createObservable = createdCollection.getScripts().createUserDefinedFunction(udf); // validate udf creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(udf.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(udf.getId()) .withUserDefinedFunctionBody("function() {var x = 10;}") .notNullEtag() .build(); @@ -50,17 +44,17 @@ public void createUserDefinedFunction() throws Exception { public void readUserDefinedFunction() throws Exception { // create a udf CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); - CosmosUserDefinedFunction readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().userDefinedFunction(); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); + CosmosAsyncUserDefinedFunction readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().getUserDefinedFunction(); // read udf waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = readBackUdf.read(); + Mono readObservable = readBackUdf.read(); //validate udf read - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(udf.id()) + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(udf.getId()) .withUserDefinedFunctionBody("function() {var x = 10;}") .notNullEtag() .build(); @@ -71,15 +65,15 @@ public void readUserDefinedFunction() throws Exception { public void deleteUserDefinedFunction() throws Exception { // create a udf CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); - CosmosUserDefinedFunction readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().userDefinedFunction(); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); + CosmosAsyncUserDefinedFunction readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().getUserDefinedFunction(); // delete udf - Mono deleteObservable = readBackUdf.delete(); + Mono deleteObservable = readBackUdf.delete(); // validate udf delete - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() .nullResource() .build(); validateSuccess(deleteObservable, validator); @@ -87,7 +81,7 @@ public void deleteUserDefinedFunction() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java similarity index 84% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java index 87b902834cfc..ab2c0f46675c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionQueryTest.java @@ -2,14 +2,9 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncContainer; import com.azure.data.cosmos.internal.Database; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; import com.azure.data.cosmos.internal.FailureValidator; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; @@ -33,13 +28,13 @@ public class UserDefinedFunctionQueryTest extends TestSuiteBase { private Database createdDatabase; - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; private List createdUDF = new ArrayList<>(); - private CosmosClient client; + private CosmosAsyncClient client; public String getCollectionLink() { - return TestUtils.getCollectionNameLink(createdDatabase.id(), createdCollection.id()); + return TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()); } @Factory(dataProvider = "clientBuildersWithDirect") @@ -50,21 +45,21 @@ public UserDefinedFunctionQueryTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryWithFilter() throws Exception { - String filterId = createdUDF.get(0).id(); + String filterId = createdUDF.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterId); FeedOptions options = new FeedOptions(); options.maxItemCount(5); Flux> queryObservable = createdCollection.getScripts().queryUserDefinedFunctions(query, options); - List expectedDocs = createdUDF.stream().filter(sp -> filterId.equals(sp.id()) ).collect(Collectors.toList()); + List expectedDocs = createdUDF.stream().filter(sp -> filterId.equals(sp.getId()) ).collect(Collectors.toList()); assertThat(expectedDocs).isNotEmpty(); int expectedPageSize = (expectedDocs.size() + options.maxItemCount() - 1) / options.maxItemCount(); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedDocs.size()) - .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedDocs.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -78,7 +73,7 @@ public void query_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryUserDefinedFunctions(query, options); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -96,7 +91,7 @@ public void queryAll() throws Exception { String query = "SELECT * from root"; FeedOptions options = new FeedOptions(); options.maxItemCount(3); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryUserDefinedFunctions(query, options); List expectedDocs = createdUDF; @@ -107,7 +102,7 @@ public void queryAll() throws Exception { .Builder() .exactlyContainsInAnyOrder(expectedDocs .stream() - .map(d -> d.resourceId()) + .map(d -> d.getResourceId()) .collect(Collectors.toList())) .numberOfPages(expectedPageSize) .allPagesSatisfy(new FeedResponseValidator.Builder() @@ -120,7 +115,7 @@ public void queryAll() throws Exception { public void invalidQuerySytax() throws Exception { String query = "I am an invalid query"; FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> queryObservable = createdCollection.getScripts().queryUserDefinedFunctions(query, options); FailureValidator validator = new FailureValidator.Builder() @@ -131,14 +126,14 @@ public void invalidQuerySytax() throws Exception { validateQueryFailure(queryObservable, validator); } - public CosmosUserDefinedFunctionProperties createUserDefinedFunction(CosmosContainer cosmosContainer) { + public CosmosUserDefinedFunctionProperties createUserDefinedFunction(CosmosAsyncContainer cosmosContainer) { CosmosUserDefinedFunctionProperties storedProcedure = getUserDefinedFunctionDef(); - return cosmosContainer.getScripts().createUserDefinedFunction(storedProcedure).block().properties(); + return cosmosContainer.getScripts().createUserDefinedFunction(storedProcedure).block().getProperties(); } @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); @@ -156,8 +151,8 @@ public void afterClass() { private static CosmosUserDefinedFunctionProperties getUserDefinedFunctionDef() { CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); return udf; } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java similarity index 60% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java index 6e10c3fc91c2..886cb6116c68 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java @@ -2,12 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosUserDefinedFunctionProperties; -import com.azure.data.cosmos.CosmosUserDefinedFunctionResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.testng.annotations.Factory; import org.testng.annotations.Test; import org.testng.annotations.Ignore; @@ -21,9 +17,9 @@ @Ignore public class UserDefinedFunctionUpsertReplaceTest extends TestSuiteBase { - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "clientBuildersWithDirect") public UserDefinedFunctionUpsertReplaceTest(CosmosClientBuilder clientBuilder) { @@ -35,33 +31,33 @@ public void replaceUserDefinedFunction() throws Exception { // create a udf CosmosUserDefinedFunctionProperties udf = new CosmosUserDefinedFunctionProperties(); - udf.id(UUID.randomUUID().toString()); - udf.body("function() {var x = 10;}"); + udf.setId(UUID.randomUUID().toString()); + udf.setBody("function() {var x = 10;}"); CosmosUserDefinedFunctionProperties readBackUdf = null; - readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().properties(); + readBackUdf = createdCollection.getScripts().createUserDefinedFunction(udf).block().getProperties(); // read udf to validate creation waitIfNeededForReplicasToCatchUp(clientBuilder()); - Mono readObservable = createdCollection.getScripts().getUserDefinedFunction(readBackUdf.id()).read(); + Mono readObservable = createdCollection.getScripts().getUserDefinedFunction(readBackUdf.getId()).read(); // validate udf creation - CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() - .withId(readBackUdf.id()) + CosmosResponseValidator validatorForRead = new CosmosResponseValidator.Builder() + .withId(readBackUdf.getId()) .withUserDefinedFunctionBody("function() {var x = 10;}") .notNullEtag() .build(); validateSuccess(readObservable, validatorForRead); //update udf - readBackUdf.body("function() {var x = 11;}"); + readBackUdf.setBody("function() {var x = 11;}"); - Mono replaceObservable = createdCollection.getScripts().getUserDefinedFunction(readBackUdf.id()).replace(readBackUdf); + Mono replaceObservable = createdCollection.getScripts().getUserDefinedFunction(readBackUdf.getId()).replace(readBackUdf); //validate udf replace - CosmosResponseValidator validatorForReplace = new CosmosResponseValidator.Builder() - .withId(readBackUdf.id()) + CosmosResponseValidator validatorForReplace = new CosmosResponseValidator.Builder() + .withId(readBackUdf.getId()) .withUserDefinedFunctionBody("function() {var x = 11;}") .notNullEtag() .build(); @@ -70,7 +66,7 @@ public void replaceUserDefinedFunction() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java similarity index 86% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java index 163d1a11c3be..78a3ec7bcb85 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/UserQueryTest.java @@ -2,13 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncDatabase; import com.azure.data.cosmos.internal.FeedResponseListValidator; import com.azure.data.cosmos.internal.FeedResponseValidator; import com.azure.data.cosmos.internal.TestUtils; @@ -33,8 +28,8 @@ public class UserQueryTest extends TestSuiteBase { private List createdUsers = new ArrayList<>(); - private CosmosClient client; - private CosmosDatabase createdDatabase; + private CosmosAsyncClient client; + private CosmosAsyncDatabase createdDatabase; @Factory(dataProvider = "clientBuilders") public UserQueryTest(CosmosClientBuilder clientBuilder) { @@ -46,7 +41,7 @@ public UserQueryTest(CosmosClientBuilder clientBuilder) { @Test(groups = { "simple" }, timeOut = TIMEOUT) public void queryUsersWithFilter() throws Exception { - String filterUserId = createdUsers.get(0).id(); + String filterUserId = createdUsers.get(0).getId(); String query = String.format("SELECT * from c where c.id = '%s'", filterUserId); FeedOptions options = new FeedOptions(); @@ -54,7 +49,7 @@ public void queryUsersWithFilter() throws Exception { Flux> queryObservable = createdDatabase.queryUsers(query, options); List expectedUsers = createdUsers.stream() - .filter(c -> StringUtils.equals(filterUserId, c.id()) ).collect(Collectors.toList()); + .filter(c -> StringUtils.equals(filterUserId, c.getId()) ).collect(Collectors.toList()); assertThat(expectedUsers).isNotEmpty(); @@ -62,7 +57,7 @@ public void queryUsersWithFilter() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedUsers.size()) - .exactlyContainsInAnyOrder(expectedUsers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedUsers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -89,7 +84,7 @@ public void queryAllUsers() throws Exception { FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedUsers.size()) - .exactlyContainsInAnyOrder(expectedUsers.stream().map(d -> d.resourceId()).collect(Collectors.toList())) + .exactlyContainsInAnyOrder(expectedUsers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) @@ -116,14 +111,14 @@ public void queryUsers_NoResults() throws Exception { @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) public void beforeClass() throws Exception { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdDatabase = createDatabase(client, databaseId); for(int i = 0; i < 5; i++) { CosmosUserProperties user = new CosmosUserProperties(); - user.id(UUID.randomUUID().toString()); - createdUsers.add(createUser(client, databaseId, user).read().block().properties()); + user.setId(UUID.randomUUID().toString()); + createdUsers.add(createUser(client, databaseId, user).read().block().getProperties()); } waitIfNeededForReplicasToCatchUp(clientBuilder()); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java similarity index 79% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java index 622143774a10..9ec1bb92a013 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/VeryLargeDocumentQueryTest.java @@ -2,15 +2,8 @@ // Licensed under the MIT License. package com.azure.data.cosmos.rx; -import com.azure.data.cosmos.BridgeInternal; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; +import com.azure.data.cosmos.*; +import com.azure.data.cosmos.CosmosAsyncClient; import org.apache.commons.lang3.StringUtils; import org.testng.annotations.Factory; import org.testng.annotations.Ignore; @@ -34,9 +27,9 @@ public class VeryLargeDocumentQueryTest extends TestSuiteBase { private final static int TIMEOUT = 60000; private final static int SETUP_TIMEOUT = 60000; - private CosmosContainer createdCollection; + private CosmosAsyncContainer createdCollection; - private CosmosClient client; + private CosmosAsyncClient client; @Factory(dataProvider = "simpleClientBuildersWithDirect") public VeryLargeDocumentQueryTest(CosmosClientBuilder clientBuilder) { @@ -53,7 +46,7 @@ public void queryLargeDocuments() { } FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); + options.setEnableCrossPartitionQuery(true); Flux> feedResponseFlux = createdCollection.queryItems("SELECT * FROM r", options); @@ -61,7 +54,7 @@ public void queryLargeDocuments() { AtomicInteger totalCount = new AtomicInteger(); StepVerifier.create(feedResponseFlux.subscribeOn(Schedulers.single())) .thenConsumeWhile(feedResponse -> { - int size = feedResponse.results().size(); + int size = feedResponse.getResults().size(); totalCount.addAndGet(size); return true; }) @@ -76,17 +69,17 @@ private void createLargeDocument() { int size = (int) (ONE_MB * 1.999); BridgeInternal.setProperty(docDefinition, "largeString", StringUtils.repeat("x", size)); - Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); + Mono createObservable = createdCollection.createItem(docDefinition, new CosmosItemRequestOptions()); StepVerifier.create(createObservable.subscribeOn(Schedulers.single())) - .expectNextMatches(cosmosItemResponse -> cosmosItemResponse.properties().id().equals(docDefinition.id())) + .expectNextMatches(cosmosItemResponse -> cosmosItemResponse.getProperties().getId().equals(docDefinition.getId())) .expectComplete() .verify(Duration.ofMillis(subscriberValidationTimeout)); } @BeforeClass(groups = { "emulator" }, timeOut = 2 * SETUP_TIMEOUT) public void beforeClass() { - client = clientBuilder().build(); + client = clientBuilder().buildAsyncClient(); createdCollection = getSharedMultiPartitionCosmosContainer(client); truncateCollection(createdCollection); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyChannelInitializer.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyChannelInitializer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyChannelInitializer.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyChannelInitializer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHandler.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHandler.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHandler.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHandler.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHeader.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHeader.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHeader.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyClientHeader.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyRemoteHandler.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyRemoteHandler.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyRemoteHandler.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyRemoteHandler.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyServer.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyServer.java similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyServer.java rename to sdk/cosmos/azure-cosmos/src/test/java/com/azure/data/cosmos/rx/proxy/HttpProxyServer.java diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/Microsoft.jpg b/sdk/cosmos/azure-cosmos/src/test/resources/Microsoft.jpg similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/Microsoft.jpg rename to sdk/cosmos/azure-cosmos/src/test/resources/Microsoft.jpg diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/cosmosdb-1.png b/sdk/cosmos/azure-cosmos/src/test/resources/cosmosdb-1.png similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/cosmosdb-1.png rename to sdk/cosmos/azure-cosmos/src/test/resources/cosmosdb-1.png diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/databaseAccount.json b/sdk/cosmos/azure-cosmos/src/test/resources/databaseAccount.json similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/databaseAccount.json rename to sdk/cosmos/azure-cosmos/src/test/resources/databaseAccount.json diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/emulator-testng.xml b/sdk/cosmos/azure-cosmos/src/test/resources/emulator-testng.xml similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/emulator-testng.xml rename to sdk/cosmos/azure-cosmos/src/test/resources/emulator-testng.xml diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/fast-testng.xml b/sdk/cosmos/azure-cosmos/src/test/resources/fast-testng.xml similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/fast-testng.xml rename to sdk/cosmos/azure-cosmos/src/test/resources/fast-testng.xml diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/log4j.properties b/sdk/cosmos/azure-cosmos/src/test/resources/log4j.properties similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/log4j.properties rename to sdk/cosmos/azure-cosmos/src/test/resources/log4j.properties diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/long-testng.xml b/sdk/cosmos/azure-cosmos/src/test/resources/long-testng.xml similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/long-testng.xml rename to sdk/cosmos/azure-cosmos/src/test/resources/long-testng.xml diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/resources/sampleConflict.json b/sdk/cosmos/azure-cosmos/src/test/resources/sampleConflict.json similarity index 100% rename from sdk/cosmos/microsoft-azure-cosmos/src/test/resources/sampleConflict.json rename to sdk/cosmos/azure-cosmos/src/test/resources/sampleConflict.json diff --git a/sdk/cosmos/ci.yml b/sdk/cosmos/ci.yml index 633280483f85..697afb5dd4fb 100644 --- a/sdk/cosmos/ci.yml +++ b/sdk/cosmos/ci.yml @@ -40,4 +40,4 @@ stages: Artifacts: - name: azure-cosmos safeName: azurecosmos - stagingProfileId: 534d15ee3800f4 \ No newline at end of file + stagingProfileId: 534d15ee3800f4 diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictResponse.java deleted file mode 100644 index d4d70e71476b..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosConflictResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.Conflict; -import com.azure.data.cosmos.internal.ResourceResponse; - -public class CosmosConflictResponse extends CosmosResponse { - private CosmosContainer container; - private CosmosConflict conflictClient; - - CosmosConflictResponse(ResourceResponse response, CosmosContainer container) { - super(response); - this.container = container; - if(response.getResource() == null){ - super.resourceSettings(null); - }else{ - super.resourceSettings(new CosmosConflictProperties(response.getResource().toJson())); - conflictClient = new CosmosConflict(response.getResource().id(), container); - } - } - - CosmosContainer getContainer() { - return container; - } - - /** - * Get conflict client - * @return the cosmos conflict client - */ - public CosmosConflict conflict() { - return conflictClient; - } - - /** - * Get conflict properties object representing the resource on the server - * @return the conflict properties - */ - public CosmosConflictProperties properties() { - return resourceSettings(); - } -} \ No newline at end of file diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java deleted file mode 100644 index 7db9c67af184..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosDatabaseResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.Database; -import com.azure.data.cosmos.internal.ResourceResponse; - -public class CosmosDatabaseResponse extends CosmosResponse{ - private CosmosDatabase database; - - CosmosDatabaseResponse(ResourceResponse response, CosmosClient client) { - super(response); - if(response.getResource() == null){ - super.resourceSettings(null); - }else{ - super.resourceSettings(new CosmosDatabaseProperties(response)); - database = new CosmosDatabase(resourceSettings().id(), client); - } - } - - /** - * Gets the CosmosDatabase object - * - * @return {@link CosmosDatabase} - */ - public CosmosDatabase database() { - return database; - } - - /** - * Gets the cosmos database properties - * - * @return the cosmos database properties - */ - public CosmosDatabaseProperties properties() { - return resourceSettings(); - } - - /** - * Gets the Max Quota. - * - * @return the database quota. - */ - public long databaseQuota(){ - return resourceResponseWrapper.getDatabaseQuota(); - } - - /** - * Gets the current Usage. - * - * @return the current database usage. - */ - public long databaseUsage(){ - return resourceResponseWrapper.getDatabaseUsage(); - } - -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java deleted file mode 100644 index 4e9a2f87c79f..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosItemResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.Document; -import com.azure.data.cosmos.internal.ResourceResponse; - -public class CosmosItemResponse extends CosmosResponse{ - private CosmosItem itemClient; - - CosmosItemResponse(ResourceResponse response, PartitionKey partitionKey, CosmosContainer container) { - super(response); - if(response.getResource() == null){ - super.resourceSettings(null); - }else{ - super.resourceSettings(new CosmosItemProperties(response.getResource().toJson())); - itemClient = new CosmosItem(response.getResource().id(),partitionKey, container); - } - } - - /** - * Gets the itemSettings - * @return the itemSettings - */ - public CosmosItemProperties properties() { - return resourceSettings(); - } - - /** - * Gets the CosmosItem - * @return the cosmos item - */ - public CosmosItem item() { - return itemClient; - } -} \ No newline at end of file diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionResponse.java deleted file mode 100644 index 20512387bfd7..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosPermissionResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.Permission; -import com.azure.data.cosmos.internal.ResourceResponse; - -public class CosmosPermissionResponse extends CosmosResponse { - CosmosPermission permissionClient; - - CosmosPermissionResponse(ResourceResponse response, CosmosUser cosmosUser) { - super(response); - if(response.getResource() == null){ - super.resourceSettings(null); - }else{ - super.resourceSettings(new CosmosPermissionProperties(response.getResource().toJson())); - permissionClient = new CosmosPermission(response.getResource().id(), cosmosUser); - } - } - - /** - * Get the permission properties - * - * @return the permission properties - */ - public CosmosPermissionProperties properties() { - return super.resourceSettings(); - } - - /** - * Gets the CosmosPermission - * - * @return the cosmos permission - */ - public CosmosPermission permission() { - return permissionClient; - } -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java deleted file mode 100644 index b0bbb6e1f005..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserDefinedFunctionResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.ResourceResponse; -import com.azure.data.cosmos.internal.UserDefinedFunction; - -public class CosmosUserDefinedFunctionResponse extends CosmosResponse { - - private CosmosUserDefinedFunctionProperties cosmosUserDefinedFunctionProperties; - private CosmosUserDefinedFunction cosmosUserDefinedFunction; - - CosmosUserDefinedFunctionResponse(ResourceResponse response, CosmosContainer container) { - super(response); - if(response.getResource() != null) { - super.resourceSettings(new CosmosUserDefinedFunctionProperties(response)); - cosmosUserDefinedFunctionProperties = new CosmosUserDefinedFunctionProperties(response); - cosmosUserDefinedFunction = new CosmosUserDefinedFunction(cosmosUserDefinedFunctionProperties.id(), container); - } - } - - /** - * Gets the cosmos user defined function properties - * @return the cosmos user defined function properties - */ - public CosmosUserDefinedFunctionProperties properties() { - return cosmosUserDefinedFunctionProperties; - } - - /** - * Gets the cosmos user defined function object - * @return the cosmos user defined function object - */ - public CosmosUserDefinedFunction userDefinedFunction() { - return cosmosUserDefinedFunction; - } -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java deleted file mode 100644 index e67df7ec5494..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosUserResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos; - -import com.azure.data.cosmos.internal.ResourceResponse; -import com.azure.data.cosmos.internal.User; - -public class CosmosUserResponse extends CosmosResponse { - private CosmosUser user; - - CosmosUserResponse(ResourceResponse response, CosmosDatabase database) { - super(response); - if(response.getResource() == null){ - super.resourceSettings(null); - }else{ - super.resourceSettings(new CosmosUserProperties(response)); - this.user = new CosmosUser(resourceSettings().id(), database); - } - } - - /** - * Get cosmos user - * - * @return {@link CosmosUser} - */ - public CosmosUser user() { - return user; - } - - /** - * Gets the cosmos user properties - * - * @return {@link CosmosUserProperties} - */ - public CosmosUserProperties properties(){ - return resourceSettings(); - } -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainerResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainerResponse.java deleted file mode 100644 index 9e9a4d139af1..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncContainerResponse.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosContainer; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.internal.DocumentCollection; -import com.azure.data.cosmos.internal.ResourceResponse; - -/** - * The synchronous cosmos container response - */ -public class CosmosSyncContainerResponse extends CosmosSyncResponse { - - private final CosmosContainerResponse responseWrapper; - private final CosmosSyncContainer container; - - CosmosSyncContainerResponse(CosmosContainerResponse response, CosmosSyncDatabase database, CosmosSyncClient client) { - super(response); - this.responseWrapper = response; - if (responseWrapper.container() != null) { - this.container = new CosmosSyncContainer(responseWrapper.container().id(), database, responseWrapper.container()); - } else { - // Delete will have null container client in response - this.container = null; - } - } - - /** - * Gets the progress of an index transformation, if one is underway. - * - * @return the progress of an index transformation. - */ - public long indexTransformationProgress() { - return responseWrapper.indexTransformationProgress(); - } - - /** - * Gets the container properties - * - * @return the cosmos container properties - */ - public CosmosContainerProperties properties() { - return responseWrapper.properties(); - } - - /** - * Gets the Container object - * - * @return the Cosmos container object - */ - public CosmosSyncContainer container() { - return container; - } -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseResponse.java deleted file mode 100644 index 0638999d6074..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncDatabaseResponse.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosDatabaseProperties; -import com.azure.data.cosmos.CosmosDatabaseResponse; - -public class CosmosSyncDatabaseResponse extends CosmosSyncResponse { - private final CosmosDatabaseResponse responseWrapper; - private final CosmosSyncDatabase database; - - CosmosSyncDatabaseResponse(CosmosDatabaseResponse response, CosmosSyncClient client) { - super(response); - this.responseWrapper = response; - if (responseWrapper.database() != null) { - this.database = new CosmosSyncDatabase(responseWrapper.database().id(), client, responseWrapper.database()); - } else { - this.database = null; - } - } - - /** - * Gets the CosmosDatabase object - * - * @return {@link CosmosSyncDatabase} - */ - public CosmosSyncDatabase database() { - return database; - } - - /** - * Gets the cosmos database properties - * - * @return the cosmos database properties - */ - public CosmosDatabaseProperties properties() { - return responseWrapper.properties(); - } - - /** - * Gets the Max Quota. - * - * @return the database quota. - */ - public long databaseQuota() { - return responseWrapper.databaseQuota(); - } - - /** - * Gets the current Usage. - * - * @return the current database usage. - */ - public long databaseUsage() { - return responseWrapper.databaseUsage(); - } - -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItemResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItemResponse.java deleted file mode 100644 index 3926fc5fd948..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncItemResponse.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.PartitionKey; - -public class CosmosSyncItemResponse extends CosmosSyncResponse { - private final CosmosItemResponse responseWrapper; - private final CosmosSyncItem item; - - - CosmosSyncItemResponse(CosmosItemResponse response, PartitionKey partitionKey, CosmosSyncContainer container) { - super(response); - this.responseWrapper = response; - if (responseWrapper.item() != null) { - this.item = new CosmosSyncItem(responseWrapper.item().id(), partitionKey, container, responseWrapper.item()); - } else { - // Delete will have null container client in response - this.item = null; - } - } - - /** - * Gets the itemSettings - * - * @return the itemSettings - */ - public CosmosItemProperties properties() { - return responseWrapper.properties(); - } - - /** - * Gets the CosmosItem - * - * @return the cosmos item - */ - public CosmosSyncItem item() { - return item; - } -} \ No newline at end of file diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncResponse.java deleted file mode 100644 index eb9ca39aec93..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseDiagnostics; - -import java.time.Duration; -import java.util.Map; - -public class CosmosSyncResponse { - private final CosmosResponse resourceResponseWrapper; - - CosmosSyncResponse(CosmosResponse resourceResponse) { - this.resourceResponseWrapper = resourceResponse; - } - - /** - * Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master - * resources). - * - * @return the max resource quota. - */ - public String maxResourceQuota() { - return resourceResponseWrapper.maxResourceQuota(); - } - - /** - * Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources) - * - * @return the current resource quota usage. - */ - public String currentResourceQuotaUsage() { - return resourceResponseWrapper.currentResourceQuotaUsage(); - } - - /** - * Gets the Activity ID for the request. - * - * @return the activity id. - */ - public String activityId() { - return resourceResponseWrapper.activityId(); - } - - /** - * Gets the number of index paths (terms) generated by the operation. - * - * @return the request charge. - */ - public double requestCharge() { - return resourceResponseWrapper.requestCharge(); - } - - /** - * Gets the HTTP status code associated with the response. - * - * @return the status code. - */ - public int statusCode() { - return resourceResponseWrapper.statusCode(); - } - - /** - * Gets the token used for managing client's consistency requirements. - * - * @return the session token. - */ - public String sessionToken() { - return resourceResponseWrapper.sessionToken(); - } - - /** - * Gets the headers associated with the response. - * - * @return the response headers. - */ - public Map responseHeaders() { - return resourceResponseWrapper.responseHeaders(); - } - - /** - * Gets the diagnostics information for the current request to Azure Cosmos DB service. - * - * @return diagnostics information for the current request to Azure Cosmos DB service. - */ - public CosmosResponseDiagnostics cosmosResponseDiagnosticsString() { - return resourceResponseWrapper.cosmosResponseDiagnosticsString(); - } - - /** - * Gets the end-to-end request latency for the current request to Azure Cosmos DB service. - * - * @return end-to-end request latency for the current request to Azure Cosmos DB service. - */ - public Duration requestLatency() { - return resourceResponseWrapper.requestLatency(); - } -} diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedureResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedureResponse.java deleted file mode 100644 index ecfd3dd0f093..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncStoredProcedureResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.data.cosmos.sync; - -import com.azure.data.cosmos.CosmosStoredProcedureProperties; -import com.azure.data.cosmos.CosmosStoredProcedureResponse; - - -/** - * The type Cosmos sync stored procedure response. - */ -public class CosmosSyncStoredProcedureResponse extends CosmosSyncResponse { - private final CosmosSyncStoredProcedure cosmosSyncStoredProcedure; - private final CosmosStoredProcedureResponse asyncResponse; - - /** - * Instantiates a new Cosmos sync stored procedure response. - * - * @param resourceResponse the resource response - * @param storedProcedure the stored procedure - */ - CosmosSyncStoredProcedureResponse(CosmosStoredProcedureResponse resourceResponse, - CosmosSyncStoredProcedure storedProcedure) { - super(resourceResponse); - this.asyncResponse = resourceResponse; - this.cosmosSyncStoredProcedure = storedProcedure; - } - - /** - * Gets cosmos stored procedure properties. - * - * @return the cosmos stored procedure properties - */ - public CosmosStoredProcedureProperties properties() { - return asyncResponse.properties(); - } - - /** - * Gets cosmos sync stored procedure. - * - * @return the cosmos sync stored procedure - */ - public CosmosSyncStoredProcedure storedProcedure() { - return cosmosSyncStoredProcedure; - } - - @Override - public String activityId() { - return asyncResponse.activityId(); - } - - @Override - public String sessionToken() { - return asyncResponse.sessionToken(); - } - - @Override - public int statusCode() { - return asyncResponse.statusCode(); - } - - @Override - public double requestCharge() { - return asyncResponse.requestCharge(); - } - - /** - * Response as string string. - * - * @return the string - */ - public String responseAsString() { - return asyncResponse.responseAsString(); - } - - /** - * Script log string. - * - * @return the string - */ - public String scriptLog() { - return asyncResponse.scriptLog(); - } - - -} \ No newline at end of file diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/package-info.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/package-info.java deleted file mode 100644 index 3c6fba8deadd..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -/** - * This package provides synchronous interfaces for interacting with Azure Cosmos DB. - */ -package com.azure.data.cosmos.sync; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java deleted file mode 100644 index ae7e44ede996..000000000000 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/PermissionCrudTest.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.data.cosmos.rx; - -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientBuilder; -import com.azure.data.cosmos.CosmosDatabase; -import com.azure.data.cosmos.CosmosDatabaseForTest; -import com.azure.data.cosmos.CosmosPermission; -import com.azure.data.cosmos.CosmosPermissionResponse; -import com.azure.data.cosmos.CosmosPermissionProperties; -import com.azure.data.cosmos.CosmosResponseValidator; -import com.azure.data.cosmos.CosmosUser; -import com.azure.data.cosmos.CosmosUserProperties; -import com.azure.data.cosmos.PermissionMode; -import com.azure.data.cosmos.internal.FailureValidator; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Factory; -import org.testng.annotations.Test; -import reactor.core.publisher.Mono; - -import java.util.UUID; - -//TODO: change to use external TestSuiteBase -public class PermissionCrudTest extends TestSuiteBase { - - private CosmosDatabase createdDatabase; - private CosmosUser createdUser; - private final String databaseId = CosmosDatabaseForTest.generateId(); - - private CosmosClient client; - - @Factory(dataProvider = "clientBuilders") - public PermissionCrudTest(CosmosClientBuilder clientBuilder) { - super(clientBuilder); - } - - @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void createPermission() throws Exception { - - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); - //create permission - CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() - .id(UUID.randomUUID().toString()) - .permissionMode(PermissionMode.READ) - .resourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); - - Mono createObservable = createdUser.createPermission(permissionSettings, null); - - // validate permission creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(permissionSettings.id()) - .withPermissionMode(PermissionMode.READ) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(createObservable, validator); - } - - @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void readPermission() throws Exception { - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); - - // create permission - CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() - .id(UUID.randomUUID().toString()) - .permissionMode(PermissionMode.READ) - .resourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); - CosmosPermissionResponse readBackPermission = createdUser.createPermission(permissionSettings, null) - .block(); - - // read Permission - Mono readObservable = readBackPermission.permission().read(null); - - // validate permission read - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(permissionSettings.id()) - .withPermissionMode(PermissionMode.READ) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(readObservable, validator); - } - - @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void deletePermission() throws Exception { - - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); - - // create permission - CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() - .id(UUID.randomUUID().toString()) - .permissionMode(PermissionMode.READ) - .resourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); - CosmosPermissionResponse readBackPermission = createdUser.createPermission(permissionSettings, null) - .block(); - // delete - Mono deleteObservable = readBackPermission.permission() - .delete(null); - - // validate delete permission - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .nullResource() - .build(); - validateSuccess(deleteObservable, validator); - - waitIfNeededForReplicasToCatchUp(clientBuilder()); - - // attempt to read the permission which was deleted - Mono readObservable = readBackPermission.permission() - .read( null); - FailureValidator notFoundValidator = new FailureValidator.Builder().resourceNotFound().build(); - validateFailure(readObservable, notFoundValidator); - } - - @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void upsertPermission() throws Exception { - - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); - - // create permission - CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() - .id(UUID.randomUUID().toString()) - .permissionMode(PermissionMode.READ) - .resourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); - CosmosPermissionResponse readBackPermissionResponse = createdUser.createPermission(permissionSettings, null) - .block(); - CosmosPermissionProperties readBackPermission = readBackPermissionResponse.properties(); - // read Permission - Mono readObservable = readBackPermissionResponse.permission() - .read( null); - - // validate permission creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(readBackPermission.id()) - .withPermissionMode(PermissionMode.READ) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(readObservable, validator); - - //update permission - readBackPermission = readBackPermission.permissionMode(PermissionMode.ALL); - - Mono updateObservable = createdUser.upsertPermission(readBackPermission, null); - - // validate permission update - CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() - .withId(readBackPermission.id()) - .withPermissionMode(PermissionMode.ALL) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(updateObservable, validatorForUpdate); - } - - @Test(groups = { "simple" }, timeOut = TIMEOUT) - public void replacePermission() throws Exception { - - createdUser = safeCreateUser(client, createdDatabase.id(), getUserDefinition()); - - String id = UUID.randomUUID().toString(); - // create permission - CosmosPermissionProperties permissionSettings = new CosmosPermissionProperties() - .id(id) - .permissionMode(PermissionMode.READ) - .resourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc="); - CosmosPermissionResponse readBackPermissionResponse = createdUser.createPermission(permissionSettings, null) - .block(); - // read Permission - Mono readObservable = readBackPermissionResponse.permission() - .read(null); - - // validate permission creation - CosmosResponseValidator validator = new CosmosResponseValidator.Builder() - .withId(readBackPermissionResponse.permission().id()) - .withPermissionMode(PermissionMode.READ) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(readObservable, validator); - - //update permission - CosmosPermissionProperties readBackPermission = readBackPermissionResponse.properties(); - readBackPermission = readBackPermission.permissionMode(PermissionMode.ALL); - - CosmosPermission cosmosPermission = createdUser.getPermission(id); - Mono updateObservable = readBackPermissionResponse.permission() - .replace(readBackPermission, null); - - // validate permission replace - CosmosResponseValidator validatorForUpdate = new CosmosResponseValidator.Builder() - .withId(readBackPermission.id()) - .withPermissionMode(PermissionMode.ALL) - .withPermissionResourceLink("dbs/AQAAAA==/colls/AQAAAJ0fgTc=") - .notNullEtag() - .build(); - validateSuccess(updateObservable, validatorForUpdate); - } - - @BeforeClass(groups = { "simple" }, timeOut = SETUP_TIMEOUT) - public void beforeClass() { - client = clientBuilder().build(); - createdDatabase = createDatabase(client, databaseId); - } - - @AfterClass(groups = { "simple" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) - public void afterClass() { - safeClose(client); - } - - private static CosmosUserProperties getUserDefinition() { - return new CosmosUserProperties() - .id(UUID.randomUUID().toString()); - } - -} diff --git a/sdk/cosmos/pom.service.xml b/sdk/cosmos/pom.service.xml index ed71b263af04..28d36830a6da 100644 --- a/sdk/cosmos/pom.service.xml +++ b/sdk/cosmos/pom.service.xml @@ -9,9 +9,9 @@ pom 1.0.0 - microsoft-azure-cosmos - microsoft-azure-cosmos-benchmark - microsoft-azure-cosmos-examples + azure-cosmos + azure-cosmos-benchmark + azure-cosmos-examples - \ No newline at end of file + diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index 532301e16c4d..0c0676da9471 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.azure azure-data-sdk-parent 1.2.0 - ../../pom.data.xml + ../../pom.client.xml - com.microsoft.azure + com.azure azure-cosmos-parent - 3.3.0 + 4.0.0-preview.4 pom Microsoft Azure Cosmos DB SQL API @@ -54,7 +54,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.3.0 + 4.0.0-preview.4 @@ -391,9 +391,9 @@ Licensed under the MIT License. - microsoft-azure-cosmos - microsoft-azure-cosmos-benchmark - microsoft-azure-cosmos-examples + azure-cosmos + azure-cosmos-benchmark + azure-cosmos-examples diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md index 0e9cb874a6c2..0f845bbdb395 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md @@ -100,7 +100,7 @@ sequence number and the timestamp of when it was enqueued. ### Create an instance of Storage container with SAS token ```java SASTokenCredential sasTokenCredential = SASTokenCredential.fromSASTokenString(""); -ContainerAsyncClient containerAsyncClient = new ContainerClientBuilder() +BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder() .connectionString("") .containerName("") .credential(sasTokenCredential) @@ -128,7 +128,7 @@ class Program { .connectionString("<< CONNECTION STRING FOR THE EVENT HUB INSTANCE >>") .consumerGroupName("<< CONSUMER GROUP NAME>>") .partitionProcessorFactory(SimplePartitionProcessor::new) - .partitionManager(new BlobPartitionManager(containerAsyncClient)) + .partitionManager(new BlobPartitionManager(blobContainerAsyncClient)) .buildEventProcessor(); // This will start the processor. It will start processing events from all partitions. diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java index 13506b3d79ba..8d227af20863 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManager.java @@ -3,6 +3,7 @@ package com.azure.messaging.eventhubs.checkpointstore.blob; +import com.azure.core.http.rest.Response; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.eventhubs.EventProcessor; @@ -10,19 +11,19 @@ import com.azure.messaging.eventhubs.models.Checkpoint; import com.azure.messaging.eventhubs.models.PartitionOwnership; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.ContainerAsyncClient; +import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobListDetails; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import reactor.core.Exceptions; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.nio.ByteBuffer; +import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -42,22 +43,23 @@ public class BlobPartitionManager implements PartitionManager { private static final String OFFSET = "Offset"; private static final String OWNER_ID = "OwnerId"; private static final String ETAG = "eTag"; + private static final String CLAIM_ERROR = "Couldn't claim ownership of partition {}, error {}"; private static final String BLOB_PATH_SEPARATOR = "/"; - private static final ByteBuffer UPLOAD_DATA = ByteBuffer.wrap("" .getBytes(UTF_8)); + private static final ByteBuffer UPLOAD_DATA = ByteBuffer.wrap("".getBytes(UTF_8)); - private final ContainerAsyncClient containerAsyncClient; + private final BlobContainerAsyncClient blobContainerAsyncClient; private final ClientLogger logger = new ClientLogger(BlobPartitionManager.class); private final Map blobClients = new ConcurrentHashMap<>(); /** * Creates an instance of BlobPartitionManager. * - * @param containerAsyncClient The {@link ContainerAsyncClient} this instance will use to read and update blobs in - * the storage container. + * @param blobContainerAsyncClient The {@link BlobContainerAsyncClient} this instance will use to read and update + * blobs in the storage container. */ - public BlobPartitionManager(ContainerAsyncClient containerAsyncClient) { - this.containerAsyncClient = containerAsyncClient; + public BlobPartitionManager(BlobContainerAsyncClient blobContainerAsyncClient) { + this.blobContainerAsyncClient = blobContainerAsyncClient; } /** @@ -71,9 +73,9 @@ public BlobPartitionManager(ContainerAsyncClient containerAsyncClient) { @Override public Flux listOwnership(String eventHubName, String consumerGroupName) { String prefix = getBlobPrefix(eventHubName, consumerGroupName); - BlobListDetails details = new BlobListDetails().setMetadata(true); + BlobListDetails details = new BlobListDetails().setRetrieveMetadata(true); ListBlobsOptions options = new ListBlobsOptions().setPrefix(prefix).setDetails(details); - return containerAsyncClient.listBlobsFlat(options) + return blobContainerAsyncClient.listBlobsFlat(options) // Blob names should be of the pattern eventhub/consumergroup/ // While we can further check if the partition id is numeric, it may not necessarily be the case in future. .filter(blobItem -> blobItem.getName().split(BLOB_PATH_SEPARATOR).length == 3) @@ -90,57 +92,48 @@ public Flux listOwnership(String eventHubName, String consum @Override public Flux claimOwnership(PartitionOwnership... requestedPartitionOwnerships) { - return Flux.fromArray(requestedPartitionOwnerships).flatMap( - partitionOwnership -> { - - String partitionId = partitionOwnership.getPartitionId(); - String blobName = getBlobName(partitionOwnership.getEventHubName(), - partitionOwnership.getConsumerGroupName(), partitionId); - - if (!blobClients.containsKey(blobName)) { - blobClients.put(blobName, containerAsyncClient.getBlobAsyncClient(blobName)); - } - - BlobAsyncClient blobAsyncClient = blobClients.get(blobName); - - Metadata metadata = new Metadata(); - metadata.put(OWNER_ID, partitionOwnership.getOwnerId()); - Long offset = partitionOwnership.getOffset(); - metadata.put(OFFSET, offset == null ? null : String.valueOf(offset)); - Long sequenceNumber = partitionOwnership.getSequenceNumber(); - metadata.put(SEQUENCE_NUMBER, sequenceNumber == null ? null : String.valueOf(sequenceNumber)); - BlobAccessConditions blobAccessConditions = new BlobAccessConditions(); - if (ImplUtils.isNullOrEmpty(partitionOwnership.getETag())) { - // New blob should be created - blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfNoneMatch("*")); - return blobAsyncClient.asBlockBlobAsyncClient() - .uploadWithResponse(Flux.just(UPLOAD_DATA), 0, null, metadata, null, - blobAccessConditions) - .flatMapMany(response -> { - partitionOwnership.setETag(response.getHeaders().get(ETAG).getValue()); - return Mono.just(partitionOwnership); - }, error -> { - logger.info("Couldn't claim ownership of partition {}, error {}", partitionId, - error.getMessage()); - return Mono.empty(); - }, Mono::empty); - } else { - // update existing blob - blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfMatch(partitionOwnership.getETag())); - return blobAsyncClient.setMetadataWithResponse(metadata, blobAccessConditions) - .flatMapMany(response -> { - partitionOwnership.setETag(response.getHeaders().get(ETAG).getValue()); - return Mono.just(partitionOwnership); - }, error -> { - logger.info("Couldn't claim ownership of partition {}, error {}", partitionId, - error.getMessage()); - return Mono.empty(); - }, () -> Mono.empty()); - } + return Flux.fromArray(requestedPartitionOwnerships).flatMap(partitionOwnership -> { + String partitionId = partitionOwnership.getPartitionId(); + String blobName = getBlobName(partitionOwnership.getEventHubName(), + partitionOwnership.getConsumerGroupName(), partitionId); + + if (!blobClients.containsKey(blobName)) { + blobClients.put(blobName, blobContainerAsyncClient.getBlobAsyncClient(blobName)); + } + + BlobAsyncClient blobAsyncClient = blobClients.get(blobName); + + Map metadata = new HashMap<>(); + metadata.put(OWNER_ID, partitionOwnership.getOwnerId()); + Long offset = partitionOwnership.getOffset(); + metadata.put(OFFSET, offset == null ? null : String.valueOf(offset)); + Long sequenceNumber = partitionOwnership.getSequenceNumber(); + metadata.put(SEQUENCE_NUMBER, sequenceNumber == null ? null : String.valueOf(sequenceNumber)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions(); + if (ImplUtils.isNullOrEmpty(partitionOwnership.getETag())) { + // New blob should be created + blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions().setIfNoneMatch("*")); + return blobAsyncClient.getBlockBlobAsyncClient() + .uploadWithResponse(Flux.just(UPLOAD_DATA), 0, null, metadata, null, blobAccessConditions) + .flatMapMany(response -> updateOwnershipETag(response, partitionOwnership), error -> { + logger.info(CLAIM_ERROR, partitionId, error.getMessage()); + return Mono.empty(); + }, Mono::empty); + } else { + // update existing blob + blobAccessConditions.setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfMatch(partitionOwnership.getETag())); + return blobAsyncClient.setMetadataWithResponse(metadata, blobAccessConditions) + .flatMapMany(response -> updateOwnershipETag(response, partitionOwnership), error -> { + logger.info(CLAIM_ERROR, partitionId, error.getMessage()); + return Mono.empty(); + }, Mono::empty); } - ); + }); + } + + private Mono updateOwnershipETag(Response response, PartitionOwnership ownership) { + return Mono.just(ownership.setETag(response.getHeaders().get(ETAG).getValue())); } /** @@ -160,10 +153,10 @@ public Mono updateCheckpoint(Checkpoint checkpoint) { String partitionId = checkpoint.getPartitionId(); String blobName = getBlobName(checkpoint.getEventHubName(), checkpoint.getConsumerGroupName(), partitionId); if (!blobClients.containsKey(blobName)) { - blobClients.put(blobName, containerAsyncClient.getBlobAsyncClient(blobName)); + blobClients.put(blobName, blobContainerAsyncClient.getBlobAsyncClient(blobName)); } - Metadata metadata = new Metadata(); + Map metadata = new HashMap<>(); String sequenceNumber = checkpoint.getSequenceNumber() == null ? null : String.valueOf(checkpoint.getSequenceNumber()); diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerSample.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerSample.java index 44bcbc707465..7d4378813125 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerSample.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerSample.java @@ -6,8 +6,8 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.messaging.eventhubs.models.Checkpoint; import com.azure.messaging.eventhubs.models.PartitionOwnership; -import com.azure.storage.blob.ContainerAsyncClient; -import com.azure.storage.blob.ContainerClientBuilder; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClientBuilder; import com.azure.storage.common.credentials.SASTokenCredential; import java.util.StringJoiner; @@ -25,14 +25,14 @@ public class BlobPartitionManagerSample { */ public static void main(String[] args) throws Exception { SASTokenCredential sasTokenCredential = SASTokenCredential.fromSASTokenString(""); - ContainerAsyncClient containerAsyncClient = new ContainerClientBuilder() + BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder() .connectionString("") .containerName("") .credential(sasTokenCredential) .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) .buildAsyncClient(); - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); blobPartitionManager.listOwnership("abc", "xyz") .subscribe(BlobPartitionManagerSample::printPartitionOwnership); diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobPartitionManagerSample.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobPartitionManagerSample.java index a0e4b84c3b50..51f4ba25681a 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobPartitionManagerSample.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobPartitionManagerSample.java @@ -11,8 +11,8 @@ import com.azure.messaging.eventhubs.EventProcessorBuilder; import com.azure.messaging.eventhubs.PartitionProcessor; import com.azure.messaging.eventhubs.models.PartitionContext; -import com.azure.storage.blob.ContainerAsyncClient; -import com.azure.storage.blob.ContainerClientBuilder; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClientBuilder; import com.azure.storage.common.credentials.SASTokenCredential; import java.util.concurrent.TimeUnit; import reactor.core.publisher.Mono; @@ -52,7 +52,7 @@ public static void main(String[] args) throws Exception { .buildAsyncClient(); SASTokenCredential sasTokenCredential = SASTokenCredential.fromSASTokenString(SAS_TOKEN_STRING); - ContainerAsyncClient containerAsyncClient = new ContainerClientBuilder() + BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder() .connectionString(STORAGE_CONNECTION_STRING) .containerName("") .credential(sasTokenCredential) @@ -63,7 +63,7 @@ public static void main(String[] args) throws Exception { .consumerGroup("") .eventHubClient(eventHubAsyncClient) .partitionProcessorFactory(() -> PARTITION_PROCESSOR) - .partitionManager(new BlobPartitionManager(containerAsyncClient)); + .partitionManager(new BlobPartitionManager(blobContainerAsyncClient)); EventProcessor ep1 = eventProcessorBuilder.buildEventProcessor(); EventProcessor ep2 = eventProcessorBuilder.buildEventProcessor(); diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java index 5a841063a780..56d297dfaef6 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobPartitionManagerTest.java @@ -12,13 +12,12 @@ import com.azure.messaging.eventhubs.models.Checkpoint; import com.azure.messaging.eventhubs.models.PartitionOwnership; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.BlockBlobAsyncClient; -import com.azure.storage.blob.ContainerAsyncClient; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentMatchers; @@ -48,7 +47,7 @@ public class BlobPartitionManagerTest { @Mock - private ContainerAsyncClient containerAsyncClient; + private BlobContainerAsyncClient blobContainerAsyncClient; @Mock private BlockBlobAsyncClient blockBlobAsyncClient; @@ -63,13 +62,13 @@ public void setup() { @Test public void testListOwnerShip() { - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); BlobItem blobItem = getBlobItem("owner1", "1", "230", "etag", "eh/cg/0"); PagedFlux response = new PagedFlux(() -> Mono.just(new PagedResponseBase(null, 200, null, Arrays.asList(blobItem), null, null))); - when(containerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); + when(blobContainerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); StepVerifier.create(blobPartitionManager.listOwnership("eh", "cg")) .assertNext(partitionOwnership -> { @@ -96,11 +95,11 @@ public void testUpdateCheckpoint() { Map headers = new HashMap<>(); headers.put("eTag", "etag2"); - when(containerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.setMetadataWithResponse(any(Metadata.class), any(BlobAccessConditions.class))) + when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); + when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobAccessConditions.class))) .thenReturn(Mono.just(new SimpleResponse<>(null, 200, new HttpHeaders(headers), null))); - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); StepVerifier.create(blobPartitionManager.updateCheckpoint(checkpoint)) .assertNext(etag -> assertEquals("etag2", etag)).verifyComplete(); } @@ -114,13 +113,13 @@ public void testClaimOwnership() { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.put("eTag", "etag2"); - when(containerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.asBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); + when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); + when(blobAsyncClient.getBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); when(blockBlobAsyncClient.uploadWithResponse(ArgumentMatchers.>any(), eq(0L), - isNull(), any(Metadata.class), isNull(), any(BlobAccessConditions.class))) + isNull(), any(Map.class), isNull(), any(BlobAccessConditions.class))) .thenReturn(Mono.just(new ResponseBase<>(null, 200, httpHeaders, null, null))); - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); StepVerifier.create(blobPartitionManager.claimOwnership(po)) .assertNext(partitionOwnership -> { assertEquals("owner1", partitionOwnership.getOwnerId()); @@ -136,9 +135,9 @@ public void testClaimOwnership() { @Test public void testListOwnershipError() { - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); PagedFlux response = new PagedFlux<>(() -> Mono.error(new SocketTimeoutException())); - when(containerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); + when(blobContainerAsyncClient.listBlobsFlat(any(ListBlobsOptions.class))).thenReturn(response); StepVerifier.create(blobPartitionManager.listOwnership("eh", "cg")) .expectError(SocketTimeoutException.class).verify(); @@ -157,11 +156,11 @@ public void testUpdateCheckpointError() { Map headers = new HashMap<>(); headers.put("eTag", "etag2"); - when(containerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.setMetadataWithResponse(any(Metadata.class), any(BlobAccessConditions.class))) + when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); + when(blobAsyncClient.setMetadataWithResponse(ArgumentMatchers.>any(), any(BlobAccessConditions.class))) .thenReturn(Mono.error(new SocketTimeoutException())); - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); StepVerifier.create(blobPartitionManager.updateCheckpoint(checkpoint)) .expectError(SocketTimeoutException.class).verify(); } @@ -172,12 +171,12 @@ public void testFailedOwnershipClaim() { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.put("eTag", "etag2"); - when(containerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); - when(blobAsyncClient.asBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); + when(blobContainerAsyncClient.getBlobAsyncClient("eh/cg/0")).thenReturn(blobAsyncClient); + when(blobAsyncClient.getBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); when(blockBlobAsyncClient.uploadWithResponse(ArgumentMatchers.>any(), eq(0L), - isNull(), any(Metadata.class), isNull(), any(BlobAccessConditions.class))) + isNull(), ArgumentMatchers.>any(), isNull(), any(BlobAccessConditions.class))) .thenReturn(Mono.error(new ResourceModifiedException("Etag did not match", null))); - BlobPartitionManager blobPartitionManager = new BlobPartitionManager(containerAsyncClient); + BlobPartitionManager blobPartitionManager = new BlobPartitionManager(blobContainerAsyncClient); StepVerifier.create(blobPartitionManager.claimOwnership(po)).verifyComplete(); } @@ -191,7 +190,7 @@ private PartitionOwnership createPartitionOwnership(String eventHubName, String } private BlobItem getBlobItem(String owner, String sequenceNumber, String offset, String etag, String blobName) { - Metadata metadata = getMetadata(owner, sequenceNumber, offset); + Map metadata = getMetadata(owner, sequenceNumber, offset); BlobProperties properties = new BlobProperties() .setLastModified(OffsetDateTime.now()) @@ -203,8 +202,8 @@ private BlobItem getBlobItem(String owner, String sequenceNumber, String offset, .setProperties(properties); } - private Metadata getMetadata(String owner, String sequenceNumber, String offset) { - Metadata metadata = new Metadata(); + private Map getMetadata(String owner, String sequenceNumber, String offset) { + Map metadata = new HashMap<>(); metadata.put("OwnerId", owner); metadata.put("SequenceNumber", sequenceNumber); metadata.put("Offset", offset); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java index 016c5bd4f45a..283532a71698 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java @@ -7,7 +7,6 @@ import com.azure.core.amqp.RetryPolicy; import com.azure.core.amqp.exception.AmqpException; import com.azure.core.amqp.exception.ErrorContext; -import com.azure.core.amqp.implementation.AmqpConstants; import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.core.amqp.implementation.AmqpSendLink; import com.azure.core.amqp.implementation.ConnectionOptions; @@ -35,10 +34,6 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; -import static com.azure.core.amqp.MessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; -import static com.azure.core.amqp.MessageConstant.OFFSET_ANNOTATION_NAME; -import static com.azure.core.amqp.MessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; - /** * An asynchronous client that is the main point of interaction with Azure Event Hubs. It connects to a * specific Event Hub and allows operations for sending event data, receiving data, and inspecting the Event Hub's @@ -282,7 +277,7 @@ public EventHubAsyncConsumer createConsumer(String consumerGroup, String partiti final RetryPolicy retryPolicy = RetryUtil.getRetryPolicy(clonedOptions.getRetry()); return session.createConsumer(linkName, entityPath, clonedOptions.getRetry().getTryTimeout(), - retryPolicy, getExpression(eventPosition), options.getOwnerLevel(), options.getIdentifier()); + retryPolicy, eventPosition, options); }); return new EventHubAsyncConsumer(receiveLinkMono, messageSerializer, clonedOptions); @@ -307,41 +302,4 @@ public void close() { } } } - - private static String getExpression(EventPosition eventPosition) { - final String isInclusiveFlag = eventPosition.isInclusive() ? "=" : ""; - - // order of preference - if (eventPosition.getOffset() != null) { - return String.format( - AmqpConstants.AMQP_ANNOTATION_FORMAT, OFFSET_ANNOTATION_NAME.getValue(), - isInclusiveFlag, - eventPosition.getOffset()); - } - - if (eventPosition.getSequenceNumber() != null) { - return String.format( - AmqpConstants.AMQP_ANNOTATION_FORMAT, - SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), - isInclusiveFlag, - eventPosition.getSequenceNumber()); - } - - if (eventPosition.getEnqueuedDateTime() != null) { - String ms; - try { - ms = Long.toString(eventPosition.getEnqueuedDateTime().toEpochMilli()); - } catch (ArithmeticException ex) { - ms = Long.toString(Long.MAX_VALUE); - } - - return String.format( - AmqpConstants.AMQP_ANNOTATION_FORMAT, - ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue(), - isInclusiveFlag, - ms); - } - - throw new IllegalArgumentException("No starting position was set."); - } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncConsumer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncConsumer.java index 6504f952c27b..40828d797b6b 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncConsumer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncConsumer.java @@ -3,12 +3,14 @@ package com.azure.messaging.eventhubs; +import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; -import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; import com.azure.messaging.eventhubs.models.EventPosition; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; +import org.apache.qpid.proton.message.Message; import reactor.core.publisher.BaseSubscriber; import reactor.core.publisher.EmitterProcessor; import reactor.core.publisher.Flux; @@ -19,6 +21,7 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; /** @@ -60,10 +63,12 @@ public class EventHubAsyncConsumer implements Closeable { private final AtomicInteger creditsToRequest = new AtomicInteger(1); private final AtomicBoolean isDisposed = new AtomicBoolean(); + private final AtomicReference lastEnqueuedEventProperties = new AtomicReference<>(); private final ClientLogger logger = new ClientLogger(EventHubAsyncConsumer.class); private final MessageSerializer messageSerializer; private final EmitterProcessor emitterProcessor; private final Flux messageFlux; + private final boolean trackLastEnqueuedEventProperties; private volatile AmqpReceiveLink receiveLink; @@ -71,6 +76,11 @@ public class EventHubAsyncConsumer implements Closeable { EventHubConsumerOptions options) { this.messageSerializer = Objects.requireNonNull(messageSerializer, "'messageSerializer' cannot be null."); this.emitterProcessor = EmitterProcessor.create(options.getPrefetchCount(), false); + this.trackLastEnqueuedEventProperties = options.getTrackLastEnqueuedEventProperties(); + + if (options.getTrackLastEnqueuedEventProperties()) { + lastEnqueuedEventProperties.set(new LastEnqueuedEventProperties(null, null, null, null)); + } // Caching the created link so we don't invoke another link creation. this.messageFlux = receiveLinkMono.cache().flatMapMany(link -> { @@ -105,7 +115,7 @@ public class EventHubAsyncConsumer implements Closeable { }); } - return link.receive().map(message -> this.messageSerializer.deserialize(message, EventData.class)); + return link.receive().map(message -> onMessageReceived(message)); }).subscribeWith(emitterProcessor) .doOnSubscribe(subscription -> { AmqpReceiveLink existingLink = RECEIVE_LINK_FIELD_UPDATER.get(this); @@ -167,4 +177,44 @@ public void close() throws IOException { public Flux receive() { return messageFlux; } + + /** + * A set of information about the last enqueued event of a partition, as observed by the consumer as events are + * received from the Event Hubs service. + * + * @return {@code null} if {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()} was not set when + * creating the consumer. Otherwise, the properties describing the most recently enqueued event in the + * partition. + */ + public LastEnqueuedEventProperties getLastEnqueuedEventProperties() { + return lastEnqueuedEventProperties.get(); + } + + /** + * On each message received from the service, it will try to: + * 1. Deserialize the message into an EventData + * 2. If {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()} is true, then it will try to update + * {@link LastEnqueuedEventProperties} + * + * @param message AMQP message to deserialize. + * + * @return The deserialized {@link EventData}. + */ + private EventData onMessageReceived(Message message) { + final EventData event = messageSerializer.deserialize(message, EventData.class); + + if (trackLastEnqueuedEventProperties) { + final LastEnqueuedEventProperties enqueuedEventProperties = + messageSerializer.deserialize(message, LastEnqueuedEventProperties.class); + + if (enqueuedEventProperties != null) { + final LastEnqueuedEventProperties updated = new LastEnqueuedEventProperties( + enqueuedEventProperties.getSequenceNumber(), enqueuedEventProperties.getOffset(), + enqueuedEventProperties.getEnqueuedTime(), enqueuedEventProperties.getRetrievalTime()); + lastEnqueuedEventProperties.set(updated); + } + } + + return event; + } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java index 16c89abfdf89..1e13eecc5e47 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncProducer.java @@ -11,7 +11,7 @@ import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.amqp.implementation.TracerProvider; import com.azure.core.annotation.Immutable; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.implementation.util.ImplUtils; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; @@ -292,7 +292,11 @@ public Mono send(EventDataBatch batch) { return Mono.empty(); } - logger.info("Sending batch with partitionKey[{}], size[{}].", batch.getPartitionKey(), batch.getSize()); + if (ImplUtils.isNullOrEmpty(batch.getPartitionKey())) { + logger.info("Sending batch with size[{}].", batch.getSize()); + } else { + logger.info("Sending batch with size[{}], partitionKey[{}].", batch.getSize(), batch.getPartitionKey()); + } final String partitionKey = batch.getPartitionKey(); final List messages = batch.getEvents().stream().map(event -> { diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumer.java index 58cbb9e7d746..b96a8f72ec60 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumer.java @@ -9,6 +9,7 @@ import com.azure.messaging.eventhubs.implementation.SynchronousReceiveWork; import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; import com.azure.messaging.eventhubs.models.EventPosition; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; import reactor.core.publisher.Flux; import reactor.core.publisher.FluxSink; @@ -110,6 +111,18 @@ public IterableStream receive(int maximumMessageCount, Duration maxim return new IterableStream<>(map); } + /** + * A set of information about the last enqueued event of a partition, as observed by the consumer as events are + * received from the Event Hubs service. + * + * @return {@code null} if {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()} was not set when + * creating the consumer. Otherwise, the properties describing the most recently enqueued event in the + * partition. + */ + public LastEnqueuedEventProperties getLastEnqueuedEventProperties() { + return consumer.getLastEnqueuedEventProperties(); + } + /** * Given an {@code emitter}, queues that work in {@link SynchronousEventSubscriber}. If the {@link #eventSubscriber} * has not been initialised yet, will initialise it. diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubMessageSerializer.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubMessageSerializer.java index 3d76ea16f7f2..2990b755ccc0 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubMessageSerializer.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubMessageSerializer.java @@ -9,12 +9,14 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.eventhubs.implementation.ManagementChannel; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; import org.apache.qpid.proton.Proton; import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.messaging.AmqpValue; import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; import org.apache.qpid.proton.amqp.messaging.Data; +import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations; import org.apache.qpid.proton.amqp.messaging.MessageAnnotations; import org.apache.qpid.proton.amqp.messaging.Section; import org.apache.qpid.proton.message.Message; @@ -27,11 +29,22 @@ import java.util.Map; import java.util.Objects; +import static com.azure.messaging.eventhubs.implementation.ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_OFFSET; +import static com.azure.messaging.eventhubs.implementation.ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_SEQUENCE_NUMBER; +import static com.azure.messaging.eventhubs.implementation.ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_TIME_UTC; +import static com.azure.messaging.eventhubs.implementation.ManagementChannel.MANAGEMENT_RESULT_RUNTIME_INFO_RETRIEVAL_TIME_UTC; + /** * Utility class for converting {@link EventData} to {@link Message}. */ class EventHubMessageSerializer implements MessageSerializer { private final ClientLogger logger = new ClientLogger(EventHubMessageSerializer.class); + private static final Symbol LAST_ENQUEUED_SEQUENCE_NUMBER = + Symbol.getSymbol(MANAGEMENT_RESULT_LAST_ENQUEUED_SEQUENCE_NUMBER); + private static final Symbol LAST_ENQUEUED_OFFSET = Symbol.getSymbol(MANAGEMENT_RESULT_LAST_ENQUEUED_OFFSET); + private static final Symbol LAST_ENQUEUED_TIME_UTC = Symbol.getSymbol(MANAGEMENT_RESULT_LAST_ENQUEUED_TIME_UTC); + private static final Symbol RETRIEVAL_TIME_UTC = + Symbol.getSymbol(MANAGEMENT_RESULT_RUNTIME_INFO_RETRIEVAL_TIME_UTC); /** * Gets the serialized size of the AMQP message. @@ -73,8 +86,8 @@ public int getSize(Message amqpMessage) { } /** - * Creates the AMQP message represented by this {@code object}. Currently, only supports serializing - * {@link EventData}. + * Creates the AMQP message represented by this {@code object}. Currently, only supports serializing {@link + * EventData}. * * @param object Concrete object to deserialize. * @@ -115,11 +128,66 @@ public T deserialize(Message message, Class clazz) { if (clazz == PartitionProperties.class || clazz == EventHubProperties.class) { return deserializeManagementResponse(message, clazz); - } else if (clazz != EventData.class) { + } else if (clazz == EventData.class) { + return (T) deserializeEventData(message); + } else if (clazz == LastEnqueuedEventProperties.class) { + return (T) deserializeEnqueuedEventProperties(message); + } else { throw logger.logExceptionAsError(new IllegalArgumentException( "Deserialization only supports EventData, PartitionProperties, or EventHubProperties.")); } + } + + @SuppressWarnings("unchecked") + private T deserializeManagementResponse(Message message, Class deserializedType) { + if (!(message.getBody() instanceof AmqpValue)) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Expected message.getBody() to be AmqpValue, but is: " + message.getBody())); + } + + final AmqpValue body = (AmqpValue) message.getBody(); + if (!(body.getValue() instanceof Map)) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Expected message.getBody().getValue() to be of type Map")); + } + + final Map amqpBody = (Map) body.getValue(); + + if (deserializedType == PartitionProperties.class) { + return (T) toPartitionProperties(amqpBody); + } else if (deserializedType == EventHubProperties.class) { + return (T) toEventHubProperties(amqpBody); + } else { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format(Locale.US, + "Class '%s' is not a supported deserializable type.", deserializedType))); + } + } + + /** + * Tries to deserialize {@link LastEnqueuedEventProperties} from an AMQP message. + * + * @param message AMQP message from the message broker. + * + * @return An instance of {@link LastEnqueuedEventProperties} with extracted properties. Otherwise, {@code null} if + * there were no delivery annotations in the message. + */ + private LastEnqueuedEventProperties deserializeEnqueuedEventProperties(Message message) { + final DeliveryAnnotations annotations = message.getDeliveryAnnotations(); + if (annotations == null || annotations.getValue() == null) { + return null; + } + + final Map deliveryAnnotations = annotations.getValue(); + final Long lastSequenceNumber = getValue(deliveryAnnotations, LAST_ENQUEUED_SEQUENCE_NUMBER, Long.class); + final String lastEnqueuedOffset = getValue(deliveryAnnotations, LAST_ENQUEUED_OFFSET, String.class); + final Instant lastEnqueuedTime = getValue(deliveryAnnotations, LAST_ENQUEUED_TIME_UTC, Date.class).toInstant(); + final Instant retrievalTime = getValue(deliveryAnnotations, RETRIEVAL_TIME_UTC, Date.class).toInstant(); + + return new LastEnqueuedEventProperties(lastSequenceNumber, Long.valueOf(lastEnqueuedOffset), lastEnqueuedTime, + retrievalTime); + } + private EventData deserializeEventData(Message message) { final Map messageAnnotations = message.getMessageAnnotations().getValue(); final HashMap receiveProperties = new HashMap<>(); @@ -165,32 +233,7 @@ public T deserialize(Message message, Class clazz) { properties.forEach((key, value) -> eventData.addProperty(key, value)); message.clear(); - return (T) eventData; - } - - @SuppressWarnings("unchecked") - private T deserializeManagementResponse(Message message, Class deserializedType) { - if (!(message.getBody() instanceof AmqpValue)) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Expected message.getBody() to be AmqpValue, but is: " + message.getBody())); - } - - final AmqpValue body = (AmqpValue) message.getBody(); - if (!(body.getValue() instanceof Map)) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Expected message.getBody().getValue() to be of type Map")); - } - - final Map amqpBody = (Map) body.getValue(); - - if (deserializedType == PartitionProperties.class) { - return (T) toPartitionProperties(amqpBody); - } else if (deserializedType == EventHubProperties.class) { - return (T) toEventHubProperties(amqpBody); - } else { - throw logger.logExceptionAsError(new IllegalArgumentException(String.format(Locale.US, - "Class '%s' is not a supported deserializable type.", deserializedType))); - } + return eventData; } private EventHubProperties toEventHubProperties(Map amqpBody) { @@ -205,20 +248,32 @@ private PartitionProperties toPartitionProperties(Map amqpBody) { getValue(amqpBody, ManagementChannel.MANAGEMENT_ENTITY_NAME_KEY, String.class), getValue(amqpBody, ManagementChannel.MANAGEMENT_PARTITION_NAME_KEY, String.class), getValue(amqpBody, ManagementChannel.MANAGEMENT_RESULT_BEGIN_SEQUENCE_NUMBER, Long.class), - getValue(amqpBody, ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_SEQUENCE_NUMBER, Long.class), + getValue(amqpBody, MANAGEMENT_RESULT_LAST_ENQUEUED_SEQUENCE_NUMBER, Long.class), getValue(amqpBody, ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_OFFSET, String.class), getDate(amqpBody, ManagementChannel.MANAGEMENT_RESULT_LAST_ENQUEUED_TIME_UTC), getValue(amqpBody, ManagementChannel.MANAGEMENT_RESULT_PARTITION_IS_EMPTY, Boolean.class)); } - @SuppressWarnings("unchecked") private T getValue(Map amqpBody, String key, Class clazz) { if (!amqpBody.containsKey(key)) { throw logger.logExceptionAsError(new AzureException( String.format("AMQP body did not contain expected field '%s'.", key))); } - final Object value = amqpBody.get(key); + return getValue(amqpBody.get(key), key, clazz); + } + + private T getValue(Map amqpBody, Symbol key, Class clazz) { + if (!amqpBody.containsKey(key)) { + throw logger.logExceptionAsError(new AzureException( + String.format("AMQP body did not contain expected field '%s'.", key))); + } + + return getValue(amqpBody.get(key), key, clazz); + } + + @SuppressWarnings("unchecked") + private T getValue(Object value, Object key, Class clazz) { if (value == null) { throw logger.logExceptionAsError(new AzureException( String.format("AMQP body did not contain a value for key '%s'.", key))); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubReactorSession.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubReactorSession.java index dd42c68e2d7a..9f422dbe64ee 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubReactorSession.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubReactorSession.java @@ -15,6 +15,8 @@ import com.azure.core.amqp.implementation.TokenManagerProvider; import com.azure.core.amqp.implementation.handler.SessionHandler; import com.azure.core.implementation.util.ImplUtils; +import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; +import com.azure.messaging.eventhubs.models.EventPosition; import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.UnknownDescribedType; import org.apache.qpid.proton.engine.Session; @@ -22,14 +24,23 @@ import java.time.Duration; import java.util.HashMap; +import java.util.Locale; import java.util.Map; +import java.util.Objects; + +import static com.azure.core.amqp.MessageConstant.ENQUEUED_TIME_UTC_ANNOTATION_NAME; +import static com.azure.core.amqp.MessageConstant.OFFSET_ANNOTATION_NAME; +import static com.azure.core.amqp.MessageConstant.SEQUENCE_NUMBER_ANNOTATION_NAME; +import static com.azure.core.amqp.implementation.AmqpConstants.VENDOR; /** * An AMQP session for Event Hubs. */ class EventHubReactorSession extends ReactorSession implements EventHubSession { - private static final Symbol EPOCH = Symbol.valueOf(AmqpConstants.VENDOR + ":epoch"); - private static final Symbol RECEIVER_IDENTIFIER_NAME = Symbol.valueOf(AmqpConstants.VENDOR + ":receiver-name"); + private static final Symbol EPOCH = Symbol.valueOf(VENDOR + ":epoch"); + private static final Symbol RECEIVER_IDENTIFIER_NAME = Symbol.valueOf(VENDOR + ":receiver-name"); + private static final Symbol ENABLE_RECEIVER_RUNTIME_METRIC_NAME = + Symbol.valueOf(VENDOR + ":enable-receiver-runtime-metric"); /** * Creates a new AMQP session using proton-j. @@ -40,8 +51,8 @@ class EventHubReactorSession extends ReactorSession implements EventHubSession { * @param provider Provides reactor instances for messages to sent with. * @param handlerProvider Providers reactor handlers for listening to proton-j reactor events. * @param cbsNodeSupplier Mono that returns a reference to the {@link CBSNode}. - * @param tokenManagerProvider Provides {@link TokenManager} that authorizes the client when performing operations - * on the message broker. + * @param tokenManagerProvider Provides {@link TokenManager} that authorizes the client when performing + * operations on the message broker. * @param openTimeout Timeout to wait for the session operation to complete. */ EventHubReactorSession(Session session, SessionHandler sessionHandler, String sessionName, @@ -57,8 +68,13 @@ class EventHubReactorSession extends ReactorSession implements EventHubSession { */ @Override public Mono createConsumer(String linkName, String entityPath, Duration timeout, RetryPolicy retry, - String eventPositionExpression, Long ownerLevel, - String consumerIdentifier) { + EventPosition eventPosition, EventHubConsumerOptions options) { + Objects.requireNonNull(linkName, "'linkName' cannot be null."); + Objects.requireNonNull(entityPath, "'entityPath' cannot be null."); + Objects.requireNonNull(timeout, "'timeout' cannot be null."); + Objects.requireNonNull(retry, "'retry' cannot be null."); + Objects.requireNonNull(eventPosition, "'eventPosition' cannot be null."); + Objects.requireNonNull(options, "'options' cannot be null."); //TODO (conniey): support creating a filter when we've already received some events. I believe this in // the cause of recreating a failing link. @@ -67,27 +83,59 @@ public Mono createConsumer(String linkName, String entityPath, // if (filterMap != null) { // source.setFilter(filterMap); // } - Map filter = null; - if (!ImplUtils.isNullOrEmpty(eventPositionExpression)) { - filter = new HashMap<>(); - filter.put(AmqpConstants.STRING_FILTER, new UnknownDescribedType(AmqpConstants.STRING_FILTER, - eventPositionExpression)); - } + final String eventPositionExpression = getExpression(eventPosition); + final Map filter = new HashMap<>(); + filter.put(AmqpConstants.STRING_FILTER, new UnknownDescribedType(AmqpConstants.STRING_FILTER, + eventPositionExpression)); final Map properties = new HashMap<>(); - if (ownerLevel != null) { - properties.put(EPOCH, ownerLevel); + if (options.getOwnerLevel() != null) { + properties.put(EPOCH, options.getOwnerLevel()); } - if (!ImplUtils.isNullOrEmpty(consumerIdentifier)) { - properties.put(RECEIVER_IDENTIFIER_NAME, consumerIdentifier); + if (!ImplUtils.isNullOrEmpty(options.getIdentifier())) { + properties.put(RECEIVER_IDENTIFIER_NAME, options.getIdentifier()); } - //TODO (conniey): After preview 1 feature to enable keeping partition information updated. - // static final Symbol ENABLE_RECEIVER_RUNTIME_METRIC_NAME = Symbol.valueOf(VENDOR + - // ":enable-receiver-runtime-metric"); - // if (keepPartitionInformationUpdated) { - // receiver.setDesiredCapabilities(new Symbol[]{ENABLE_RECEIVER_RUNTIME_METRIC_NAME}); - // } - return createConsumer(linkName, entityPath, timeout, retry, filter, properties, null); + final Symbol[] desiredCapabilities = options.getTrackLastEnqueuedEventProperties() + ? new Symbol[]{ENABLE_RECEIVER_RUNTIME_METRIC_NAME} + : null; + + return createConsumer(linkName, entityPath, timeout, retry, filter, properties, desiredCapabilities); + } + + private String getExpression(EventPosition eventPosition) { + final String isInclusiveFlag = eventPosition.isInclusive() ? "=" : ""; + + // order of preference + if (eventPosition.getOffset() != null) { + return String.format( + AmqpConstants.AMQP_ANNOTATION_FORMAT, OFFSET_ANNOTATION_NAME.getValue(), + isInclusiveFlag, + eventPosition.getOffset()); + } + + if (eventPosition.getSequenceNumber() != null) { + return String.format( + AmqpConstants.AMQP_ANNOTATION_FORMAT, + SEQUENCE_NUMBER_ANNOTATION_NAME.getValue(), + isInclusiveFlag, + eventPosition.getSequenceNumber()); + } + + if (eventPosition.getEnqueuedDateTime() != null) { + String ms; + try { + ms = Long.toString(eventPosition.getEnqueuedDateTime().toEpochMilli()); + } catch (ArithmeticException ex) { + throw logger.logExceptionAsError(new IllegalArgumentException(String.format(Locale.ROOT, + "Event position for enqueued DateTime could not be parsed. Value: '%s'", + eventPosition.getEnqueuedDateTime()), ex)); + } + + return String.format(AmqpConstants.AMQP_ANNOTATION_FORMAT, + ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue(), isInclusiveFlag, ms); + } + + throw logger.logExceptionAsError(new IllegalArgumentException("No starting position was set.")); } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSession.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSession.java index 4a3aad0129d6..e44c5f5221f4 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSession.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/EventHubSession.java @@ -7,7 +7,8 @@ import com.azure.core.amqp.RetryPolicy; import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.core.amqp.implementation.ReactorSession; -import com.azure.messaging.eventhubs.EventHubAsyncConsumer; +import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; +import com.azure.messaging.eventhubs.models.EventPosition; import reactor.core.publisher.Mono; import java.time.Duration; @@ -28,13 +29,10 @@ public interface EventHubSession extends AmqpSession { * @param entityPath The entity path this link connects to receive events. * @param timeout Timeout required for creating and opening AMQP link. * @param retry The retry policy to use when receiving messages. - * @param eventPositionExpression The position within the partition where the consumer should begin reading events. - * @param ownerLevel {@code null} if multiple {@link EventHubAsyncConsumer EventHubConsumers} can listen to the same - * partition and consumer group. Otherwise, the {@code receiverPriority} that is the highest will listen to - * that partition exclusively. - * @param consumerIdentifier Identifier for the consumer that is sent to the service. + * @param eventPosition The position within the partition where the consumer should begin reading events. + * @param options Options to use when creating the consumer. * @return A newly created AMQP link. */ Mono createConsumer(String linkName, String entityPath, Duration timeout, RetryPolicy retry, - String eventPositionExpression, Long ownerLevel, String consumerIdentifier); + EventPosition eventPosition, EventHubConsumerOptions options); } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java index 4903345f5be7..fb55c896d5d8 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java @@ -37,6 +37,7 @@ public class ManagementChannel extends EndpointStateNotifierBase implements Even public static final String MANAGEMENT_RESULT_LAST_ENQUEUED_SEQUENCE_NUMBER = "last_enqueued_sequence_number"; public static final String MANAGEMENT_RESULT_LAST_ENQUEUED_OFFSET = "last_enqueued_offset"; public static final String MANAGEMENT_RESULT_LAST_ENQUEUED_TIME_UTC = "last_enqueued_time_utc"; + public static final String MANAGEMENT_RESULT_RUNTIME_INFO_RETRIEVAL_TIME_UTC = "runtime_info_retrieval_time_utc"; public static final String MANAGEMENT_RESULT_PARTITION_IS_EMPTY = "is_partition_empty"; // Well-known keys for management plane service requests. diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/PartitionPumpManager.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/PartitionPumpManager.java index 026c52bbfa64..c3e5adc00eec 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/PartitionPumpManager.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/PartitionPumpManager.java @@ -8,7 +8,7 @@ import com.azure.core.amqp.exception.AmqpException; import com.azure.core.amqp.implementation.TracerProvider; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.eventhubs.CloseReason; diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubConsumerOptions.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubConsumerOptions.java index d6600a56f6e4..5bf9537ca7c6 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubConsumerOptions.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubConsumerOptions.java @@ -43,6 +43,7 @@ public class EventHubConsumerOptions implements Cloneable { // Default number of events to fetch when creating the consumer. static final int DEFAULT_PREFETCH_COUNT = 500; + private boolean trackLastEnqueuedEventProperties; private String identifier; private Long ownerLevel; private RetryOptions retry; @@ -143,13 +144,32 @@ public EventHubConsumerOptions setPrefetchCount(int prefetchCount) { * associated {@link EventHubAsyncClient} is used. * * @param scheduler The scheduler for receiving events. - * @return The updated EventHubClientBuilder object. + * @return The updated {@link EventHubConsumerOptions} object. */ public EventHubConsumerOptions setScheduler(Scheduler scheduler) { this.scheduler = scheduler; return this; } + /** + * Sets whether or not the consumer should request information on the last enqueued event on its associated + * partition, and track that information as events are received. + * + *

When information about the partition's last enqueued event is being tracked, each event received from the + * Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small + * amount of additional network bandwidth consumption that is generally a favorable trade-off when considered + * against periodically making requests for partition properties using the Event Hub client.

+ * + * @param trackLastEnqueuedEventProperties {@code true} if the resulting consumer will keep track of the last + * enqueued information for that partition; {@code false} otherwise. + * + * @return The updated {@link EventHubConsumerOptions} object. + */ + public EventHubConsumerOptions setTrackLastEnqueuedEventProperties(boolean trackLastEnqueuedEventProperties) { + this.trackLastEnqueuedEventProperties = trackLastEnqueuedEventProperties; + return this; + } + /** * Gets the optional text-based identifier label to assign to an event receiver. The identifier is used for * informational purposes only. If not specified, the receiver will have no assigned identifier label. @@ -202,6 +222,17 @@ public int getPrefetchCount() { return prefetchCount; } + /** + * Gets whether or not the consumer should request information on the last enqueued event on its associated + * partition, and track that information as events are received. + * + * @return {@code true} if the resulting consumer will keep track of the last enqueued information for that + * partition; {@code false} otherwise. + */ + public boolean getTrackLastEnqueuedEventProperties() { + return trackLastEnqueuedEventProperties; + } + /** * Creates a shallow clone of this instance. * diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/LastEnqueuedEventProperties.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/LastEnqueuedEventProperties.java new file mode 100644 index 000000000000..b0128744aa7e --- /dev/null +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/LastEnqueuedEventProperties.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.messaging.eventhubs.models; + +import com.azure.core.annotation.Immutable; + +import java.time.Instant; + +/** + * A set of information about the enqueued state of a partition, as observed by the consumer. + */ +@Immutable +public class LastEnqueuedEventProperties { + private final Long lastSequenceNumber; + private final Long lastOffset; + private final Instant lastEnqueuedTime; + private final Instant retrievalTime; + + /** + * Creates an instance with the last enqueued event information set. + * + * @param lastSequenceNumber Sequence number of the last event to be enqueued in a partition. {@code null} if + * the information has not been retrieved, yet. + * @param lastOffset Offset of the last observed event enqueued in a partition. {@code null} if the information + * has not been retrieved, yet. + * @param lastEnqueuedTime The date and time of the last observed event enqueued in a partition. {@code null} if + * the information has not been retrieved, yet. + * @param retrievalTime The date and time that the information was retrieved. {@code null} if the information + * has not been retrieved, yet. + */ + public LastEnqueuedEventProperties(Long lastSequenceNumber, Long lastOffset, Instant lastEnqueuedTime, + Instant retrievalTime) { + this.lastSequenceNumber = lastSequenceNumber; + this.lastOffset = lastOffset; + this.lastEnqueuedTime = lastEnqueuedTime; + this.retrievalTime = retrievalTime; + } + + /** + * Gets the sequence number of the last observed event to be enqueued in the partition. + * + * @return The sequence number of the last observed event to be enqueued in the partition. {@code null} if the + * information has not been retrieved, yet. + */ + public Long getSequenceNumber() { + return lastSequenceNumber; + } + + /** + * Gets the offset of the last observed event enqueued in the partition. + * + * @return The offset of the last observed event enqueued in the partition. {@code null} if the information has not + * been retrieved, yet. + */ + public Long getOffset() { + return lastOffset; + } + + /** + * Gets the date and time, in UTC, that the last observed event was enqueued in the partition. + * + * @return The date and time, in UTC, that the last observed event was enqueued in the partition. {@code null} if + * the information has not been retrieved, yet. + */ + public Instant getEnqueuedTime() { + return lastEnqueuedTime; + } + + /** + * Gets the date and time, in UTC, that the information about the last enqueued event was retrieved. + * + * @return The date and time, in UTC, that the information about the last enqueued event was retrieved. {@code null} + * if the information has not been retrieved, yet. + */ + public Instant getRetrievalTime() { + return retrievalTime; + } +} diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerIntegrationTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerIntegrationTest.java index 40fab62f0596..c2555e46118f 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerIntegrationTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerIntegrationTest.java @@ -9,6 +9,7 @@ import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; import com.azure.messaging.eventhubs.models.EventHubProducerOptions; import com.azure.messaging.eventhubs.models.EventPosition; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; import org.junit.Assert; import org.junit.Ignore; import org.junit.Rule; @@ -20,6 +21,7 @@ import reactor.core.scheduler.Schedulers; import reactor.test.StepVerifier; +import java.io.IOException; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; @@ -29,6 +31,7 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import static com.azure.core.amqp.exception.ErrorCondition.RESOURCE_LIMIT_EXCEEDED; @@ -96,13 +99,14 @@ public void parallelCreationOfReceivers() { EventPosition.fromEnqueuedTime(Instant.now())); consumers[i] = consumer; - final Disposable subscription = consumer.receive().take(numberOfEvents).subscribe(event -> { - logger.info("Event[{}] received. partition: {}", event.getSequenceNumber(), partitionId); - }, error -> Assert.fail("An error should not have occurred:" + error.toString()), - () -> { - logger.info("Disposing of consumer now that the receive is complete."); - countDownLatch.countDown(); - }); + final Disposable subscription = consumer.receive().take(numberOfEvents) + .subscribe( + event -> logger.info("Event[{}] received. partition: {}", event.getSequenceNumber(), partitionId), + error -> Assert.fail("An error should not have occurred:" + error.toString()), + () -> { + logger.info("Disposing of consumer now that the receive is complete."); + countDownLatch.countDown(); + }); subscriptions.add(subscription); @@ -128,6 +132,110 @@ public void parallelCreationOfReceivers() { } } + /** + * Verify if we don't set {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()}, then it is always + * null as we are consuming events. + */ + @Test + public void lastEnqueuedInformationIsNotUpdated() throws IOException { + // Arrange + final String secondPartitionId = "1"; + final EventPosition position = EventPosition.fromEnqueuedTime(Instant.now()); + final EventHubConsumerOptions options = new EventHubConsumerOptions() + .setPrefetchCount(1) + .setTrackLastEnqueuedEventProperties(false); + final EventHubAsyncConsumer consumer = client.createConsumer(DEFAULT_CONSUMER_GROUP_NAME, secondPartitionId, + position, options); + + final AtomicBoolean isActive = new AtomicBoolean(true); + final int expectedNumber = 5; + final EventHubAsyncProducer producer = client.createProducer(); + final Disposable producerEvents = getEvents(isActive).flatMap(event -> producer.send(event)).subscribe( + sent -> logger.info("Event sent."), + error -> logger.error("Error sending event", error)); + + // Act & Assert + try { + StepVerifier.create(consumer.receive().take(expectedNumber)) + .expectNextCount(expectedNumber) + .verifyComplete(); + + final LastEnqueuedEventProperties lastEnqueuedEventProperties = consumer.getLastEnqueuedEventProperties(); + Assert.assertNull("'lastEnqueuedEventProperties' should be null.", lastEnqueuedEventProperties); + } finally { + isActive.set(false); + producerEvents.dispose(); + consumer.close(); + } + } + + /** + * Verify that each time we receive an event, the data, {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()}, + * null as we are consuming events. + */ + @Test + public void lastEnqueuedInformationIsUpdated() throws IOException { + // Arrange + final String secondPartitionId = "1"; + final AtomicBoolean isActive = new AtomicBoolean(true); + final EventHubAsyncProducer producer = client.createProducer( + new EventHubProducerOptions().setPartitionId(secondPartitionId)); + final Disposable producerEvents = getEvents(isActive).flatMap(event -> producer.send(event)).subscribe( + sent -> logger.info("Event sent."), + error -> logger.error("Error sending event", error)); + + final EventHubConsumerOptions options = new EventHubConsumerOptions() + .setPrefetchCount(1) + .setTrackLastEnqueuedEventProperties(true); + final EventHubAsyncConsumer consumer = client.createConsumer(DEFAULT_CONSUMER_GROUP_NAME, secondPartitionId, + EventPosition.latest(), options); + final AtomicReference lastViewed = new AtomicReference<>( + new LastEnqueuedEventProperties(null, null, null, null)); + + // Act & Assert + try { + StepVerifier.create(consumer.receive().take(10)) + .assertNext(event -> verifyLastRetrieved(lastViewed, consumer.getLastEnqueuedEventProperties(), true)) + .expectNextCount(5) + .assertNext(event -> verifyLastRetrieved(lastViewed, consumer.getLastEnqueuedEventProperties(), false)) + .assertNext(event -> verifyLastRetrieved(lastViewed, consumer.getLastEnqueuedEventProperties(), false)) + .assertNext(event -> verifyLastRetrieved(lastViewed, consumer.getLastEnqueuedEventProperties(), false)) + .assertNext(event -> verifyLastRetrieved(lastViewed, consumer.getLastEnqueuedEventProperties(), false)) + .verifyComplete(); + + Assert.assertNotNull("'lastEnqueuedEventProperties' should be not be null.", + consumer.getLastEnqueuedEventProperties()); + } finally { + isActive.set(false); + producerEvents.dispose(); + consumer.close(); + } + } + + private static void verifyLastRetrieved(AtomicReference atomicReference, + LastEnqueuedEventProperties current, boolean isFirst) { + Assert.assertNotNull(current); + final LastEnqueuedEventProperties previous = atomicReference.get(); + + // Update the atomic reference to the new one now. + atomicReference.set(current); + + // The first time we step through this, the retrieval time will not be set for the previous event. + if (isFirst) { + return; + } + + Assert.assertNotNull("This is not the first event, should have a retrieval time.", previous.getRetrievalTime()); + + final int compared = previous.getRetrievalTime().compareTo(current.getRetrievalTime()); + final int comparedSequenceNumber = previous.getOffset().compareTo(current.getOffset()); + Assert.assertTrue(String.format("Expected retrieval time previous '%s' to be before or equal to current '%s'", + previous.getRetrievalTime(), current.getRetrievalTime()), compared <= 0); + + Assert.assertTrue(String.format("Expected offset previous '%s' to be before or equal to current '%s'", + previous.getRetrievalTime(), current.getRetrievalTime()), comparedSequenceNumber <= 0); + } + /** * Verify that if we set the identifier in the consumer, it shows up in the quota error. */ diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerTest.java index 7df8b6771eb1..d2fd3aecf683 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncConsumerTest.java @@ -6,10 +6,11 @@ import com.azure.core.amqp.AmqpEndpointState; import com.azure.core.amqp.AmqpShutdownSignal; import com.azure.core.amqp.RetryOptions; +import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.util.logging.ClientLogger; -import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; import org.apache.qpid.proton.message.Message; import org.junit.After; import org.junit.Assert; @@ -25,6 +26,7 @@ import reactor.core.Disposables; import reactor.core.publisher.BaseSubscriber; import reactor.core.publisher.DirectProcessor; +import reactor.core.publisher.Flux; import reactor.core.publisher.FluxSink; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -32,8 +34,6 @@ import java.io.IOException; import java.time.Duration; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -59,9 +59,9 @@ public class EventHubAsyncConsumerTest { private final ClientLogger logger = new ClientLogger(EventHubAsyncConsumerTest.class); private final String messageTrackingUUID = UUID.randomUUID().toString(); + private final Flux errorProcessor = Flux.never(); + private final Flux endpointProcessor = Flux.never(); private final DirectProcessor messageProcessor = DirectProcessor.create(); - private final DirectProcessor errorProcessor = DirectProcessor.create(); - private final DirectProcessor endpointProcessor = DirectProcessor.create(); private final DirectProcessor shutdownProcessor = DirectProcessor.create(); @Mock @@ -71,36 +71,64 @@ public class EventHubAsyncConsumerTest { private ArgumentCaptor> creditSupplier; private MessageSerializer messageSerializer = new EventHubMessageSerializer(); - private Mono receiveLinkMono; - private List messages = new ArrayList<>(); - private EventHubConsumerOptions options; private EventHubAsyncConsumer consumer; @Before public void setup() { MockitoAnnotations.initMocks(this); - receiveLinkMono = Mono.fromCallable(() -> amqpReceiveLink); + Mono receiveLinkMono = Mono.just(amqpReceiveLink); when(amqpReceiveLink.receive()).thenReturn(messageProcessor); when(amqpReceiveLink.getErrors()).thenReturn(errorProcessor); when(amqpReceiveLink.getConnectionStates()).thenReturn(endpointProcessor); when(amqpReceiveLink.getShutdownSignals()).thenReturn(shutdownProcessor); - options = new EventHubConsumerOptions() + EventHubConsumerOptions options = new EventHubConsumerOptions() .setIdentifier("an-identifier") .setPrefetchCount(PREFETCH) .setRetry(new RetryOptions()) - .setScheduler(Schedulers.elastic()); + .setScheduler(Schedulers.single()); consumer = new EventHubAsyncConsumer(receiveLinkMono, messageSerializer, options); } @After public void teardown() throws IOException { - messages.clear(); Mockito.framework().clearInlineMocks(); consumer.close(); } + /** + * Verify that by default, lastEnqueuedInformation is null if + * {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()} is not set. + */ + @Test + public void lastEnqueuedEventInformationIsNull() { + // Assert + Assert.assertNull(consumer.getLastEnqueuedEventProperties()); + } + + /** + * Verify that the default information is set and is null because no information has been received. + */ + @Test + public void lastEnqueuedEventInformationCreated() { + // Arrange + final EventHubAsyncConsumer runtimeConsumer = new EventHubAsyncConsumer( + Mono.just(amqpReceiveLink), + messageSerializer, + new EventHubConsumerOptions().setTrackLastEnqueuedEventProperties(true)); + + // Act + final LastEnqueuedEventProperties lastEnqueuedEventProperties = runtimeConsumer.getLastEnqueuedEventProperties(); + + // Assert + Assert.assertNotNull(lastEnqueuedEventProperties); + Assert.assertNull(lastEnqueuedEventProperties.getOffset()); + Assert.assertNull(lastEnqueuedEventProperties.getSequenceNumber()); + Assert.assertNull(lastEnqueuedEventProperties.getRetrievalTime()); + Assert.assertNull(lastEnqueuedEventProperties.getEnqueuedTime()); + } + /** * Verifies that this receives a number of events. Verifies that the initial credits we add are equal to the * prefetch value. diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java index e061cb6c1488..bf53a5ae9055 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubAsyncProducerTest.java @@ -9,7 +9,7 @@ import com.azure.core.amqp.implementation.AmqpSendLink; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.amqp.implementation.TracerProvider; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.tracing.Tracer; import com.azure.messaging.eventhubs.implementation.ClientConstants; @@ -36,7 +36,7 @@ import java.util.List; import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; -import static com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; import static java.nio.charset.StandardCharsets.UTF_8; import static org.mockito.ArgumentMatchers.any; @@ -196,14 +196,14 @@ public void sendStartSpanSingleMessage() { when(tracer1.start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value"); } ); when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); } ); @@ -243,7 +243,7 @@ public void sendMessageAddlink() { when(tracer1.start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value"); } ); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerTest.java index 75f0da2757e7..6e7ec14fff32 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerTest.java @@ -6,10 +6,11 @@ import com.azure.core.amqp.AmqpEndpointState; import com.azure.core.amqp.AmqpShutdownSignal; import com.azure.core.amqp.RetryOptions; +import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.util.IterableStream; -import com.azure.core.amqp.implementation.AmqpReceiveLink; import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; +import com.azure.messaging.eventhubs.models.LastEnqueuedEventProperties; import org.apache.qpid.proton.message.Message; import org.junit.After; import org.junit.Assert; @@ -81,6 +82,38 @@ public void teardown() throws IOException { consumer.close(); } + /** + * Verify that by default, lastEnqueuedInformation is null if {@link EventHubConsumerOptions#getTrackLastEnqueuedEventProperties()} + * is not set. + */ + @Test + public void lastEnqueuedEventInformationIsNull() { + // Assert + Assert.assertNull(consumer.getLastEnqueuedEventProperties()); + } + + /** + * Verify that the default information is set and is null because no information has been received. + */ + @Test + public void lastEnqueuedEventInformationCreated() { + // Arrange + final EventHubAsyncConsumer runtimeConsumer = new EventHubAsyncConsumer( + Mono.just(amqpReceiveLink), + serializer, + new EventHubConsumerOptions().setTrackLastEnqueuedEventProperties(true)); + + // Act + final LastEnqueuedEventProperties lastEnqueuedEventProperties = runtimeConsumer.getLastEnqueuedEventProperties(); + + // Assert + Assert.assertNotNull(lastEnqueuedEventProperties); + Assert.assertNull(lastEnqueuedEventProperties.getOffset()); + Assert.assertNull(lastEnqueuedEventProperties.getSequenceNumber()); + Assert.assertNull(lastEnqueuedEventProperties.getRetrievalTime()); + Assert.assertNull(lastEnqueuedEventProperties.getEnqueuedTime()); + } + /** * Verifies that this receives a number of events. */ diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java index e3e7a83b9bc4..0072a183c799 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerTest.java @@ -10,7 +10,7 @@ import com.azure.core.amqp.implementation.AmqpSendLink; import com.azure.core.amqp.implementation.MessageSerializer; import com.azure.core.amqp.implementation.TracerProvider; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.tracing.Tracer; import com.azure.messaging.eventhubs.implementation.ClientConstants; @@ -37,7 +37,7 @@ import java.util.List; import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; -import static com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; import static java.nio.charset.StandardCharsets.UTF_8; import static org.mockito.ArgumentMatchers.any; @@ -126,14 +126,14 @@ public void sendStartSpanSingleMessage() { when(tracer1.start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value"); } ); when(tracer1.start(eq("Azure.eventhubs.message"), any(), eq(ProcessKind.RECEIVE))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value").addData(DIAGNOSTIC_ID_KEY, "value2"); } ); //Act @@ -166,7 +166,7 @@ public void sendMessageAddlink() { when(tracer1.start(eq("Azure.eventhubs.send"), any(), eq(ProcessKind.SEND))).thenAnswer( invocation -> { Context passed = invocation.getArgument(1, Context.class); - return passed.addData(OPENTELEMETRY_SPAN_KEY, "value"); + return passed.addData(OPENCENSUS_SPAN_KEY, "value"); } ); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorTest.java index 8fc1daa81d7c..5ab168148e45 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventProcessorTest.java @@ -4,7 +4,7 @@ package com.azure.messaging.eventhubs; import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; -import static com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -22,7 +22,7 @@ import static org.mockito.Mockito.when; import com.azure.core.amqp.implementation.TracerProvider; -import com.azure.core.implementation.tracing.ProcessKind; +import com.azure.core.util.tracing.ProcessKind; import com.azure.core.util.Context; import com.azure.core.util.tracing.Tracer; import com.azure.messaging.eventhubs.models.EventHubConsumerOptions; @@ -217,7 +217,7 @@ public void testErrorProcessSpans() throws Exception { return passed.addData(SPAN_CONTEXT, "value1") .addData("scope", (Closeable) () -> { }) - .addData(OPENTELEMETRY_SPAN_KEY, "value2"); + .addData(OPENCENSUS_SPAN_KEY, "value2"); } ); @@ -274,7 +274,7 @@ public void testProcessSpans() throws Exception { Context passed = invocation.getArgument(1, Context.class); return passed.addData(SPAN_CONTEXT, "value1").addData("scope", (Closeable) () -> { return; - }).addData(OPENTELEMETRY_SPAN_KEY, "value2"); + }).addData(OPENCENSUS_SPAN_KEY, "value2"); } ); diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java index bd15fec5ae70..e5715f946f9e 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredential.java @@ -3,15 +3,17 @@ package com.azure.identity.credential; +import com.azure.core.annotation.Immutable; import com.azure.core.credentials.AccessToken; import com.azure.core.credentials.TokenCredential; import com.azure.core.credentials.TokenRequest; import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.annotation.Immutable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.util.Deque; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; /** * A token credential provider that can provide a credential from a list of providers. @@ -34,10 +36,19 @@ public class ChainedTokenCredential implements TokenCredential { @Override public Mono getToken(TokenRequest request) { + AtomicReference cause = new AtomicReference<>(); return Flux.fromIterable(credentials) - .flatMap(p -> p.getToken(request).onErrorResume(t -> Mono.empty())) + .flatMap(p -> p.getToken(request).onErrorResume(t -> { + if (cause.get() != null) { + t.initCause(cause.get()); + } + cause.set(t); + return Mono.empty(); + })) .next() - .switchIfEmpty(Mono.error(new ClientAuthenticationException( - "No credential can provide a token in the chain", null))); + .switchIfEmpty(Mono.defer(() -> Mono.error(new ClientAuthenticationException("Tried " + + credentials.stream().map(c -> c.getClass().getSimpleName()).collect(Collectors.joining(", ")) + + " but failed to acquire a token for any of them. Please verify the environment for either of them" + + " and see more details in the causes below.", null, cause.get())))); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java index 8d1adf3ea237..ad4589719651 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/SharedTokenCacheCredential.java @@ -60,8 +60,14 @@ public class SharedTokenCacheCredential implements TokenCredential { public Mono getToken(TokenRequest request) { // Initialize here so that the constructor doesn't throw if (pubClient == null) { - PersistentTokenCacheAccessAspect accessAspect = new PersistentTokenCacheAccessAspect(); - pubClient = PublicClientApplication.builder(this.clientID).setTokenCacheAccessAspect(accessAspect).build(); + try { + PersistentTokenCacheAccessAspect accessAspect = new PersistentTokenCacheAccessAspect(); + pubClient = PublicClientApplication.builder(this.clientID) + .setTokenCacheAccessAspect(accessAspect) + .build(); + } catch (Exception e) { + return Mono.error(e); + } } IAccount requestedAccount = null; diff --git a/sdk/identity/azure-identity/src/main/java/module-info.java b/sdk/identity/azure-identity/src/main/java/module-info.java index 7b24903eae02..9ee484b22288 100644 --- a/sdk/identity/azure-identity/src/main/java/module-info.java +++ b/sdk/identity/azure-identity/src/main/java/module-info.java @@ -11,6 +11,7 @@ requires jna; requires jna.platform; requires nanohttpd; + requires org.reactivestreams; exports com.azure.identity; exports com.azure.identity.credential; diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java index ac2b055522b9..4c27c1c734c4 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/credential/DefaultAzureCredentialTest.java @@ -8,7 +8,6 @@ import com.azure.core.util.Configuration; import com.azure.identity.implementation.IdentityClient; import com.azure.identity.util.TestUtils; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.api.mockito.PowerMockito; @@ -85,20 +84,24 @@ public void testUseManagedIdentityCredential() throws Exception { .verifyComplete(); } - @Ignore("Wont work if cache contains user") + @Test public void testNoCredentialWorks() throws Exception { // setup TokenRequest request = new TokenRequest().addScopes("https://management.azure.com"); // mock IdentityClient identityClient = PowerMockito.mock(IdentityClient.class); - when(identityClient.authenticateToIMDSEndpoint(request)).thenReturn(Mono.error(new RuntimeException("Hidden error message"))); + when(identityClient.authenticateToIMDSEndpoint(request)).thenReturn(Mono.error(new RuntimeException("Cannot get token from managed identity"))); PowerMockito.whenNew(IdentityClient.class).withAnyArguments().thenReturn(identityClient); + SharedTokenCacheCredential sharedTokenCacheCredential = PowerMockito.mock(SharedTokenCacheCredential.class); + when(sharedTokenCacheCredential.getToken(request)).thenReturn(Mono.error(new RuntimeException("Cannot get token from shared token cache"))); + PowerMockito.whenNew(SharedTokenCacheCredential.class).withAnyArguments().thenReturn(sharedTokenCacheCredential); + // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build(); StepVerifier.create(credential.getToken(request)) - .expectErrorMatches(t -> t instanceof ClientAuthenticationException && t.getMessage().contains("No credential can provide a token")) + .expectErrorMatches(t -> t instanceof ClientAuthenticationException && t.getMessage().contains("Tried EnvironmentCredential, ManagedIdentityCredential, SharedTokenCacheCredential")) .verify(); } } diff --git a/sdk/keyvault/README.md b/sdk/keyvault/README.md index 8bf591459883..52178444377a 100644 --- a/sdk/keyvault/README.md +++ b/sdk/keyvault/README.md @@ -114,7 +114,7 @@ If you would like to become an active contributor to this project please follow # Previous Versions | Version | Comments | -| :-------: | :-------- | +| :-------: | :--------- | | [1.1.2](https://github.com/Azure/azure-keyvault-java/tree/1.1.2) | Version 1.1.2 release | | [1.1.1](https://github.com/Azure/azure-keyvault-java/tree/1.1.1) | Version 1.1.1 release | | [1.1](https://github.com/Azure/azure-keyvault-java/tree/1.1) | Version 1.1 release | diff --git a/sdk/keyvault/azure-keyvault-certificates/README.md b/sdk/keyvault/azure-keyvault-certificates/README.md index 76061a15ee30..d644afae3cc8 100644 --- a/sdk/keyvault/azure-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-keyvault-certificates/README.md @@ -13,26 +13,33 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file com.azure azure-keyvault-certificates - 4.0.0-preview.3 + 4.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +KeyVault Certificates to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-keyvault-certificates + 4.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` - -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/keyvault/azure-keyvault-certificates/pom.xml b/sdk/keyvault/azure-keyvault-certificates/pom.xml index 80f8b1abc8db..5e75ff2acd89 100644 --- a/sdk/keyvault/azure-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-keyvault-certificates/pom.xml @@ -1,81 +1,82 @@ - 4.0.0 - - azure-client-sdk-parent - com.azure - 1.4.0 - ../../../pom.client.xml - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + azure-client-sdk-parent com.azure - azure-keyvault-certificates - 4.0.0-preview.4 + 1.4.0 + ../../../pom.client.xml + + + com.azure + azure-keyvault-certificates + 4.0.0-preview.4 Microsoft Azure client library for KeyVault Certificates This module contains client library for Microsoft Azure KeyVault Certificates. https://github.com/Azure/azure-sdk-for-java - - - azure-java-build-docs - ${site.url}/site/${project.artifactId} - - + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - + - + + com.azure + azure-core + 1.0.0-preview.5 + - - com.azure - azure-core - 1.0.0-preview.5 - + + com.azure + azure-core-http-netty + 1.0.0-preview.5 + - - commons-codec - commons-codec - + + commons-codec + commons-codec + - - junit - junit - test - + + + junit + junit + test + - - io.projectreactor - reactor-test - test - + + io.projectreactor + reactor-test + test + - - com.azure - azure-core-test - 1.0.0-preview.5 - test - + + com.azure + azure-core-test + 1.0.0-preview.5 + test + - - com.azure - azure-identity - 1.0.0-preview.4 - test - + + com.azure + azure-identity + 1.0.0-preview.4 + test + - - com.azure - azure-core-http-netty - 1.0.0-preview.5 - test - - + diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index f96461d20c51..d0f981b91971 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -14,26 +14,33 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file com.azure azure-keyvault-keys - 4.0.0-preview.3 + 4.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +KeyVault Keys to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-keyvault-keys + 4.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` - -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/keyvault/azure-keyvault-keys/pom.xml b/sdk/keyvault/azure-keyvault-keys/pom.xml index e090da033885..bb798f1f29b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-keyvault-keys/pom.xml @@ -44,11 +44,18 @@ 1.0.0-preview.5 + + com.azure + azure-core-http-netty + 1.0.0-preview.5 + + commons-codec commons-codec + junit junit @@ -67,12 +74,6 @@ 1.0.0-preview.5 test - - com.azure - azure-core-http-netty - 1.0.0-preview.5 - test - com.azure diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index 1a160b871da1..177b743bb381 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -15,25 +15,33 @@ Maven dependency for Azure Secret Client library. Add it to your project's pom f com.azure azure-keyvault-secrets - 4.0.0-preview.3 + 4.0.0-preview.4 ``` + ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +KeyVault Secrets to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-keyvault-secrets + 4.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` - -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/keyvault/azure-keyvault-secrets/pom.xml b/sdk/keyvault/azure-keyvault-secrets/pom.xml index 2b4dd386e854..bffc11310314 100644 --- a/sdk/keyvault/azure-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-keyvault-secrets/pom.xml @@ -42,11 +42,18 @@ 1.0.0-preview.5 + + com.azure + azure-core-http-netty + 1.0.0-preview.5 + + commons-codec commons-codec + junit junit @@ -65,12 +72,6 @@ 1.0.0-preview.5 test - - com.azure - azure-core-http-netty - 1.0.0-preview.5 - test - com.azure diff --git a/sdk/servicebus/microsoft-azure-servicebus/pom.xml b/sdk/servicebus/microsoft-azure-servicebus/pom.xml index a93611f25273..db2bcd698255 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/pom.xml +++ b/sdk/servicebus/microsoft-azure-servicebus/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.microsoft.azure azure-servicebus - 3.1.0 + 3.1.1 Microsoft Azure SDK for Service Bus Java library for Azure Service Bus diff --git a/sdk/servicebus/microsoft-azure-servicebus/resources/log4j.properties b/sdk/servicebus/microsoft-azure-servicebus/resources/log4j.properties deleted file mode 100644 index 91625ee82d71..000000000000 --- a/sdk/servicebus/microsoft-azure-servicebus/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -log4j.rootLogger=OFF, stdout - -log4j.logger.com.microsoft.azure.servicebus=OFF - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageAndSessionPump.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageAndSessionPump.java index cc48ac6ff2f3..7ac9133fcaef 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageAndSessionPump.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageAndSessionPump.java @@ -151,7 +151,7 @@ private void receiveAndPumpMessage() { receiveMessageFuture.handleAsync((message, receiveEx) -> { if (receiveEx != null) { receiveEx = ExceptionUtil.extractAsyncCompletionCause(receiveEx); - TRACE_LOGGER.error("Receiving message from entity '{}' failed.", this.entityPath, receiveEx); + TRACE_LOGGER.info("Receiving message from entity '{}' failed.", this.entityPath, receiveEx); this.notifyExceptionToMessageHandler(receiveEx, ExceptionPhase.RECEIVE); this.receiveAndPumpMessage(); } else { @@ -176,7 +176,7 @@ private void receiveAndPumpMessage() { TRACE_LOGGER.debug("Invoking onMessage with message containing sequence number '{}'", message.getSequenceNumber()); onMessageFuture = COMPLETED_FUTURE.thenComposeAsync((v) -> this.messageHandler.onMessageAsync(message), this.customCodeExecutor); } catch (Exception onMessageSyncEx) { - TRACE_LOGGER.error("Invocation of onMessage with message containing sequence number '{}' threw unexpected exception", message.getSequenceNumber(), onMessageSyncEx); + TRACE_LOGGER.info("Invocation of onMessage with message containing sequence number '{}' threw unexpected exception", message.getSequenceNumber(), onMessageSyncEx); onMessageFuture = new CompletableFuture(); onMessageFuture.completeExceptionally(onMessageSyncEx); } @@ -189,7 +189,7 @@ private void receiveAndPumpMessage() { onMessageFuture.handleAsync((v, onMessageEx) -> { if (onMessageEx != null) { onMessageEx = ExceptionUtil.extractAsyncCompletionCause(onMessageEx); - TRACE_LOGGER.error("onMessage with message containing sequence number '{}' threw exception", message.getSequenceNumber(), onMessageEx); + TRACE_LOGGER.info("onMessage with message containing sequence number '{}' threw exception", message.getSequenceNumber(), onMessageEx); this.notifyExceptionToMessageHandler(onMessageEx, ExceptionPhase.USERCALLBACK); } if (this.innerReceiver.getReceiveMode() == ReceiveMode.PEEKLOCK) { @@ -222,7 +222,7 @@ private void receiveAndPumpMessage() { updateDispositionFuture.handleAsync((u, updateDispositionEx) -> { if (updateDispositionEx != null) { updateDispositionEx = ExceptionUtil.extractAsyncCompletionCause(updateDispositionEx); - TRACE_LOGGER.error("{} message with sequence number '{}' failed", dispositionPhase == ExceptionPhase.COMPLETE ? "Completing" : "Abandoning", message.getSequenceNumber(), updateDispositionEx); + TRACE_LOGGER.info("{} message with sequence number '{}' failed", dispositionPhase == ExceptionPhase.COMPLETE ? "Completing" : "Abandoning", message.getSequenceNumber(), updateDispositionEx); this.notifyExceptionToMessageHandler(updateDispositionEx, dispositionPhase); } this.receiveAndPumpMessage(); @@ -253,7 +253,7 @@ private void acceptSessionAndPumpMessages() { // Timeout exception means no session available.. it is expected so no need to notify client if (!(acceptSessionEx instanceof TimeoutException)) { - TRACE_LOGGER.error("Accepting a session from entity '{}' failed.", this.entityPath, acceptSessionEx); + TRACE_LOGGER.info("Accepting a session from entity '{}' failed.", this.entityPath, acceptSessionEx); this.notifyExceptionToSessionHandler(acceptSessionEx, ExceptionPhase.ACCEPTSESSION); } @@ -297,7 +297,7 @@ private void receiveFromSessionAndPumpMessage(SessionTracker sessionTracker) { receiverFuture.handleAsync((message, receiveEx) -> { if (receiveEx != null) { receiveEx = ExceptionUtil.extractAsyncCompletionCause(receiveEx); - TRACE_LOGGER.error("Receiving message from session '{}' on entity '{}' failed.", session.getSessionId(), this.entityPath, receiveEx); + TRACE_LOGGER.info("Receiving message from session '{}' on entity '{}' failed.", session.getSessionId(), this.entityPath, receiveEx); this.notifyExceptionToSessionHandler(receiveEx, ExceptionPhase.RECEIVE); sessionTracker.shouldRetryOnNoMessageOrException().thenAcceptAsync((shouldRetry) -> { if (shouldRetry) { @@ -317,7 +317,7 @@ private void receiveFromSessionAndPumpMessage(SessionTracker sessionTracker) { sessionTracker.notifyMessageReceived(); // There is no need to renew message locks as session messages are locked for a day ScheduledFuture renewCancelTimer = Timer.schedule(() -> { - TRACE_LOGGER.warn("onMessage task timed out. Cancelling loop to renew lock on session '{}'", session.getSessionId()); + TRACE_LOGGER.info("onMessage task timed out. Cancelling loop to renew lock on session '{}'", session.getSessionId()); sessionTracker.sessionRenewLockLoop.cancelLoop(); }, this.sessionHandlerOptions.getMaxAutoRenewDuration(), @@ -328,7 +328,7 @@ private void receiveFromSessionAndPumpMessage(SessionTracker sessionTracker) { try { onMessageFuture = COMPLETED_FUTURE.thenComposeAsync((v) -> this.sessionHandler.onMessageAsync(session, message), this.customCodeExecutor); } catch (Exception onMessageSyncEx) { - TRACE_LOGGER.error("Invocation of onMessage with message containing sequence number '{}' threw unexpected exception", message.getSequenceNumber(), onMessageSyncEx); + TRACE_LOGGER.info("Invocation of onMessage with message containing sequence number '{}' threw unexpected exception", message.getSequenceNumber(), onMessageSyncEx); onMessageFuture = new CompletableFuture(); onMessageFuture.completeExceptionally(onMessageSyncEx); } @@ -342,7 +342,7 @@ private void receiveFromSessionAndPumpMessage(SessionTracker sessionTracker) { renewCancelTimer.cancel(true); if (onMessageEx != null) { onMessageEx = ExceptionUtil.extractAsyncCompletionCause(onMessageEx); - TRACE_LOGGER.error("onMessage with message containing sequence number '{}' threw exception", message.getSequenceNumber(), onMessageEx); + TRACE_LOGGER.info("onMessage with message containing sequence number '{}' threw exception", message.getSequenceNumber(), onMessageEx); this.notifyExceptionToSessionHandler(onMessageEx, ExceptionPhase.USERCALLBACK); } if (this.receiveMode == ReceiveMode.PEEKLOCK) { @@ -371,7 +371,7 @@ private void receiveFromSessionAndPumpMessage(SessionTracker sessionTracker) { updateDispositionFuture.handleAsync((u, updateDispositionEx) -> { if (updateDispositionEx != null) { updateDispositionEx = ExceptionUtil.extractAsyncCompletionCause(updateDispositionEx); - TRACE_LOGGER.error("{} message with sequence number '{}' failed", dispositionPhase == ExceptionPhase.COMPLETE ? "Completing" : "Abandoning", message.getSequenceNumber(), updateDispositionEx); + TRACE_LOGGER.info("{} message with sequence number '{}' failed", dispositionPhase == ExceptionPhase.COMPLETE ? "Completing" : "Abandoning", message.getSequenceNumber(), updateDispositionEx); this.notifyExceptionToSessionHandler(updateDispositionEx, dispositionPhase); } this.receiveFromSessionAndPumpMessage(sessionTracker); @@ -448,7 +448,7 @@ synchronized CompletableFuture shouldRetryOnNoMessageOrException() { // close current session and accept another session ScheduledFuture renewCancelTimer = Timer.schedule(() -> { - TRACE_LOGGER.warn("Closing session timed out. Cancelling loop to renew lock on session '{}'", this.session.getSessionId()); + TRACE_LOGGER.info("Closing session timed out. Cancelling loop to renew lock on session '{}'", this.session.getSessionId()); SessionTracker.this.sessionRenewLockLoop.cancelLoop(); }, this.messageAndSessionPump.sessionHandlerOptions.getMaxAutoRenewDuration(), @@ -458,7 +458,7 @@ synchronized CompletableFuture shouldRetryOnNoMessageOrException() { try { onCloseFuture = COMPLETED_FUTURE.thenComposeAsync((v) -> this.messageAndSessionPump.sessionHandler.OnCloseSessionAsync(session), this.messageAndSessionPump.customCodeExecutor); } catch (Exception onCloseSyncEx) { - TRACE_LOGGER.error("Invocation of onCloseSession on session '{}' threw unexpected exception", this.session.getSessionId(), onCloseSyncEx); + TRACE_LOGGER.info("Invocation of onCloseSession on session '{}' threw unexpected exception", this.session.getSessionId(), onCloseSyncEx); onCloseFuture = new CompletableFuture<>(); onCloseFuture.completeExceptionally(onCloseSyncEx); } @@ -472,7 +472,7 @@ synchronized CompletableFuture shouldRetryOnNoMessageOrException() { renewCancelTimer.cancel(true); if (onCloseEx != null) { onCloseEx = ExceptionUtil.extractAsyncCompletionCause(onCloseEx); - TRACE_LOGGER.error("onCloseSession on session '{}' threw exception", session.getSessionId(), onCloseEx); + TRACE_LOGGER.info("onCloseSession on session '{}' threw exception", session.getSessionId(), onCloseEx); this.messageAndSessionPump.notifyExceptionToSessionHandler(onCloseEx, ExceptionPhase.USERCALLBACK); } @@ -533,7 +533,7 @@ protected static Duration getNextRenewInterval(Instant lockedUntilUtc, String id if (remainingTime.isNegative()) { // Lock likely expired. May be there is clock skew. Assume some minimum time remainingTime = MessageAndSessionPump.MINIMUM_MESSAGE_LOCK_VALIDITY; - TRACE_LOGGER.warn("Lock of '{}' already expired. May be there is clock skew. Still trying to renew lock", identifier); + TRACE_LOGGER.info("Lock of '{}' already expired. May be there is clock skew. Still trying to renew lock", identifier); } Duration buffer = remainingTime.dividedBy(2).compareTo(MAXIMUM_RENEW_LOCK_BUFFER) > 0 ? MAXIMUM_RENEW_LOCK_BUFFER : remainingTime.dividedBy(2); @@ -574,7 +574,7 @@ protected void loop() { this.innerReceiver.renewMessageLockAsync(message).handleAsync((v, renewLockEx) -> { if (renewLockEx != null) { renewLockEx = ExceptionUtil.extractAsyncCompletionCause(renewLockEx); - TRACE_LOGGER.error("Renewing lock on '{}' failed", this.messageIdentifier, renewLockEx); + TRACE_LOGGER.info("Renewing lock on '{}' failed", this.messageIdentifier, renewLockEx); this.messageAndSessionPump.notifyExceptionToMessageHandler(renewLockEx, ExceptionPhase.RENEWMESSAGELOCK); if (!(renewLockEx instanceof MessageLockLostException || renewLockEx instanceof OperationCancelledException)) { this.loop(); @@ -628,7 +628,7 @@ protected void loop() { this.session.renewSessionLockAsync().handleAsync((v, renewLockEx) -> { if (renewLockEx != null) { renewLockEx = ExceptionUtil.extractAsyncCompletionCause(renewLockEx); - TRACE_LOGGER.error("Renewing lock on '{}' failed", this.sessionIdentifier, renewLockEx); + TRACE_LOGGER.info("Renewing lock on '{}' failed", this.sessionIdentifier, renewLockEx); this.messageAndSessionPump.notifyExceptionToSessionHandler(renewLockEx, ExceptionPhase.RENEWSESSIONLOCK); if (!(renewLockEx instanceof SessionLockLostException || renewLockEx instanceof OperationCancelledException)) { this.loop(); diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageSender.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageSender.java index 81990b6adc54..ed0db2215264 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageSender.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/MessageSender.java @@ -96,7 +96,7 @@ synchronized CompletableFuture initializeAsync() { postSenderCreationFuture.complete(null); } else { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(coreSenderCreationEx); - TRACE_LOGGER.error("Creating MessageSender to entity '{}' failed", this.entityPath, cause); + TRACE_LOGGER.info("Creating MessageSender to entity '{}' failed", this.entityPath, cause); if (this.ownsMessagingFactory) { // Close factory this.messagingFactory.closeAsync(); diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/AmqpConstants.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/AmqpConstants.java index 7efb15e0ad9a..9ae9b93a565a 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/AmqpConstants.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/AmqpConstants.java @@ -18,6 +18,7 @@ private AmqpConstants() { } public static final int MAX_FRAME_SIZE = 65536; public static final int WEBSOCKET_MAX_FRAME_SIZE = 4096; + public static final int TRANSPORT_IDLE_TIMEOUT_MILLIS = 60000; public static final String MANAGEMENT_NODE_ADDRESS_SEGMENT = "$management"; public static final String CBS_NODE_ADDRESS_SEGMENT = "$cbs"; diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ConnectionHandler.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ConnectionHandler.java index b1ea762d0d95..b036d09d2137 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ConnectionHandler.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ConnectionHandler.java @@ -102,11 +102,11 @@ public void addTransportLayers(final Event event, final TransportInternal transp SSLContext strictTlsContext = new StrictTLSContext(strictTlsContextSpi, defaultContext.getProvider(), defaultContext.getProtocol()); domain.setSslContext(strictTlsContext); domain.setPeerAuthentication(SslDomain.VerifyMode.VERIFY_PEER_NAME); - SslPeerDetails peerDetails = Proton.sslPeerDetails(this.getOutboundSocketHostName(), this.getOutboundSocketPort()); + SslPeerDetails peerDetails = Proton.sslPeerDetails(this.messagingFactory.getHostName(), this.getProtocolPort()); transport.ssl(domain, peerDetails); } catch (NoSuchAlgorithmException e) { // Should never happen - TRACE_LOGGER.error("Default SSL algorithm not found in JRE. Please check your JRE setup.", e); + TRACE_LOGGER.info("Default SSL algorithm not found in JRE. Please check your JRE setup.", e); // this.messagingFactory.onConnectionError(new ErrorCondition(AmqpErrorCode.InternalError, e.getMessage())); } } else if (VERIFY_MODE == SslDomain.VerifyMode.VERIFY_PEER) { @@ -118,7 +118,7 @@ public void addTransportLayers(final Event event, final TransportInternal transp transport.ssl(domain); } catch (NoSuchAlgorithmException e) { // Should never happen - TRACE_LOGGER.error("Default SSL algorithm not found in JRE. Please check your JRE setup.", e); + TRACE_LOGGER.info("Default SSL algorithm not found in JRE. Please check your JRE setup.", e); // this.messagingFactory.onConnectionError(new ErrorCondition(AmqpErrorCode.InternalError, e.getMessage())); } @@ -162,9 +162,9 @@ public void onConnectionBound(Event event) { public void onTransportError(Event event) { ErrorCondition condition = event.getTransport().getCondition(); if (condition != null) { - TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}, error:{}", event.getConnection().getHostname(), condition.getDescription()); + TRACE_LOGGER.info("Connection.onTransportError: hostname:{}, error:{}", event.getConnection().getHostname(), condition.getDescription()); } else { - TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}. error:{}", event.getConnection().getHostname(), "no description returned"); + TRACE_LOGGER.info("Connection.onTransportError: hostname:{}. error:{}", event.getConnection().getHostname(), "no description returned"); } this.messagingFactory.onConnectionError(condition); diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/CustomIOHandler.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/CustomIOHandler.java index ab4a68459700..da6125f12725 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/CustomIOHandler.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/CustomIOHandler.java @@ -19,6 +19,10 @@ public void onConnectionLocalOpen(Event event) { } Transport transport = Proton.transport(); + // To detect connection drops in worst case in idleTimeout, which otherwise can take a non deterministic + // amount of time to get detected. In practice, we saw 15-20 minutes, on Linux docker containers when + // simulating packet drops with iptables rules. + transport.setIdleTimeout(AmqpConstants.TRANSPORT_IDLE_TIMEOUT_MILLIS); transport.sasl(); transport.setEmitFlowEventOnSend(false); transport.bind(connection); diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ReceiveLinkHandler.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ReceiveLinkHandler.java index 804ab36fd1e6..d84007a414b6 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ReceiveLinkHandler.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/amqp/ReceiveLinkHandler.java @@ -49,7 +49,7 @@ public void onLinkRemoteOpen(Event event) { this.amqpReceiver.onOpenComplete(null); } } else { - TRACE_LOGGER.debug("onLinkRemoteOpen: linkName:{}, remoteTarget:{}, remoteTarget:{}, action:{}", receiver.getName(), null, null, "waitingForError"); + TRACE_LOGGER.debug("onLinkRemoteOpen: linkName:{}, remoteSource:{}, remoteTarget:{}, action:{}", receiver.getName(), null, null, "waitingForError"); } } } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java index dcf2f9f1cb5d..0dff7d6ca95a 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClientAsync.java @@ -1149,7 +1149,7 @@ private static String parseDetailIfAvailable(String content) { } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/NamespaceInfoSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/NamespaceInfoSerializer.java index 0ca7f8d52915..661e4abbc250 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/NamespaceInfoSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/NamespaceInfoSerializer.java @@ -34,7 +34,7 @@ static NamespaceInfo parseFromContent(String xml) throws ServiceBusException { } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueDescriptionSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueDescriptionSerializer.java index 9d0fee218b69..732c2e6f64b3 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueDescriptionSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueDescriptionSerializer.java @@ -161,7 +161,7 @@ static List parseCollectionFromContent(String xml) { } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { @@ -184,7 +184,7 @@ static QueueDescription parseFromContent(String xml) throws MessagingEntityNotFo } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueRuntimeInfoSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueRuntimeInfoSerializer.java index 1c58577a73f8..70bad0c06f99 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueRuntimeInfoSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/QueueRuntimeInfoSerializer.java @@ -34,7 +34,7 @@ static QueueRuntimeInfo parseFromContent(String xml) throws MessagingEntityNotFo } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/RuleDescriptionSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/RuleDescriptionSerializer.java index 4273dc5559c2..f22f0b8e31f9 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/RuleDescriptionSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/RuleDescriptionSerializer.java @@ -211,7 +211,7 @@ static List parseCollectionFromContent(String xml) { } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { @@ -234,7 +234,7 @@ static RuleDescription parseFromContent(String xml) throws MessagingEntityNotFou } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionDescriptionSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionDescriptionSerializer.java index d5c1e8de271f..8be607107550 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionDescriptionSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionDescriptionSerializer.java @@ -149,7 +149,7 @@ static List parseCollectionFromContent(String topicName } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { @@ -172,7 +172,7 @@ static SubscriptionDescription parseFromContent(String topicName, String xml) th } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionRuntimeInfoSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionRuntimeInfoSerializer.java index cc8ef73857ef..e62cf80021a7 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionRuntimeInfoSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/SubscriptionRuntimeInfoSerializer.java @@ -34,7 +34,7 @@ static SubscriptionRuntimeInfo parseFromContent(String topicPath, String xml) th } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicDescriptionSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicDescriptionSerializer.java index 2fdc42e53631..ab2ee3d8fa84 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicDescriptionSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicDescriptionSerializer.java @@ -135,7 +135,7 @@ static List parseCollectionFromContent(String xml) { } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { @@ -158,7 +158,7 @@ static TopicDescription parseFromContent(String xml) throws MessagingEntityNotFo } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicRuntimeInfoSerializer.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicRuntimeInfoSerializer.java index 3a33b70f95fb..2eace5fd52eb 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicRuntimeInfoSerializer.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/TopicRuntimeInfoSerializer.java @@ -34,7 +34,7 @@ static TopicRuntimeInfo parseFromContent(String xml) throws MessagingEntityNotFo } } catch (ParserConfigurationException | IOException | SAXException e) { if (TRACE_LOGGER.isErrorEnabled()) { - TRACE_LOGGER.error("Exception while parsing response.", e); + TRACE_LOGGER.info("Exception while parsing response.", e); } if (TRACE_LOGGER.isDebugEnabled()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientConstants.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientConstants.java index cc8719928161..e7ec419d11c7 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientConstants.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientConstants.java @@ -199,13 +199,13 @@ private static String getClientVersion() { clientVersion = properties.getProperty("client.version"); } catch (Exception e) { clientVersion = "NOTFOUND"; - TRACE_LOGGER.error("Exception while retrieving client version. Exception: ", e.toString()); + TRACE_LOGGER.info("Exception while retrieving client version. Exception: ", e.toString()); } finally { if (clientPropInputStream != null) { try { clientPropInputStream.close(); } catch (IOException e) { - TRACE_LOGGER.error("Client Properties InputStream doesn't close properly. Exception: ", e.toString()); + TRACE_LOGGER.info("Client Properties InputStream doesn't close properly. Exception: ", e.toString()); } } } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientEntity.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientEntity.java index d0886843f906..0c29eba7c770 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientEntity.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/ClientEntity.java @@ -46,9 +46,18 @@ protected boolean getIsClosingOrClosed() { // used to force close when entity is faulted protected final void setClosed() { synchronized (this.syncClose) { + this.isClosing = false; this.isClosed = true; } } + + protected final void setClosing() { + synchronized (this.syncClose) { + if (!this.isClosed) { + this.isClosing = true; + } + } + } public final CompletableFuture closeAsync() { if (this.getIsClosingOrClosed()) { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CommonRequestResponseOperations.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CommonRequestResponseOperations.java index 2dcedf962d62..84524e8cafee 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CommonRequestResponseOperations.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CommonRequestResponseOperations.java @@ -60,7 +60,7 @@ static CompletableFuture> peekMessagesAsync(RequestResponseL } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Peeking messages from sequence number '{}' in entity '{}', sessionId '{}' failed", fromSequenceNumber, requestResponseLink.getLinkPath(), sessionId, failureException); + TRACE_LOGGER.info("Peeking messages from sequence number '{}' in entity '{}', sessionId '{}' failed", fromSequenceNumber, requestResponseLink.getLinkPath(), sessionId, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -82,7 +82,7 @@ static CompletableFuture sendCBSTokenAsync(RequestResponseLink requestResp } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Sending CBS Token to '{}' failed", securityToken.getTokenAudience()); + TRACE_LOGGER.info("Sending CBS Token to '{}' failed", securityToken.getTokenAudience()); returningFuture.completeExceptionally(failureException); } return returningFuture; diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Controller.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Controller.java index f3fd78f882c1..47748b1e66d6 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Controller.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Controller.java @@ -60,7 +60,7 @@ synchronized CompletableFuture initializeAsync() { postSenderCreationFuture.complete(null); } else { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(coreSenderCreationEx); - TRACE_LOGGER.error("Creating MessageSender to coordinator failed", cause); + TRACE_LOGGER.info("Creating MessageSender to coordinator failed", cause); this.messagingFactory.closeAsync(); postSenderCreationFuture.completeExceptionally(cause); } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageReceiver.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageReceiver.java index 544ab248d185..9a6e9913d36b 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageReceiver.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageReceiver.java @@ -104,9 +104,9 @@ public class CoreMessageReceiver extends ClientEntity implements IAmqpReceiver, private CompletableFuture receiveLinkReopenFuture; private final Runnable timedOutUpdateStateRequestsDaemon; private final Runnable returnMesagesLoopDaemon; - private final ScheduledFuture updateStateRequestsTimeoutChecker; - private final ScheduledFuture returnMessagesLoopRunner; private final MessagingEntityType entityType; + private ScheduledFuture updateStateRequestsTimeoutChecker; + private ScheduledFuture returnMessagesLoopRunner; // TODO: Change onReceiveComplete to handle empty deliveries. Change onError to retry updateState requests. private CoreMessageReceiver(final MessagingFactory factory, @@ -145,6 +145,11 @@ private CoreMessageReceiver(final MessagingFactory factory, this.timedOutUpdateStateRequestsDaemon = () -> { try { + if (CoreMessageReceiver.this.getIsClosed()) { + CoreMessageReceiver.this.updateStateRequestsTimeoutChecker.cancel(true); + return; + } + TRACE_LOGGER.trace("Starting '{}' core message receiver's internal loop to complete timed out update state requests.", CoreMessageReceiver.this.receivePath); for (Map.Entry entry : CoreMessageReceiver.this.pendingUpdateStateRequests.entrySet()) { Duration remainingTime = entry.getValue().getTimeoutTracker().remaining(); @@ -154,7 +159,7 @@ private CoreMessageReceiver(final MessagingFactory factory, if (exception == null) { exception = new TimeoutException("Request timed out."); } - TRACE_LOGGER.error("UpdateState request timed out. Delivery:{}", entry.getKey(), exception); + TRACE_LOGGER.info("UpdateState request timed out. Delivery:{}", entry.getKey(), exception); AsyncUtil.completeFutureExceptionally(entry.getValue().getWork(), exception); } } @@ -167,6 +172,11 @@ private CoreMessageReceiver(final MessagingFactory factory, // CONTRACT: message should be delivered to the caller of MessageReceiver.receive() only from prefetched messages this.returnMesagesLoopDaemon = () -> { try { + if (CoreMessageReceiver.this.getIsClosed()) { + CoreMessageReceiver.this.returnMessagesLoopRunner.cancel(true); + return; + } + TRACE_LOGGER.trace("Starting '{}' core message receiver's internal loop to return messages to waiting clients.", CoreMessageReceiver.this.receivePath); while (!CoreMessageReceiver.this.prefetchedMessages.isEmpty()) { ReceiveWorkItem currentReceive = CoreMessageReceiver.this.pendingReceives.poll(); @@ -187,11 +197,6 @@ private CoreMessageReceiver(final MessagingFactory factory, // Shouldn't throw any exception for the executor to run multiple times.. Should never come here } }; - - // As all update state requests have the same timeout, one timer is better than having one timer per request - this.updateStateRequestsTimeoutChecker = Timer.schedule(timedOutUpdateStateRequestsDaemon, CoreMessageReceiver.UPDATE_STATE_REQUESTS_DAEMON_WAKE_UP_INTERVAL, TimerType.RepeatRun); - // Scheduling it as a separate thread that wakes up at regular very short intervals.. Doesn't wait on incoming receive requests from callers or incoming deliveries from reactor - this.returnMessagesLoopRunner = Timer.schedule(returnMesagesLoopDaemon, CoreMessageReceiver.RETURN_MESSAGES_DAEMON_WAKE_UP_INTERVAL, TimerType.RepeatRun); } // Connection has to be associated with Reactor before Creating a receiver on it. @@ -265,7 +270,7 @@ private CompletableFuture createLink() { this.sendTokenAndSetRenewTimer(false).handleAsync((v, sasTokenEx) -> { if (sasTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sasTokenEx); - TRACE_LOGGER.error("Sending SAS Token failed. ReceivePath:{}", this.receivePath, cause); + TRACE_LOGGER.info("Sending SAS Token failed. ReceivePath:{}", this.receivePath, cause); this.linkOpen.getWork().completeExceptionally(cause); } else { try { @@ -508,7 +513,7 @@ public void onOpenComplete(Exception exception) { if (this.receiveLink.getRemoteProperties() != null && this.receiveLink.getRemoteProperties().containsKey(ClientConstants.LOCKED_UNTIL_UTC)) { this.sessionLockedUntilUtc = Util.convertDotNetTicksToInstant((long) this.receiveLink.getRemoteProperties().get(ClientConstants.LOCKED_UNTIL_UTC)); } else { - TRACE_LOGGER.warn("Accepted a session with id '{}', from '{}' which didn't set '{}' property on the receive link.", this.sessionId, this.receivePath, ClientConstants.LOCKED_UNTIL_UTC); + TRACE_LOGGER.info("Accepted a session with id '{}', from '{}' which didn't set '{}' property on the receive link.", this.sessionId, this.receivePath, ClientConstants.LOCKED_UNTIL_UTC); this.sessionLockedUntilUtc = Instant.ofEpochMilli(0); } @@ -522,6 +527,11 @@ public void onOpenComplete(Exception exception) { if (exception == null) { if (this.linkOpen != null && !this.linkOpen.getWork().isDone()) { AsyncUtil.completeFuture(this.linkOpen.getWork(), this); + + // As all update state requests have the same timeout, one timer is better than having one timer per request + this.updateStateRequestsTimeoutChecker = Timer.schedule(timedOutUpdateStateRequestsDaemon, CoreMessageReceiver.UPDATE_STATE_REQUESTS_DAEMON_WAKE_UP_INTERVAL, TimerType.RepeatRun); + // Scheduling it as a separate thread that wakes up at regular very short intervals.. Doesn't wait on incoming receive requests from callers or incoming deliveries from reactor + this.returnMessagesLoopRunner = Timer.schedule(returnMesagesLoopDaemon, CoreMessageReceiver.RETURN_MESSAGES_DAEMON_WAKE_UP_INTERVAL, TimerType.RepeatRun); } if (this.receiveLinkReopenFuture != null && !this.receiveLinkReopenFuture.isDone()) { @@ -540,13 +550,13 @@ public void onOpenComplete(Exception exception) { this.cancelSASTokenRenewTimer(); if (this.linkOpen != null && !this.linkOpen.getWork().isDone()) { - TRACE_LOGGER.error("Opening receive link '{}' to '{}' failed.", this.receiveLink.getName(), this.receivePath, exception); + TRACE_LOGGER.info("Opening receive link '{}' to '{}' failed.", this.receiveLink.getName(), this.receivePath, exception); this.setClosed(); ExceptionUtil.completeExceptionally(this.linkOpen.getWork(), exception, this, true); } if (this.receiveLinkReopenFuture != null && !this.receiveLinkReopenFuture.isDone()) { - TRACE_LOGGER.warn("Opening receive link '{}' to '{}' failed.", this.receiveLink.getName(), this.receivePath, exception); + TRACE_LOGGER.info("Opening receive link '{}' to '{}' failed.", this.receiveLink.getName(), this.receivePath, exception); AsyncUtil.completeFutureExceptionally(this.receiveLinkReopenFuture, exception); } @@ -578,7 +588,7 @@ public void onReceiveComplete(Delivery delivery) { this.currentPrefetechedMessagesCount.incrementAndGet(); this.prefetchedMessages.add(new MessageWithDeliveryTag(message, delivery.getTag())); } catch (Exception e) { - TRACE_LOGGER.warn("Reading message from delivery '{}' from '{}', session '{}' failed with unexpected exception.", deliveryTagAsString, this.receivePath, this.sessionId, e); + TRACE_LOGGER.info("Reading message from delivery '{}' from '{}', session '{}' failed with unexpected exception.", deliveryTagAsString, this.receivePath, this.sessionId, e); delivery.disposition(Released.getInstance()); delivery.settle(); return; @@ -609,7 +619,7 @@ public void onReceiveComplete(Delivery delivery) { } else { // if(matchingUpdateStateWorkItem.expectedOutcome instanceof Accepted) // { - TRACE_LOGGER.warn("Received delivery '{}' state '{}' doesn't match expected state '{}'", deliveryTagAsString, remoteState, matchingUpdateStateWorkItem.deliveryState); + TRACE_LOGGER.info("Received delivery '{}' state '{}' doesn't match expected state '{}'", deliveryTagAsString, remoteState, matchingUpdateStateWorkItem.deliveryState); // Complete requests if (remoteOutcome instanceof Rejected) { Rejected rejected = (Rejected) remoteOutcome; @@ -623,7 +633,7 @@ public void onReceiveComplete(Delivery delivery) { Duration retryInterval = this.retryPolicy.getNextRetryInterval(this.getClientId(), exception, matchingUpdateStateWorkItem.getTimeoutTracker().remaining()); if (retryInterval == null) { - TRACE_LOGGER.error("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); + TRACE_LOGGER.info("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); this.completePendingUpdateStateWorkItem(delivery, deliveryTagAsString, matchingUpdateStateWorkItem, exception); } else { matchingUpdateStateWorkItem.setLastKnownException(exception); @@ -638,11 +648,11 @@ public void onReceiveComplete(Delivery delivery) { } } else if (remoteOutcome instanceof Released) { Exception exception = new OperationCancelledException(remoteOutcome.toString()); - TRACE_LOGGER.error("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); + TRACE_LOGGER.info("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); this.completePendingUpdateStateWorkItem(delivery, deliveryTagAsString, matchingUpdateStateWorkItem, exception); } else { Exception exception = new ServiceBusException(false, remoteOutcome.toString()); - TRACE_LOGGER.error("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); + TRACE_LOGGER.info("Completing pending updateState operation for delivery '{}' with exception", deliveryTagAsString, exception); this.completePendingUpdateStateWorkItem(delivery, deliveryTagAsString, matchingUpdateStateWorkItem, exception); } // } @@ -668,7 +678,7 @@ public void onError(Exception exception) { this.clearAllPendingWorkItems(exception); } else { this.underlyingFactory.deregisterForConnectionError(this.receiveLink); - TRACE_LOGGER.warn("Receive link '{}' to '{}', sessionId '{}' closed with error.", this.receiveLink.getName(), this.receivePath, this.sessionId, exception); + TRACE_LOGGER.info("Receive link '{}' to '{}', sessionId '{}' closed with error.", this.receiveLink.getName(), this.receivePath, this.sessionId, exception); this.lastKnownLinkError = exception; if ((this.linkOpen != null && !this.linkOpen.getWork().isDone()) || (this.receiveLinkReopenFuture != null && !receiveLinkReopenFuture.isDone())) { @@ -681,7 +691,7 @@ public void onError(Exception exception) { if (this.isSessionReceiver && (exception instanceof SessionLockLostException || exception instanceof SessionCannotBeLockedException)) { // No point in retrying to establish a link.. SessionLock is lost - TRACE_LOGGER.warn("SessionId '{}' lock lost. Closing receiver.", this.sessionId); + TRACE_LOGGER.info("SessionId '{}' lock lost. Closing receiver.", this.sessionId); this.isSessionLockLost = true; this.closeAsync(); } @@ -746,14 +756,15 @@ private void scheduleLinkOpenTimeout(final TimeoutTracker timeout) { Timer.schedule( () -> { if (!linkOpen.getWork().isDone()) { - CoreMessageReceiver.this.closeInternals(false); - CoreMessageReceiver.this.setClosed(); - Exception operationTimedout = new TimeoutException( String.format(Locale.US, "%s operation on ReceiveLink(%s) to path(%s) timed out at %s.", "Open", CoreMessageReceiver.this.receiveLink.getName(), CoreMessageReceiver.this.receivePath, ZonedDateTime.now()), CoreMessageReceiver.this.lastKnownLinkError); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); ExceptionUtil.completeExceptionally(linkOpen.getWork(), operationTimedout, CoreMessageReceiver.this, true); + + CoreMessageReceiver.this.setClosing(); + CoreMessageReceiver.this.closeInternals(false); + CoreMessageReceiver.this.setClosed(); } }, timeout.remaining(), @@ -766,7 +777,7 @@ private void scheduleLinkCloseTimeout(final TimeoutTracker timeout) { () -> { if (!linkClose.isDone()) { Exception operationTimedout = new TimeoutException(String.format(Locale.US, "%s operation on Receive Link(%s) timed out at %s", "Close", CoreMessageReceiver.this.receiveLink.getName(), ZonedDateTime.now())); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); ExceptionUtil.completeExceptionally(linkClose, operationTimedout, CoreMessageReceiver.this, true); } @@ -948,7 +959,7 @@ private CompletableFuture updateMessageStateAsync(byte[] deliveryTag, Outc TRACE_LOGGER.debug("Updating message state of delivery '{}' to '{}'", deliveryTagAsString, outcome); Delivery delivery = CoreMessageReceiver.this.tagsToDeliveriesMap.get(deliveryTagAsString); if (delivery == null) { - TRACE_LOGGER.error("Delivery not found for delivery tag '{}'. Either receive link to '{}' closed with a transient error and reopened or the delivery was already settled by complete/abandon/defer/deadletter.", deliveryTagAsString, this.receivePath); + TRACE_LOGGER.info("Delivery not found for delivery tag '{}'. Either receive link to '{}' closed with a transient error and reopened or the delivery was already settled by complete/abandon/defer/deadletter.", deliveryTagAsString, this.receivePath); completeMessageFuture.completeExceptionally(generateDeliveryNotFoundException()); } else { DeliveryState state; @@ -991,7 +1002,7 @@ private synchronized CompletableFuture ensureLinkIsOpen() { Exception operationTimedout = new TimeoutException( String.format(Locale.US, "%s operation on ReceiveLink(%s) to path(%s) timed out at %s.", "Open", CoreMessageReceiver.this.receiveLink.getName(), CoreMessageReceiver.this.receivePath, ZonedDateTime.now())); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); AsyncUtil.completeFutureExceptionally(linkReopenFutureThatCanBeCancelled, operationTimedout); } }, @@ -1001,7 +1012,7 @@ private synchronized CompletableFuture ensureLinkIsOpen() { this.sendTokenAndSetRenewTimer(false).handleAsync((v, sendTokenEx) -> { if (sendTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sendTokenEx); - TRACE_LOGGER.error("Sending SAS Token to '{}' failed.", this.receivePath, cause); + TRACE_LOGGER.info("Sending SAS Token to '{}' failed.", this.receivePath, cause); this.receiveLinkReopenFuture.completeExceptionally(sendTokenEx); this.clearAllPendingWorkItems(sendTokenEx); } else { @@ -1105,7 +1116,7 @@ public CompletableFuture> renewMessageLocksAsync(UUID[] lock } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Renewing message locks for lock tokens '{}' on entity '{}' failed", Arrays.toString(lockTokens), this.receivePath, failureException); + TRACE_LOGGER.info("Renewing message locks for lock tokens '{}' on entity '{}' failed", Arrays.toString(lockTokens), this.receivePath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -1159,7 +1170,7 @@ public CompletableFuture> receiveDeferredMessag } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Receiving messages by sequence numbers '{}' from entity '{}' failed", Arrays.toString(sequenceNumbers), this.receivePath, failureException); + TRACE_LOGGER.info("Receiving messages by sequence numbers '{}' from entity '{}' failed", Arrays.toString(sequenceNumbers), this.receivePath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -1212,7 +1223,7 @@ public CompletableFuture updateDispositionAsync( } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Update disposition on entity '{}' failed", this.receivePath, failureException); + TRACE_LOGGER.info("Update disposition on entity '{}' failed", this.receivePath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -1240,7 +1251,7 @@ public CompletableFuture renewSessionLocksAsync() { } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Renewing session lock on entity '{}' of sesion '{}' failed", this.receivePath, this.getSessionId(), failureException); + TRACE_LOGGER.info("Renewing session lock on entity '{}' of sesion '{}' failed", this.receivePath, this.getSessionId(), failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -1275,7 +1286,7 @@ public CompletableFuture getSessionStateAsync() { } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Getting session state of sesion '{}' from entity '{}' failed", this.getSessionId(), this.receivePath, failureException); + TRACE_LOGGER.info("Getting session state of sesion '{}' from entity '{}' failed", this.getSessionId(), this.receivePath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; @@ -1303,7 +1314,7 @@ public CompletableFuture setSessionStateAsync(byte[] sessionState) { } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Setting session state of sesion '{}' on entity '{}' failed", this.getSessionId(), this.receivePath, failureException); + TRACE_LOGGER.info("Setting session state of sesion '{}' on entity '{}' failed", this.getSessionId(), this.receivePath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageSender.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageSender.java index 34099ab80b49..193750964117 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageSender.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageSender.java @@ -141,7 +141,7 @@ static CompletableFuture create( authenticationFuture.handleAsync((v, sasTokenEx) -> { if (sasTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sasTokenEx); - TRACE_LOGGER.error("Sending SAS Token to '{}' failed.", msgSender.sendPath, cause); + TRACE_LOGGER.info("Sending SAS Token to '{}' failed.", msgSender.sendPath, cause); msgSender.linkFirstOpen.completeExceptionally(cause); } else { try { @@ -269,7 +269,7 @@ private void scheduleSendTimeout(SendWorkItem sendWorkItem) { // Timer to timeout the request ScheduledFuture timeoutTask = Timer.schedule(() -> { if (!sendWorkItem.getWork().isDone()) { - TRACE_LOGGER.warn("Delivery '{}' to '{}' did not receive ack from service. Throwing timeout.", sendWorkItem.getDeliveryTag(), CoreMessageSender.this.sendPath); + TRACE_LOGGER.info("Delivery '{}' to '{}' did not receive ack from service. Throwing timeout.", sendWorkItem.getDeliveryTag(), CoreMessageSender.this.sendPath); CoreMessageSender.this.pendingSendsData.remove(sendWorkItem.getDeliveryTag()); CoreMessageSender.this.throwSenderTimeout(sendWorkItem.getWork(), sendWorkItem.getLastKnownException()); // Weighted delivery tag not removed from the pending sends queue, but send loop will ignore it anyway if it is present @@ -343,7 +343,7 @@ public CompletableFuture sendAsync(final Iterable messages, Trans byteArrayOffset = byteArrayOffset + encodedSize; } } catch (PayloadSizeExceededException ex) { - TRACE_LOGGER.error("Payload size of batch of messages exceeded limit", ex); + TRACE_LOGGER.info("Payload size of batch of messages exceeded limit", ex); final CompletableFuture sendTask = new CompletableFuture(); sendTask.completeExceptionally(ex); return sendTask; @@ -362,7 +362,7 @@ CompletableFuture sendAndReturnDeliveryStateAsync(Message msg, Tr Pair encodedPair = Util.encodeMessageToOptimalSizeArray(msg, this.maxMessageSize); return this.sendCoreAsync(encodedPair.getFirstItem(), encodedPair.getSecondItem(), DeliveryImpl.DEFAULT_MESSAGE_FORMAT, transaction); } catch (PayloadSizeExceededException exception) { - TRACE_LOGGER.error("Payload size of message exceeded limit", exception); + TRACE_LOGGER.info("Payload size of message exceeded limit", exception); final CompletableFuture sendTask = new CompletableFuture(); sendTask.completeExceptionally(exception); return sendTask; @@ -406,13 +406,13 @@ public void onOpenComplete(Exception completionException) { } else { this.cancelSASTokenRenewTimer(); if (!this.linkFirstOpen.isDone()) { - TRACE_LOGGER.error("Opening send link '{}' to '{}' failed", this.sendLink.getName(), this.sendPath, completionException); + TRACE_LOGGER.info("Opening send link '{}' to '{}' failed", this.sendLink.getName(), this.sendPath, completionException); this.setClosed(); ExceptionUtil.completeExceptionally(this.linkFirstOpen, completionException, this, true); } if (this.sendLinkReopenFuture != null && !this.sendLinkReopenFuture.isDone()) { - TRACE_LOGGER.warn("Opening send link '{}' to '{}' failed", this.sendLink.getName(), this.sendPath, completionException); + TRACE_LOGGER.info("Opening send link '{}' to '{}' failed", this.sendLink.getName(), this.sendPath, completionException); AsyncUtil.completeFutureExceptionally(this.sendLinkReopenFuture, completionException); } } @@ -447,7 +447,7 @@ public void onError(Exception completionException) { if (completionException != null && (!(completionException instanceof ServiceBusException) || !((ServiceBusException) completionException).getIsTransient())) { - TRACE_LOGGER.warn("Send link '{}' to '{}' closed. Failing all pending send requests.", this.sendLink.getName(), this.sendPath); + TRACE_LOGGER.info("Send link '{}' to '{}' closed. Failing all pending send requests.", this.sendLink.getName(), this.sendPath); this.clearAllPendingSendsWithException(completionException); } else { final Map.Entry> pendingSendEntry = IteratorUtil.getFirst(this.pendingSendsData.entrySet()); @@ -456,7 +456,7 @@ public void onError(Exception completionException) { if (tracker != null) { final Duration nextRetryInterval = this.retryPolicy.getNextRetryInterval(this.getClientId(), completionException, tracker.remaining()); if (nextRetryInterval != null) { - TRACE_LOGGER.warn("Send link '{}' to '{}' closed. Will retry link creation after '{}'.", this.sendLink.getName(), this.sendPath, nextRetryInterval); + TRACE_LOGGER.info("Send link '{}' to '{}' closed. Will retry link creation after '{}'.", this.sendLink.getName(), this.sendPath, nextRetryInterval); Timer.schedule(() -> CoreMessageSender.this.ensureLinkIsOpen(), nextRetryInterval, TimerType.OneTimeRun); } } @@ -508,7 +508,7 @@ public void onSendComplete(final Delivery delivery) { if (retryInterval == null) { this.cleanupFailedSend(pendingSendWorkItem, exception); } else { - TRACE_LOGGER.warn("Send failed for delivery '{}'. Will retry after '{}'", deliveryTag, retryInterval); + TRACE_LOGGER.info("Send failed for delivery '{}'. Will retry after '{}'", deliveryTag, retryInterval); pendingSendWorkItem.setLastKnownException(exception); Timer.schedule(() -> CoreMessageSender.this.reSendAsync(deliveryTag, pendingSendWorkItem, false), retryInterval, TimerType.OneTimeRun); } @@ -518,7 +518,7 @@ public void onSendComplete(final Delivery delivery) { this.cleanupFailedSend(pendingSendWorkItem, new ServiceBusException(false, outcome.toString())); } } else { - TRACE_LOGGER.warn("Delivery mismatch. path:{}, linkName:{}, delivery:{}", this.sendPath, this.sendLink.getName(), deliveryTag); + TRACE_LOGGER.info("Delivery mismatch. path:{}, linkName:{}, delivery:{}", this.sendPath, this.sendLink.getName(), deliveryTag); } } @@ -618,14 +618,15 @@ private void initializeLinkOpen(TimeoutTracker timeout) { Timer.schedule( () -> { if (!CoreMessageSender.this.linkFirstOpen.isDone()) { - CoreMessageSender.this.closeInternals(false); - CoreMessageSender.this.setClosed(); - Exception operationTimedout = new TimeoutException( String.format(Locale.US, "Open operation on SendLink(%s) on Entity(%s) timed out at %s.", CoreMessageSender.this.sendLink.getName(), CoreMessageSender.this.getSendPath(), ZonedDateTime.now().toString()), CoreMessageSender.this.lastKnownErrorReportedAt.isAfter(Instant.now().minusSeconds(ClientConstants.SERVER_BUSY_BASE_SLEEP_TIME_IN_SECS)) ? CoreMessageSender.this.lastKnownLinkError : null); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); ExceptionUtil.completeExceptionally(CoreMessageSender.this.linkFirstOpen, operationTimedout, CoreMessageSender.this, true); + + CoreMessageSender.this.setClosing(); + CoreMessageSender.this.closeInternals(false); + CoreMessageSender.this.setClosed(); } }, timeout.remaining(), @@ -678,7 +679,7 @@ private synchronized CompletableFuture ensureLinkIsOpen() { Exception operationTimedout = new TimeoutException( String.format(Locale.US, "%s operation on SendLink(%s) to path(%s) timed out at %s.", "Open", CoreMessageSender.this.sendLink.getName(), CoreMessageSender.this.sendPath, ZonedDateTime.now())); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); linkReopenFutureThatCanBeCancelled.completeExceptionally(operationTimedout); } }, @@ -696,7 +697,7 @@ private synchronized CompletableFuture ensureLinkIsOpen() { authenticationFuture.handleAsync((v, sendTokenEx) -> { if (sendTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sendTokenEx); - TRACE_LOGGER.error("Sending SAS Token to '{}' failed.", this.sendPath, cause); + TRACE_LOGGER.info("Sending SAS Token to '{}' failed.", this.sendPath, cause); this.sendLinkReopenFuture.completeExceptionally(sendTokenEx); this.clearAllPendingSendsWithException(sendTokenEx); } else { @@ -796,7 +797,7 @@ private void processSendWork() { this.linkCredit--; sendData.setWaitingForAck(); } else { - TRACE_LOGGER.warn("Sendlink advance failed. path:{}, linkName:{}, deliveryTag:{}, sentMessageSize:{}, payloadActualSiz:{}", + TRACE_LOGGER.info("Sendlink advance failed. path:{}, linkName:{}, deliveryTag:{}, sentMessageSize:{}, payloadActualSiz:{}", this.sendPath, this.sendLink.getName(), deliveryTag, sentMsgSize, sendData.getEncodedMessageSize()); if (delivery != null) { @@ -828,7 +829,7 @@ private void throwSenderTimeout(CompletableFuture pendingSendWork ? new TimeoutException(String.format(Locale.US, "%s %s %s.", CoreMessageSender.SEND_TIMED_OUT, " at ", ZonedDateTime.now(), cause)) : (ServiceBusException) cause; - TRACE_LOGGER.error("Send timed out", exception); + TRACE_LOGGER.info("Send timed out", exception); ExceptionUtil.completeExceptionally(pendingSendWork, exception, this, true); } @@ -838,7 +839,7 @@ private void scheduleLinkCloseTimeout(final TimeoutTracker timeout) { () -> { if (!linkClose.isDone()) { Exception operationTimedout = new TimeoutException(String.format(Locale.US, "%s operation on Send Link(%s) timed out at %s", "Close", CoreMessageSender.this.sendLink.getName(), ZonedDateTime.now())); - TRACE_LOGGER.warn(operationTimedout.getMessage()); + TRACE_LOGGER.info(operationTimedout.getMessage()); ExceptionUtil.completeExceptionally(linkClose, operationTimedout, CoreMessageSender.this, true); } @@ -923,7 +924,7 @@ public CompletableFuture scheduleMessageAsync(Message[] messages, Transa try { encodedPair = Util.encodeMessageToOptimalSizeArray(message, this.maxMessageSize); } catch (PayloadSizeExceededException exception) { - TRACE_LOGGER.error("Payload size of message exceeded limit", exception); + TRACE_LOGGER.info("Payload size of message exceeded limit", exception); final CompletableFuture scheduleMessagesTask = new CompletableFuture(); scheduleMessagesTask.completeExceptionally(exception); return scheduleMessagesTask; @@ -965,7 +966,7 @@ public CompletableFuture scheduleMessageAsync(Message[] messages, Transa } else { // error response Exception scheduleException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Sending scheduled messages to '{}' failed.", this.sendPath, scheduleException); + TRACE_LOGGER.info("Sending scheduled messages to '{}' failed.", this.sendPath, scheduleException); returningFuture.completeExceptionally(scheduleException); } return returningFuture; @@ -993,7 +994,7 @@ public CompletableFuture cancelScheduledMessageAsync(Long[] sequenceNumber } else { // error response Exception failureException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); - TRACE_LOGGER.error("Cancelling scheduled messages in '{}' failed.", this.sendPath, failureException); + TRACE_LOGGER.info("Cancelling scheduled messages in '{}' failed.", this.sendPath, failureException); returningFuture.completeExceptionally(failureException); } return returningFuture; diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MessagingFactory.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MessagingFactory.java index 954a2070f1c1..929a4b126424 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MessagingFactory.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MessagingFactory.java @@ -258,7 +258,7 @@ public static CompletableFuture createFromNamespaceEndpointURI messagingFactory.startReactor(messagingFactory.reactorHandler); } catch (IOException e) { Marker fatalMarker = MarkerFactory.getMarker(ClientConstants.FATAL_MARKER); - TRACE_LOGGER.error(fatalMarker, "Starting reactor failed", e); + TRACE_LOGGER.info(fatalMarker, "Starting reactor failed", e); messagingFactory.factoryOpenFuture.completeExceptionally(e); } return messagingFactory.factoryOpenFuture; @@ -342,7 +342,7 @@ public void onConnectionOpen() { @Override public void onConnectionError(ErrorCondition error) { if (error != null && error.getCondition() != null) { - TRACE_LOGGER.error("Connection error. '{}'", error); + TRACE_LOGGER.info("Connection error. '{}'", error); } if (!this.factoryOpenFuture.isDone()) { @@ -361,7 +361,7 @@ public void onConnectionError(ErrorCondition error) { private void onReactorError(Exception cause) { if (!this.factoryOpenFuture.isDone()) { - TRACE_LOGGER.error("Reactor error occured", cause); + TRACE_LOGGER.info("Reactor error occured", cause); AsyncUtil.completeFutureExceptionally(this.factoryOpenFuture, cause); this.setClosed(); } else { @@ -369,13 +369,13 @@ private void onReactorError(Exception cause) { return; } - TRACE_LOGGER.warn("Reactor error occured", cause); + TRACE_LOGGER.info("Reactor error occured", cause); try { this.startReactor(this.reactorHandler); } catch (IOException e) { Marker fatalMarker = MarkerFactory.getMarker(ClientConstants.FATAL_MARKER); - TRACE_LOGGER.error(fatalMarker, "Re-starting reactor failed with exception.", e); + TRACE_LOGGER.info(fatalMarker, "Re-starting reactor failed with exception.", e); this.onReactorError(cause); } @@ -452,7 +452,7 @@ public void onEvent() { Timer.schedule(() -> { if (!MessagingFactory.this.connetionCloseFuture.isDone()) { String errorMessage = "Closing MessagingFactory timed out."; - TRACE_LOGGER.warn(errorMessage); + TRACE_LOGGER.info(errorMessage); AsyncUtil.completeFutureExceptionally(MessagingFactory.this.connetionCloseFuture, new TimeoutException(errorMessage)); } }, @@ -498,7 +498,7 @@ public void run() { cause = handlerException; } - TRACE_LOGGER.warn("UnHandled exception while processing events in reactor:", handlerException); + TRACE_LOGGER.info("UnHandled exception while processing events in reactor:", handlerException); String message = !StringUtil.isNullOrEmpty(cause.getMessage()) ? cause.getMessage() @@ -574,7 +574,7 @@ CompletableFuture> sendSecurityTokenAndSetRenewTimer(String s result.complete(renewalFuture); } else { Throwable sendFailureCause = ExceptionUtil.extractAsyncCompletionCause(sendTokenEx); - TRACE_LOGGER.warn("Sending CBS Token for {} failed.", sasTokenAudienceURI, sendFailureCause); + TRACE_LOGGER.info("Sending CBS Token for {} failed.", sasTokenAudienceURI, sendFailureCause); if (retryOnFailure) { // Just schedule another attempt TRACE_LOGGER.info("Will retry sending CBS Token for {} after {} seconds.", sasTokenAudienceURI, ClientConstants.DEFAULT_SAS_TOKEN_SEND_RETRY_INTERVAL_IN_SECONDS); @@ -592,7 +592,7 @@ CompletableFuture> sendSecurityTokenAndSetRenewTimer(String s result.complete(renewalFuture); } else { Throwable resendFailureCause = ExceptionUtil.extractAsyncCompletionCause(resendTokenEx); - TRACE_LOGGER.warn("Resending CBS Token for {} failed.", sasTokenAudienceURI, resendFailureCause); + TRACE_LOGGER.info("Resending CBS Token for {} failed.", sasTokenAudienceURI, resendFailureCause); result.completeExceptionally(resendFailureCause); } return null; @@ -672,7 +672,7 @@ private void createCBSLinkAsync() { } } else { this.lastCBSLinkCreationException = ExceptionUtil.extractAsyncCompletionCause(ex); - TRACE_LOGGER.warn("Creating CBS link to {} failed. Attempts '{}'", requestResponseLinkPath, this.cbsLinkCreationAttempts); + TRACE_LOGGER.info("Creating CBS link to {} failed. Attempts '{}'", requestResponseLinkPath, this.cbsLinkCreationAttempts); this.createCBSLinkAsync(); } return null; diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MiscRequestResponseOperationHandler.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MiscRequestResponseOperationHandler.java index 4ff49ee80a33..6a6a42040fa7 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MiscRequestResponseOperationHandler.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MiscRequestResponseOperationHandler.java @@ -145,7 +145,7 @@ public CompletableFuture removeRuleAsync(String ruleName) { returningFuture.complete(null); } else { // error response - TRACE_LOGGER.error("Removing rule '{}' from entity '{}' failed with status code '{}'", ruleName, this.entityPath, statusCode); + TRACE_LOGGER.info("Removing rule '{}' from entity '{}' failed with status code '{}'", ruleName, this.entityPath, statusCode); returningFuture.completeExceptionally(RequestResponseUtils.genereateExceptionFromResponse(responseMessage)); } return returningFuture; @@ -170,7 +170,7 @@ public CompletableFuture addRuleAsync(RuleDescription ruleDescription) { returningFuture.complete(null); } else { // error response - TRACE_LOGGER.error("Adding rule '{}' to entity '{}' failed with status code '{}'", ruleDescription.getName(), this.entityPath, statusCode); + TRACE_LOGGER.info("Adding rule '{}' to entity '{}' failed with status code '{}'", ruleDescription.getName(), this.entityPath, statusCode); returningFuture.completeExceptionally(RequestResponseUtils.genereateExceptionFromResponse(responseMessage)); } return returningFuture; @@ -209,7 +209,7 @@ public CompletableFuture> getRulesAsync(int skip, in returningFuture.complete(rules); } else { // error response - TRACE_LOGGER.error("Fetching rules for entity '{}' failed with status code '{}'", this.entityPath, statusCode); + TRACE_LOGGER.info("Fetching rules for entity '{}' failed with status code '{}'", this.entityPath, statusCode); returningFuture.completeExceptionally(RequestResponseUtils.genereateExceptionFromResponse(responseMessage)); } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java index cf0a94b5ba59..22ee15316b01 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java @@ -98,7 +98,7 @@ public static CompletableFuture createAsync( Exception operationTimedout = new TimeoutException( String.format(Locale.US, "Open operation on RequestResponseLink(%s) on Entity(%s) timed out at %s.", requestReponseLink.getClientId(), requestReponseLink.linkPath, ZonedDateTime.now().toString())); - TRACE_LOGGER.error("RequestResponseLink open timed out.", operationTimedout); + TRACE_LOGGER.info("RequestResponseLink open timed out.", operationTimedout); AsyncUtil.completeFutureExceptionally(requestReponseLink.createFuture, operationTimedout); } }, @@ -108,7 +108,7 @@ public static CompletableFuture createAsync( requestReponseLink.sendTokenAndSetRenewTimer(false).handleAsync((v, sasTokenEx) -> { if (sasTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sasTokenEx); - TRACE_LOGGER.error("Sending SAS Token failed. RequestResponseLink path:{}", requestReponseLink.linkPath, cause); + TRACE_LOGGER.info("Sending SAS Token failed. RequestResponseLink path:{}", requestReponseLink.linkPath, cause); requestReponseLink.createFuture.completeExceptionally(cause); } else { try { @@ -310,7 +310,7 @@ private void ensureUniqueLinkRecreation() { this.isRecreateLinksInProgress = true; this.recreateInternalLinks().handleAsync((v, recreationEx) -> { if (recreationEx != null) { - TRACE_LOGGER.warn("Recreating internal links of reqestresponselink '{}' failed.", this.linkPath, ExceptionUtil.extractAsyncCompletionCause(recreationEx)); + TRACE_LOGGER.info("Recreating internal links of reqestresponselink '{}' failed.", this.linkPath, ExceptionUtil.extractAsyncCompletionCause(recreationEx)); } synchronized (this.recreateLinksLock) { @@ -337,7 +337,7 @@ private CompletableFuture recreateInternalLinks() { this.sendTokenAndSetRenewTimer(false).handleAsync((v, sasTokenEx) -> { if (sasTokenEx != null) { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sasTokenEx); - TRACE_LOGGER.error("Sending SAS Token failed. RequestResponseLink path:{}", this.linkPath, cause); + TRACE_LOGGER.info("Sending SAS Token failed. RequestResponseLink path:{}", this.linkPath, cause); recreateInternalLinksFuture.completeExceptionally(cause); this.completeAllPendingRequestsWithException(cause); } else { @@ -375,7 +375,7 @@ public void onEvent() { if (!recreateInternalLinksFuture.isDone()) { Exception operationTimedout = new TimeoutException( String.format(Locale.US, "Recreating internal links of requestresponselink to %s timed out.", RequestResponseLink.this.linkPath)); - TRACE_LOGGER.warn("Recreating internal links of requestresponselink timed out.", operationTimedout); + TRACE_LOGGER.info("Recreating internal links of requestresponselink timed out.", operationTimedout); RequestResponseLink.this.cancelSASTokenRenewTimer(); AsyncUtil.completeFutureExceptionally(recreateInternalLinksFuture, operationTimedout); } @@ -387,7 +387,7 @@ public void onEvent() { } private void completeAllPendingRequestsWithException(Throwable exception) { - TRACE_LOGGER.warn("Completing all pending requests with exception in request response link to {}", this.linkPath); + TRACE_LOGGER.info("Completing all pending requests with exception in request response link to {}", this.linkPath); for (RequestResponseWorkItem workItem : this.pendingRequests.values()) { AsyncUtil.completeFutureExceptionally(workItem.getWork(), exception); workItem.cancelTimeoutTask(true); @@ -420,7 +420,7 @@ public CompletableFuture requestAysnc(Message requestMessage, Transacti private ScheduledFuture scheduleRequestTimeout(String requestId, Duration timeout) { return Timer.schedule(() -> { - TRACE_LOGGER.warn("Request with id:{} timed out", requestId); + TRACE_LOGGER.info("Request with id:{} timed out", requestId); RequestResponseWorkItem completedWorkItem = RequestResponseLink.this.exceptionallyCompleteRequest(requestId, new TimeoutException("Request timed out."), true); boolean isRetriedWorkItem = completedWorkItem.getLastKnownException() != null; RequestResponseLink.this.amqpSender.removeEnqueuedRequest(requestId, isRetriedWorkItem); @@ -450,14 +450,14 @@ private RequestResponseWorkItem completeRequestWithResponse(String requestId, Me TRACE_LOGGER.debug("Response for request with id:{} has status code:{}", requestId, statusCode); // Retry on server busy and other retry-able status codes (what are other codes??) if (statusCode == ClientConstants.REQUEST_RESPONSE_SERVER_BUSY_STATUS_CODE) { - TRACE_LOGGER.warn("Request with id:{} received ServerBusy response from '{}'", requestId, this.linkPath); + TRACE_LOGGER.info("Request with id:{} received ServerBusy response from '{}'", requestId, this.linkPath); // error response Exception responseException = RequestResponseUtils.genereateExceptionFromResponse(responseMessage); this.underlyingFactory.getRetryPolicy().incrementRetryCount(this.getClientId()); Duration retryInterval = this.underlyingFactory.getRetryPolicy().getNextRetryInterval(this.getClientId(), responseException, workItem.getTimeoutTracker().remaining()); if (retryInterval == null) { // Either not retry-able or not enough time to retry - TRACE_LOGGER.error("Request with id:{} cannot be retried. So completing with excetion.", requestId, responseException); + TRACE_LOGGER.info("Request with id:{} cannot be retried. So completing with excetion.", requestId, responseException); this.exceptionallyCompleteRequest(requestId, responseException, false); } else { // Retry @@ -483,7 +483,7 @@ public void onEvent() { workItem.cancelTimeoutTask(true); } } else { - TRACE_LOGGER.warn("Request with id:{} not found in the requestresponse link.", requestId); + TRACE_LOGGER.info("Request with id:{} not found in the requestresponse link.", requestId); } return workItem; @@ -501,7 +501,7 @@ private static void scheduleLinkCloseTimeout(CompletableFuture closeFuture () -> { if (!closeFuture.isDone()) { Exception operationTimedout = new TimeoutException(String.format(Locale.US, "%s operation on Link(%s) timed out at %s", "Close", linkName, ZonedDateTime.now())); - TRACE_LOGGER.warn("Closing link timed out", operationTimedout); + TRACE_LOGGER.info("Closing link timed out", operationTimedout); AsyncUtil.completeFutureExceptionally(closeFuture, operationTimedout); } @@ -570,7 +570,7 @@ public void onOpenComplete(Exception completionException) { // Send unlimited credit this.receiveLink.flow(Integer.MAX_VALUE); } else { - TRACE_LOGGER.error("Opening internal receive link '{}' of requestresponselink to {} failed.", this.receiveLink.getName(), this.parent.linkPath, completionException); + TRACE_LOGGER.info("Opening internal receive link '{}' of requestresponselink to {} failed.", this.receiveLink.getName(), this.parent.linkPath, completionException); this.setClosed(); AsyncUtil.completeFuture(this.closeFuture, null); AsyncUtil.completeFutureExceptionally(this.openFuture, completionException); @@ -585,11 +585,11 @@ public void onError(Exception exception) { if (this.getIsClosingOrClosed()) { if (!this.closeFuture.isDone()) { - TRACE_LOGGER.error("Closing internal receive link '{}' of requestresponselink to {} failed.", this.receiveLink.getName(), this.parent.linkPath, exception); + TRACE_LOGGER.info("Closing internal receive link '{}' of requestresponselink to {} failed.", this.receiveLink.getName(), this.parent.linkPath, exception); AsyncUtil.completeFutureExceptionally(this.closeFuture, exception); } } else { - TRACE_LOGGER.warn("Internal receive link '{}' of requestresponselink to '{}' encountered error.", this.receiveLink.getName(), this.parent.linkPath, exception); + TRACE_LOGGER.info("Internal receive link '{}' of requestresponselink to '{}' encountered error.", this.receiveLink.getName(), this.parent.linkPath, exception); this.parent.underlyingFactory.deregisterForConnectionError(this.receiveLink); this.matchingSendLink.close(); this.parent.underlyingFactory.deregisterForConnectionError(this.matchingSendLink); @@ -618,7 +618,7 @@ public void onReceiveComplete(Delivery delivery) { delivery.disposition(Accepted.getInstance()); delivery.settle(); } catch (Exception e) { - TRACE_LOGGER.warn("Reading message from delivery failed with unexpected exception.", e); + TRACE_LOGGER.info("Reading message from delivery failed with unexpected exception.", e); // release the delivery ?? delivery.disposition(Released.getInstance()); @@ -634,7 +634,7 @@ public void onReceiveComplete(Delivery delivery) { TRACE_LOGGER.debug("RequestRespnseLink received response for request with id :{}", requestMessageId); this.parent.completeRequestWithResponse(requestMessageId, finalResponseMessage); } else { - TRACE_LOGGER.warn("RequestRespnseLink received a message with null correlationId"); + TRACE_LOGGER.info("RequestRespnseLink received a message with null correlationId"); } }); } @@ -721,7 +721,7 @@ public void onOpenComplete(Exception completionException) { AsyncUtil.completeFuture(this.openFuture, null); this.runSendLoop(); } else { - TRACE_LOGGER.error("Opening internal send link '{}' of requestresponselink to {} failed.", this.sendLink.getName(), this.parent.linkPath, completionException); + TRACE_LOGGER.info("Opening internal send link '{}' of requestresponselink to {} failed.", this.sendLink.getName(), this.parent.linkPath, completionException); this.setClosed(); AsyncUtil.completeFuture(this.closeFuture, null); AsyncUtil.completeFutureExceptionally(this.openFuture, completionException); @@ -736,11 +736,11 @@ public void onError(Exception exception) { if (this.getIsClosingOrClosed()) { if (!this.closeFuture.isDone()) { - TRACE_LOGGER.error("Closing internal send link '{}' of requestresponselink to {} failed.", this.sendLink.getName(), this.parent.linkPath, exception); + TRACE_LOGGER.info("Closing internal send link '{}' of requestresponselink to {} failed.", this.sendLink.getName(), this.parent.linkPath, exception); AsyncUtil.completeFutureExceptionally(this.closeFuture, exception); } } else { - TRACE_LOGGER.warn("Internal send link '{}' of requestresponselink to '{}' encountered error.", this.sendLink.getName(), this.parent.linkPath, exception); + TRACE_LOGGER.info("Internal send link '{}' of requestresponselink to '{}' encountered error.", this.sendLink.getName(), this.parent.linkPath, exception); this.parent.underlyingFactory.deregisterForConnectionError(this.sendLink); this.matchingReceiveLink.close(); this.parent.underlyingFactory.deregisterForConnectionError(this.matchingReceiveLink); @@ -870,11 +870,11 @@ private void runSendLoop() { this.availableCredit.decrementAndGet(); TRACE_LOGGER.debug("RequestResponseLink {} internal sender sent a request. available credit :{}", this.parent.linkPath, this.availableCredit.get()); } catch (Exception e) { - TRACE_LOGGER.error("RequestResponseLink {} failed to send request with request id:{}.", this.parent.linkPath, requestIdToBeSent, e); + TRACE_LOGGER.info("RequestResponseLink {} failed to send request with request id:{}.", this.parent.linkPath, requestIdToBeSent, e); this.parent.exceptionallyCompleteRequest(requestIdToBeSent, e, false); } } else { - TRACE_LOGGER.warn("Request with id:{} not found in the requestresponse link.", requestIdToBeSent); + TRACE_LOGGER.info("Request with id:{} not found in the requestresponse link.", requestIdToBeSent); } } } finally { diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLinkCache.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLinkCache.java index ff758a2fecd7..caa51d7786d1 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLinkCache.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLinkCache.java @@ -133,7 +133,7 @@ private void createRequestResponseLinkAsync() { } } else { Throwable cause = ExceptionUtil.extractAsyncCompletionCause(ex); - TRACE_LOGGER.error("Creating requestresponselink to '{}' failed.", requestResponseLinkPath, cause); + TRACE_LOGGER.info("Creating requestresponselink to '{}' failed.", requestResponseLinkPath, cause); RequestResponseLinkCache.this.removeWrapperFromCache(this.entityPath); this.completeWaiters(cause); } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/SASUtil.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/SASUtil.java index 13b14158f06d..7cb20ef8f10b 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/SASUtil.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/SASUtil.java @@ -65,7 +65,7 @@ public static String generateSharedAccessSignatureToken(String sasKeyName, Strin // These exceptions shouldn't occur. String errorMessage = "UTF-8 encoding or HMACSHA256 algorithm is missing in the java runtime."; Marker fatalMarker = MarkerFactory.getMarker(ClientConstants.FATAL_MARKER); - TRACE_LOGGER.error(fatalMarker, errorMessage, e); + TRACE_LOGGER.info(fatalMarker, errorMessage, e); throw new RuntimeException(errorMessage); } } diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java index 3e3866fe23e9..2ca359ba36db 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java @@ -345,7 +345,7 @@ static int encodeMessageToCustomArray(Message message, byte[] encodedBytes, int // Pass little less than client timeout to the server so client doesn't time out before server times out public static Duration adjustServerTimeout(Duration clientTimeout) { - return clientTimeout.minusMillis(100); + return clientTimeout.minusMillis(200); } // This is not super stable for some reason diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/ManagedIdentityTokenProvider.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/ManagedIdentityTokenProvider.java index c1fd698084af..7feddda66786 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/ManagedIdentityTokenProvider.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/ManagedIdentityTokenProvider.java @@ -33,10 +33,10 @@ public CompletableFuture getSecurityTokenAsync(String audience) { Date expiry = SecurityToken.getExpirationDateTimeUtcFromToken(rawToken); tokenGeneratingFuture.complete(new SecurityToken(SecurityTokenType.JWT, audience, rawToken, Instant.now(), expiry.toInstant())); } catch (IOException e) { - TRACE_LOGGER.error("ManagedIdentity token generation failed.", e); + TRACE_LOGGER.info("ManagedIdentity token generation failed.", e); tokenGeneratingFuture.completeExceptionally(e); } catch (ParseException e) { - TRACE_LOGGER.error("Could not parse the expiry time from the Managed Identity token string.", e); + TRACE_LOGGER.info("Could not parse the expiry time from the Managed Identity token string.", e); tokenGeneratingFuture.completeExceptionally(e); } }); diff --git a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/SharedAccessSignatureTokenProvider.java b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/SharedAccessSignatureTokenProvider.java index eb7c2daab14b..d90c14814acf 100644 --- a/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/SharedAccessSignatureTokenProvider.java +++ b/sdk/servicebus/microsoft-azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/SharedAccessSignatureTokenProvider.java @@ -80,7 +80,7 @@ public CompletableFuture getSecurityTokenAsync(String audience) { String genereatedSASToken = SASUtil.generateSharedAccessSignatureToken(this.sasKeyName, this.sasKey, audience, this.tokenValidityInSeconds); tokenGeneratingFuture.complete(new SecurityToken(SecurityTokenType.SAS, audience, genereatedSASToken, Instant.now(), Instant.now().plus(Duration.ofSeconds(this.tokenValidityInSeconds)))); } catch (InvalidKeyException e) { - TRACE_LOGGER.error("SharedAccessSignature token generation failed.", e); + TRACE_LOGGER.info("SharedAccessSignature token generation failed.", e); tokenGeneratingFuture.completeExceptionally(e); } }); diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md index deed59e9afaa..5c80de593de2 100644 --- a/sdk/storage/azure-storage-blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -21,26 +21,32 @@ definition, such as text or binary data. com.azure azure-storage-blob - 12.0.0-preview.3 + 12.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +Storage Blob to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-storage-blob + + + com.azure + azure-core-http-netty + + -``` -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. - -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp @@ -154,18 +160,18 @@ BlobServiceClient blobServiceClient = new BlobServiceClientBuilder() .buildClient(); ``` -### Create ContainerClient +### Create BlobContainerClient -Create a ContainerClient if a BlobServiceClient exists. +Create a BlobContainerClient if a BlobServiceClient exists. ```java -ContainerClient containerClient = blobServiceClient.getContainerClient("mycontainer"); +BlobContainerClient blobContainerClient = blobServiceClient.getContainerClient("mycontainer"); ``` or -Create the ContainerClient from the builder [`sasToken`](#get-credentials) generated above. +Create the BlobContainerClient from the builder [`sasToken`](#get-credentials) generated above. ```java -ContainerClient containerClient = new ContainerClientBuilder() +BlobContainerClient blobContainerClient = new BlobContainerClientBuilder() .endpoint("") .credential("") .containerName("mycontainer") @@ -176,7 +182,7 @@ ContainerClient containerClient = new ContainerClientBuilder() Create a BlobClient if container client exists. ```java -BlobClient blobClient = containerClient.getBlobClient("myblob"); +BlobClient blobClient = blobContainerClient.getBlobClient("myblob"); ``` or @@ -200,17 +206,17 @@ blobServiceClient.createContainer("mycontainer"); or -Create a container using ContainerClient. +Create a container using BlobContainerClient. ```java -containerClient.create(); +blobContainerClient.create(); ``` ### Uploading a blob from a stream -Upload data stream to a blob using BlockBlobClient generated from a ContainerClient. +Upload data stream to a blob using BlockBlobClient generated from a BlobContainerClient. ```java -BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob"); +BlockBlobClient blockBlobClient = blobContainerClient.getBlockBlobClient("myblockblob"); String dataSample = "samples"; try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBytes())) { blockBlobClient.upload(dataStream, dataSample.length()); @@ -219,10 +225,10 @@ try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBy ### Uploading a blob from `File` -Upload a file to a blob using BlockBlobClient generated from ContainerClient. +Upload a file to a blob using BlockBlobClient generated from BlobContainerClient. ```java -BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob"); +BlockBlobClient blockBlobClient = blobContainerClient.getBlockBlobClient("myblockblob"); blockBlobClient.uploadFromFile("local-file.jpg"); ``` @@ -245,9 +251,9 @@ blobClient.downloadToFile("downloaded-file.jpg"); ### Enumerating blobs -Enumerating all blobs using ContainerClient +Enumerating all blobs using BlobContainerClient ```java -containerClient.listBlobsFlat() +blobContainerClient.listBlobsFlat() .forEach( blobItem -> System.out.println("This is the blob name: " + blobItem.getName()) ); diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 82af21f3a713..a9c6c14e255c 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -123,6 +123,15 @@ + + src/main/java + src/test/java + + + ${basedir}/src/test/resources + + + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BaseBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BaseBlobClientBuilder.java index 1a90f9c5b76b..3c8926c8133f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BaseBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BaseBlobClientBuilder.java @@ -3,6 +3,7 @@ package com.azure.storage.blob; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; @@ -10,32 +11,60 @@ import com.azure.storage.common.Constants; import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; -abstract class BaseBlobClientBuilder> extends BaseClientBuilder { +/** + * Base builder for Azure Storage Blobs. + * @param Generic type that extends {@link BaseClientBuilder}. + */ +public abstract class BaseBlobClientBuilder> extends BaseClientBuilder { private static final String BLOB_ENDPOINT_MIDFIX = "blob"; - protected CpkInfo cpk; + protected CpkInfo customerProvidedKey; - @SuppressWarnings("unchecked") + /** + * Sets the {@link CustomerProvidedKey customer provided key} that is used to encrypt blob contents on the server. + * + * @param key Customer provided key containing the encryption key + * @return the updated builder object + */ public T customerProvidedKey(CustomerProvidedKey key) { - cpk = new CpkInfo() - .setEncryptionKey(key.getKey()) - .setEncryptionKeySha256(key.getKeySHA256()) - .setEncryptionAlgorithm(key.getEncryptionAlgorithm()); + if (key == null) { + customerProvidedKey = null; + } else { + customerProvidedKey = new CpkInfo() + .setEncryptionKey(key.getKey()) + .setEncryptionKeySha256(key.getKeySHA256()) + .setEncryptionAlgorithm(key.getEncryptionAlgorithm()); + } - return (T) this; + return getClazz().cast(this); } + /** + * Gets the {@link UserAgentPolicy user agent policy} that is used to set the User-Agent header for each request. + * + * @return the {@code UserAgentPolicy} that will be used in the {@link HttpPipeline}. + */ @Override protected final UserAgentPolicy getUserAgentPolicy() { return new UserAgentPolicy(BlobConfiguration.NAME, BlobConfiguration.VERSION, super.getConfiguration()); } + /** + * Gets the midfix used to create the resource URL. + * + * @return the Azure Storage Blob midfix. + */ @Override protected final String getServiceUrlMidfix() { return BLOB_ENDPOINT_MIDFIX; } + /** + * Configures the response validation rules that are applied to each request/response. + * + * @param builder Builder to assemble assertions together. + */ @Override protected final void applyServiceSpecificValidations(ResponseValidationPolicyBuilder builder) { // CPK diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index c6d02c831d71..baf565f95c41 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -3,14 +3,8 @@ package com.azure.storage.blob; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.implementation.http.UrlBuilder; import com.azure.core.implementation.util.FluxUtil; -import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; @@ -18,128 +12,70 @@ import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; -import com.azure.storage.blob.models.BlobStartCopyFromURLHeaders; +import com.azure.storage.blob.models.BlockBlobItem; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.RehydratePriority; -import com.azure.storage.blob.models.ReliableDownloadOptions; -import com.azure.storage.blob.models.SourceModifiedAccessConditions; -import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.blob.models.StorageException; -import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.models.CustomerProvidedKey; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.specialized.AppendBlobAsyncClient; +import com.azure.storage.blob.specialized.BlobAsyncClientBase; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.blob.specialized.PageBlobAsyncClient; +import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; -import com.azure.storage.common.SASProtocol; -import com.azure.storage.common.Utility; -import com.azure.storage.common.credentials.SharedKeyCredential; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; +import java.io.File; import java.io.IOException; -import java.io.OutputStream; import java.io.UncheckedIOException; -import java.net.MalformedURLException; -import java.net.URL; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousFileChannel; -import java.nio.file.FileAlreadyExistsException; +import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; -import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Base64; import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.UUID; +import java.util.stream.Collectors; -import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.storage.blob.PostProcessor.postProcessResponse; +import static java.nio.charset.StandardCharsets.UTF_8; /** - * Client to a blob of any type: block, append, or page. It may only be instantiated through a {@link BlobClientBuilder} - * or via the method {@link ContainerAsyncClient#getBlobAsyncClient(String)}. This class does not hold any state about a - * particular blob, but is instead a convenient way of sending appropriate requests to the resource on the service. + * This class provides a client that contains generic blob operations for Azure Storage Blobs. Operations allowed by + * the client are downloading and copying a blob, retrieving and setting metadata, retrieving and setting HTTP headers, + * and deleting and un-deleting a blob. * *

- * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please - * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. This - * client can be converted into one of these clients easily through the methods {@link #asBlockBlobAsyncClient}, {@link - * #asPageBlobAsyncClient}, and {@link #asAppendBlobAsyncClient()}. + * This client is instantiated through {@link BlobClientBuilder} or retrieved via + * {@link BlobContainerAsyncClient#getBlobAsyncClient(String) getBlobAsyncClient}. * *

- * This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link BlobServiceAsyncClient}. + * For operations on a specific blob type (i.e append, block, or page) use + * {@link #getAppendBlobAsyncClient() getAppendBlobAsyncClient}, {@link #getBlockBlobAsyncClient() + * getBlockBlobAsyncClient}, or {@link #getPageBlobAsyncClient() getPageBlobAsyncClient} to construct a client that + * allows blob specific operations. * *

* Please refer to the Azure * Docs for more information. - * - *

- * Note this client is an async client that returns reactive responses from Spring Reactor Core project - * (https://projectreactor.io/). Calling the methods in this client will NOT start the actual network - * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these - * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) -public class BlobAsyncClient { - private static final int BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE = 4 * Constants.MB; - private static final int BLOB_MAX_DOWNLOAD_BLOCK_SIZE = 100 * Constants.MB; +public class BlobAsyncClient extends BlobAsyncClientBase { + public static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; + static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; private final ClientLogger logger = new ClientLogger(BlobAsyncClient.class); - - final AzureBlobStorageImpl azureBlobStorage; - protected final String snapshot; - protected final CpkInfo cpk; - /** * Package-private constructor for use by {@link BlobClientBuilder}. * * @param azureBlobStorage the API client for blob storage */ BlobAsyncClient(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo cpk) { - this.azureBlobStorage = azureBlobStorage; - this.snapshot = snapshot; - this.cpk = cpk; - } - - /** - * Creates a new {@link BlockBlobAsyncClient} to this resource, maintaining configurations. Only do this for blobs - * that are known to be block blobs. - * - * @return A {@link BlockBlobAsyncClient} to this resource. - */ - public BlockBlobAsyncClient asBlockBlobAsyncClient() { - return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() - .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); - } - - /** - * Creates a new {@link AppendBlobAsyncClient} to this resource, maintaining configurations. Only do this for blobs - * that are known to be append blobs. - * - * @return A {@link AppendBlobAsyncClient} to this resource. - */ - public AppendBlobAsyncClient asAppendBlobAsyncClient() { - return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() - .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); - } - - /** - * Creates a new {@link PageBlobAsyncClient} to this resource, maintaining configurations. Only do this for blobs - * that are known to be page blobs. - * - * @return A {@link PageBlobAsyncClient} to this resource. - */ - public PageBlobAsyncClient asPageBlobAsyncClient() { - return new PageBlobAsyncClient(new AzureBlobStorageBuilder() - .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); + super(azureBlobStorage, snapshot, cpk); } /** @@ -148,450 +84,271 @@ public PageBlobAsyncClient asPageBlobAsyncClient() { * @param snapshot the identifier for a specific snapshot of this blob * @return a {@link BlobAsyncClient} used to interact with the specific snapshot. */ + @Override public BlobAsyncClient getSnapshotClient(String snapshot) { return new BlobAsyncClient(new AzureBlobStorageBuilder() - .url(getBlobUrl().toString()) + .url(getBlobUrl()) .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); + .build(), getSnapshotId(), getCustomerProvidedKey()); } /** - * Initializes a {@link ContainerAsyncClient} object pointing to the container this blob is in. This method does not - * create a container. It simply constructs the client to the container and offers access to methods relevant to - * containers. + * Creates a new {@link AppendBlobAsyncClient} associated to this blob. * - * @return A {@link ContainerAsyncClient} object pointing to the container containing the blob + * @return a {@link AppendBlobAsyncClient} associated to this blob. */ - public ContainerAsyncClient getContainerAsyncClient() { - BlobURLParts parts = URLParser.parse(getBlobUrl()); - return new ContainerAsyncClient(new AzureBlobStorageBuilder() - .url(String.format("%s://%s/%s", parts.getScheme(), parts.getHost(), parts.getContainerName())) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), cpk); + public AppendBlobAsyncClient getAppendBlobAsyncClient() { + return prepareBuilder().buildAppendBlobAsyncClient(); } /** - * Gets the URL of the blob represented by this client. + * Creates a new {@link BlockBlobAsyncClient} associated to this blob. * - * @return the URL. - * @throws RuntimeException If the blob is using a malformed URL. + * @return a {@link BlockBlobAsyncClient} associated to this blob. */ - public URL getBlobUrl() { - try { - UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.getUrl()); - if (snapshot != null) { - urlBuilder.setQuery("snapshot=" + snapshot); - } - return urlBuilder.toURL(); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e)); - } + public BlockBlobAsyncClient getBlockBlobAsyncClient() { + return prepareBuilder().buildBlockBlobAsyncClient(); } /** - * Gets the {@link HttpPipeline} powering this client. + * Creates a new {@link PageBlobAsyncClient} associated to this blob. * - * @return The pipeline. + * @return a {@link PageBlobAsyncClient} associated to this blob. */ - public HttpPipeline getHttpPipeline() { - return azureBlobStorage.getHttpPipeline(); + public PageBlobAsyncClient getPageBlobAsyncClient() { + return prepareBuilder().buildPageBlobAsyncClient(); } - /** - * Determines if the blob this client represents exists in the cloud. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.exists} - * - * @return true if the blob exists, false if it doesn't - */ - public Mono exists() { - return existsWithResponse().flatMap(FluxUtil::toMono); - } + private SpecializedBlobClientBuilder prepareBuilder() { + SpecializedBlobClientBuilder builder = new SpecializedBlobClientBuilder() + .pipeline(getHttpPipeline()) + .endpoint(getBlobUrl()) + .snapshot(getSnapshotId()); - /** - * Determines if the blob this client represents exists in the cloud. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.existsWithResponse} - * - * @return true if the blob exists, false if it doesn't - */ - public Mono> existsWithResponse() { - return withContext(this::existsWithResponse); - } - - Mono> existsWithResponse(Context context) { - return this.getPropertiesWithResponse(null, context) - .map(cp -> (Response) new SimpleResponse<>(cp, true)) - .onErrorResume(t -> t instanceof StorageException && ((StorageException) t).getStatusCode() == 404, t -> { - HttpResponse response = ((StorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), false)); - }); - } - - /** - * Copies the data at the source URL to a blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL} - * - *

For more information, see the - * Azure Docs

- * - * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @return A reactive response containing the copy ID for the long running operation. - */ - public Mono startCopyFromURL(URL sourceURL) { - return startCopyFromURLWithResponse(sourceURL, null, null, null, null, null).flatMap(FluxUtil::toMono); - } - - /** - * Copies the data at the source URL to a blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.startCopyFromURLWithResponse#URL-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the destination blob. - * @param priority {@link RehydratePriority} for rehydrating the blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access - * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions - * related to when the blob was changed relative to the given request. The request will fail if the specified - * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @return A reactive response containing the copy ID for the long running operation. - */ - public Mono> startCopyFromURLWithResponse(URL sourceURL, Metadata metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions) { - return withContext(context -> startCopyFromURLWithResponse(sourceURL, metadata, tier, priority, - sourceModifiedAccessConditions, destAccessConditions, context)); - } - - Mono> startCopyFromURLWithResponse(URL sourceURL, Metadata metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Context context) { - metadata = metadata == null ? new Metadata() : metadata; - sourceModifiedAccessConditions = sourceModifiedAccessConditions == null - ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; - destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; - - // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) - .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) - .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) - .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); - - return postProcessResponse(this.azureBlobStorage.blobs().startCopyFromURLWithRestResponseAsync( - null, null, sourceURL, null, metadata, tier, priority, null, sourceConditions, - destAccessConditions.getModifiedAccessConditions(), destAccessConditions.getLeaseAccessConditions(), - context)) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); - } - - /** - * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String} - * - *

For more information, see the - * Azure Docs

- * - * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link - * BlobStartCopyFromURLHeaders} object. - * @return A reactive response signalling completion. - */ - public Mono abortCopyFromURL(String copyId) { - return abortCopyFromURLWithResponse(copyId, null).flatMap(FluxUtil::toMono); - } - - /** - * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link - * BlobStartCopyFromURLHeaders} object. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @return A reactive response signalling completion. - */ - public Mono> abortCopyFromURLWithResponse(String copyId, - LeaseAccessConditions leaseAccessConditions) { - return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context)); - } + CpkInfo cpk = getCustomerProvidedKey(); + if (cpk != null) { + builder.customerProvidedKey(new CustomerProvidedKey(cpk.getEncryptionKey())); + } - Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, - Context context) { - return postProcessResponse(this.azureBlobStorage.blobs().abortCopyFromURLWithRestResponseAsync( - null, null, copyId, null, null, leaseAccessConditions, context)) - .map(response -> new SimpleResponse<>(response, null)); + return builder; } /** - * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * Creates a new block blob, or updates the content of an existing block blob. + *

+ * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported + * with this method; the content of the existing blob is overwritten with the new content. To perform a partial + * update of a block blob's, use {@link BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and {@link + * BlockBlobAsyncClient#commitBlockList(List)}. For more information, see the + * Azure Docs for Put Block and the + * Azure Docs for Put Block List. + *

+ * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when + * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * support uploading any arbitrary data source, including network streams. This behavior is possible because this + * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while + * this method may offer additional convenience, it will not be as performant as other options, which should be + * preferred when possible. + *

+ * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the + * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs + * for a given scenario. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL} - * - *

For more information, see the - * Azure Docs

+ * {@codesnippet com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions} * - * @param copySource The source URL to copy from. - * @return A reactive response containing the copy ID for the long running operation. + * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the + * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected + * to produce the same values across subscriptions. + * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. + * @return A reactive response containing the information of the uploaded block blob. */ - public Mono copyFromURL(URL copySource) { - return copyFromURLWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); + public Mono upload(Flux data, ParallelTransferOptions parallelTransferOptions) { + return this.uploadWithResponse(data, parallelTransferOptions, null, null, null, null).flatMap(FluxUtil::toMono); } /** - * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * Creates a new block blob, or updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with this method; the content of + * the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use {@link + * BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and + * {@link BlockBlobAsyncClient#commitBlockList(List)}, which this method uses internally. For more information, + * see the Azure + * Docs for Put Block and the Azure + * Docs for Put Block List. + *

+ * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when + * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should + * support uploading any arbitrary data source, including network streams. This behavior is possible because this + * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while + * this method may offer additional convenience, it will not be as performant as other options, which should be + * preferred when possible. + *

+ * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the + * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The + * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs + * for a given scenario. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#URL-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

+ * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions} * - * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @param metadata {@link Metadata} + * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the + * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected + * to produce the same values across subscriptions. + * @param parallelTransferOptions {@link ParallelTransferOptions} used to configure buffered uploading. + * @param headers {@link BlobHTTPHeaders} + * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access - * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions - * related to when the blob was changed relative to the given request. The request will fail if the specified - * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @return A reactive response containing the copy ID for the long running operation. - */ - public Mono> copyFromURLWithResponse(URL copySource, Metadata metadata, AccessTier tier, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions) { - return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, - sourceModifiedAccessConditions, destAccessConditions, context)); - } - - Mono> copyFromURLWithResponse(URL copySource, Metadata metadata, AccessTier tier, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, - Context context) { - metadata = metadata == null ? new Metadata() : metadata; - sourceModifiedAccessConditions = sourceModifiedAccessConditions == null - ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; - destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; - - // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() - .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) - .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) - .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) - .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); - - return postProcessResponse(this.azureBlobStorage.blobs().copyFromURLWithRestResponseAsync( - null, null, copySource, null, metadata, tier, null, sourceConditions, - destAccessConditions.getModifiedAccessConditions(), destAccessConditions.getLeaseAccessConditions(), - context)) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); - } - - /** - * Reads the entire blob. Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or - * {@link AppendBlobClient}. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.download} - * - *

For more information, see the - * Azure Docs

- * - * @return A reactive response containing the blob data. - */ - public Mono> download() { - return downloadWithResponse(null, null, null, false).flatMap(FluxUtil::toMono); - } - - /** - * Reads a range of bytes from a blob. Uploading data must be done from the {@link BlockBlobClient}, {@link - * PageBlobClient}, or {@link AppendBlobClient}. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.downloadWithResponse#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean} - * - *

For more information, see the - * Azure Docs

- * - * @param range {@link BlobRange} - * @param options {@link ReliableDownloadOptions} * @param accessConditions {@link BlobAccessConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @return A reactive response containing the blob data. - */ - public Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { - return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, - context)); - } + * @return A reactive response containing the information of the uploaded block blob. + */ + public Mono> uploadWithResponse(Flux data, + ParallelTransferOptions parallelTransferOptions, BlobHTTPHeaders headers, Map metadata, + AccessTier tier, BlobAccessConditions accessConditions) { + // TODO: Parallelism parameter? Or let Reactor handle it? + // TODO: Sample/api reference + Objects.requireNonNull(data, "data must not be null"); + BlobAccessConditions accessConditionsFinal = accessConditions == null + ? new BlobAccessConditions() : accessConditions; + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() : parallelTransferOptions; + int blockSize = finalParallelTransferOptions.getBlockSize(); + int numBuffers = finalParallelTransferOptions.getNumBuffers(); + + // TODO: Progress reporting. + // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. + /*AtomicLong totalProgress = new AtomicLong(0); + Lock progressLock = new ReentrantLock();*/ + + // Validation done in the constructor. + UploadBufferPool pool = new UploadBufferPool(numBuffers, blockSize); + + /* + Break the source Flux into chunks that are <= chunk size. This makes filling the pooled buffers much easier + as we can guarantee we only need at most two buffers for any call to write (two in the case of one pool buffer + filling up with more data to write). We use flatMapSequential because we need to guarantee we preserve the + ordering of the buffers, but we don't really care if one is split before another. + */ + Flux chunkedSource = data.flatMapSequential(buffer -> { + if (buffer.remaining() <= blockSize) { + return Flux.just(buffer); + } + int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); + return Flux.range(0, numSplits) + .map(i -> { + ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); + duplicate.position(i * blockSize); + duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); + return duplicate; + }); + }); - Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { - return download(range, accessConditions, rangeGetContentMD5, context) - .map(response -> new SimpleResponse<>( - response.getRawResponse(), - response.body(options).switchIfEmpty(Flux.just(ByteBuffer.wrap(new byte[0]))))); - } + /* + Write to the pool and upload the output. + */ + return chunkedSource.concatMap(pool::write) + .concatWith(Flux.defer(pool::flush)) + .flatMapSequential(buffer -> { + // Report progress as necessary. + /*Flux progressData = ProgressReporter.addParallelProgressReporting(Flux.just(buffer), + optionsReal.progressReceiver(), progressLock, totalProgress);*/ - /** - * Reads a range of bytes from a blob. The response also includes the blob's properties and metadata. For more - * information, see the Azure Docs. - *

- * Note that the response body has reliable download functionality built in, meaning that a failed download stream - * will be automatically retried. This behavior may be configured with {@link ReliableDownloadOptions}. - * - * @param range {@link BlobRange} - * @param accessConditions {@link BlobAccessConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @return Emits the successful response. - */ - Mono download(BlobRange range, BlobAccessConditions accessConditions, - boolean rangeGetContentMD5) { - return withContext(context -> download(range, accessConditions, rangeGetContentMD5, context)); - } + final String blockId = Base64.getEncoder().encodeToString( + UUID.randomUUID().toString().getBytes(UTF_8)); - Mono download(BlobRange range, BlobAccessConditions accessConditions, - boolean rangeGetContentMD5, Context context) { - range = range == null ? new BlobRange(0) : range; - Boolean getMD5 = rangeGetContentMD5 ? rangeGetContentMD5 : null; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - HTTPGetterInfo info = new HTTPGetterInfo() - .setOffset(range.getOffset()) - .setCount(range.getCount()) - .setETag(accessConditions.getModifiedAccessConditions().getIfMatch()); + return getBlockBlobAsyncClient().stageBlockWithResponse(blockId, Flux.just(buffer), buffer.remaining(), + accessConditionsFinal.getLeaseAccessConditions()) + // We only care about the stageBlock insofar as it was successful, but we need to collect the ids. + .map(x -> { + pool.returnBuffer(buffer); + return blockId; + }).flux(); - // TODO: range is BlobRange but expected as String - // TODO: figure out correct response - return postProcessResponse(this.azureBlobStorage.blobs().downloadWithRestResponseAsync( - null, null, snapshot, null, range.toHeaderValue(), getMD5, null, null, - accessConditions.getLeaseAccessConditions(), cpk, accessConditions.getModifiedAccessConditions(), context)) - // Convert the autorest response to a DownloadAsyncResponse, which enable reliable download. - .map(response -> { - // If there wasn't an etag originally specified, lock on the one returned. - info.setETag(response.getDeserializedHeaders().getETag()); - return new DownloadAsyncResponse(response, info, - // In the event of a stream failure, make a new request to pick up where we left off. - newInfo -> - this.download(new BlobRange(newInfo.getOffset(), newInfo.getCount()), - new BlobAccessConditions().setModifiedAccessConditions( - new ModifiedAccessConditions().setIfMatch(info.getETag())), false, context)); - }); - } + }) // TODO: parallelism? + .collect(Collectors.toList()) + .flatMap(ids -> + getBlockBlobAsyncClient().commitBlockListWithResponse(ids, headers, metadata, tier, accessConditions)); + } /** - * Downloads the entire blob into a file specified by the path. - * - *

The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} - * will be thrown.

- * - *

Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link - * AppendBlobClient}.

+ * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified + * file. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.downloadToFile#String} - * - *

For more information, see the - * Azure Docs

+ * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String} * - * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. + * @param filePath Path to the upload file * @return An empty response */ - public Mono downloadToFile(String filePath) { - return downloadToFile(filePath, null, BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE, null, null, false); + public Mono uploadFromFile(String filePath) { + return uploadFromFile(filePath, null, null, null, null, null); } /** - * Downloads the entire blob into a file specified by the path. - * - *

The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} - * will be thrown.

- * - *

Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link - * AppendBlobClient}.

- * - *

This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra - * call, - * provide the {@link BlobRange} parameter.

+ * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified + * file. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean} - * - *

For more information, see the - * Azure Docs

+ * {@codesnippet com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions} * - * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. - * @param range {@link BlobRange} - * @param blockSize the size of a chunk to download at a time, in bytes - * @param options {@link ReliableDownloadOptions} + * @param filePath Path to the upload file + * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel + * transfers parameter is ignored. + * @param headers {@link BlobHTTPHeaders} + * @param metadata Metadata to associate with the blob. + * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobAccessConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @return An empty response - * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB. - * @throws UncheckedIOException If an I/O error occurs. - */ - public Mono downloadToFile(String filePath, BlobRange range, Integer blockSize, - ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { - return withContext(context -> downloadToFile(filePath, range, blockSize, options, accessConditions, - rangeGetContentMD5, context)); - } - - Mono downloadToFile(String filePath, BlobRange range, Integer blockSize, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { - if (blockSize != null) { - Utility.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_DOWNLOAD_BLOCK_SIZE); - } - - return Mono.using(() -> downloadToFileResourceSupplier(filePath), - channel -> Mono.justOrEmpty(range) - .switchIfEmpty(getFullBlobRange(accessConditions)) - .flatMapMany(rg -> Flux.fromIterable(sliceBlobRange(rg, blockSize))) - .flatMap(chunk -> this.download(chunk, accessConditions, rangeGetContentMD5, context) - .subscribeOn(Schedulers.elastic()) - .flatMap(dar -> FluxUtil.writeFile(dar.body(options), channel, - chunk.getOffset() - (range == null ? 0 : range.getOffset())))) - .then(), this::downloadToFileCleanup); - } - - private AsynchronousFileChannel downloadToFileResourceSupplier(String filePath) { + * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB + * @throws UncheckedIOException If an I/O error occurs + */ + // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. + public Mono uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, + BlobHTTPHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() + : parallelTransferOptions; + + return Mono.using(() -> uploadFileResourceSupplier(filePath), + channel -> { + final SortedMap blockIds = new TreeMap<>(); + return Flux.fromIterable(sliceFile(filePath, finalParallelTransferOptions.getBlockSize())) + .doOnNext(chunk -> blockIds.put(chunk.getOffset(), getBlockID())) + .flatMap(chunk -> { + String blockId = blockIds.get(chunk.getOffset()); + return getBlockBlobAsyncClient() + .stageBlockWithResponse(blockId, FluxUtil.readFile(channel, chunk.getOffset(), + chunk.getCount()), chunk.getCount(), null); + }) + .then(Mono.defer(() -> getBlockBlobAsyncClient().commitBlockListWithResponse( + new ArrayList<>(blockIds.values()), headers, metadata, tier, accessConditions))) + .then() + .doOnTerminate(() -> { + try { + channel.close(); + } catch (IOException e) { + throw logger.logExceptionAsError(new UncheckedIOException(e)); + } + }); + }, this::uploadFileCleanup); + } + + + private AsynchronousFileChannel uploadFileResourceSupplier(String filePath) { try { - return AsynchronousFileChannel.open(Paths.get(filePath), StandardOpenOption.READ, StandardOpenOption.WRITE, - StandardOpenOption.CREATE_NEW); + return AsynchronousFileChannel.open(Paths.get(filePath), StandardOpenOption.READ); } catch (IOException e) { throw logger.logExceptionAsError(new UncheckedIOException(e)); } } - private void downloadToFileCleanup(AsynchronousFileChannel channel) { + private void uploadFileCleanup(AsynchronousFileChannel channel) { try { channel.close(); } catch (IOException e) { @@ -599,624 +356,21 @@ private void downloadToFileCleanup(AsynchronousFileChannel channel) { } } - private Mono getFullBlobRange(BlobAccessConditions accessConditions) { - return getPropertiesWithResponse(accessConditions).map(rb -> new BlobRange(0, rb.getValue().getBlobSize())); + private String getBlockID() { + return Base64.getEncoder().encodeToString(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8)); } - private List sliceBlobRange(BlobRange blobRange, Integer blockSize) { - if (blockSize == null) { - blockSize = BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE; - } - long offset = blobRange.getOffset(); - long length = blobRange.getCount(); - List chunks = new ArrayList<>(); - for (long pos = offset; pos < offset + length; pos += blockSize) { + private List sliceFile(String path, int blockSize) { + File file = new File(path); + assert file.exists(); + List ranges = new ArrayList<>(); + for (long pos = 0; pos < file.length(); pos += blockSize) { long count = blockSize; - if (pos + count > offset + length) { - count = offset + length - pos; + if (pos + count > file.length()) { + count = file.length() - pos; } - chunks.add(new BlobRange(pos, count)); - } - return chunks; - } - - /** - * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.delete} - * - *

For more information, see the - * Azure Docs

- * - * @return A reactive response signalling completion. - */ - public Mono delete() { - return deleteWithResponse(null, null).flatMap(FluxUtil::toMono); - } - - /** - * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} - * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being - * deleted, you must pass null. - * @param accessConditions {@link BlobAccessConditions} - * @return A reactive response signalling completion. - */ - public Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions) { - return withContext(context -> deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context)); - } - - Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - - return postProcessResponse(this.azureBlobStorage.blobs().deleteWithRestResponseAsync( - null, null, snapshot, null, deleteBlobSnapshotOptions, - null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), - context)) - .map(response -> new SimpleResponse<>(response, null)); - } - - /** - * Returns the blob's metadata and properties. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getProperties} - * - *

For more information, see the - * Azure Docs

- * - * @return A reactive response containing the blob properties and metadata. - */ - public Mono getProperties() { - return getPropertiesWithResponse(null).flatMap(FluxUtil::toMono); - } - - /** - * Returns the blob's metadata and properties. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse#BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param accessConditions {@link BlobAccessConditions} - * @return A reactive response containing the blob properties and metadata. - */ - public Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions) { - return withContext(context -> getPropertiesWithResponse(accessConditions, context)); - } - - Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - - return postProcessResponse(this.azureBlobStorage.blobs().getPropertiesWithRestResponseAsync( - null, null, snapshot, null, null, accessConditions.getLeaseAccessConditions(), cpk, - accessConditions.getModifiedAccessConditions(), context)) - .map(rb -> new SimpleResponse<>(rb, new BlobProperties(rb.getDeserializedHeaders()))); - } - - /** - * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders} - * - *

For more information, see the - * Azure Docs

- * - * @param headers {@link BlobHTTPHeaders} - * @return A reactive response signalling completion. - */ - public Mono setHTTPHeaders(BlobHTTPHeaders headers) { - return setHTTPHeadersWithResponse(headers, null).flatMap(FluxUtil::toMono); - } - - /** - * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param headers {@link BlobHTTPHeaders} - * @param accessConditions {@link BlobAccessConditions} - * @return A reactive response signalling completion. - */ - public Mono> setHTTPHeadersWithResponse(BlobHTTPHeaders headers, - BlobAccessConditions accessConditions) { - return withContext(context -> setHTTPHeadersWithResponse(headers, accessConditions, context)); - } - - Mono> setHTTPHeadersWithResponse(BlobHTTPHeaders headers, BlobAccessConditions accessConditions, - Context context) { - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - - return postProcessResponse(this.azureBlobStorage.blobs().setHTTPHeadersWithRestResponseAsync( - null, null, null, null, headers, - accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context)) - .map(response -> new SimpleResponse<>(response, null)); - } - - /** - * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - * @return A reactive response signalling completion. - */ - public Mono setMetadata(Metadata metadata) { - return setMetadataWithResponse(metadata, null).flatMap(FluxUtil::toMono); - } - - /** - * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse#Metadata-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - * @param accessConditions {@link BlobAccessConditions} - * @return A reactive response signalling completion. - */ - public Mono> setMetadataWithResponse(Metadata metadata, BlobAccessConditions accessConditions) { - return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); - } - - Mono> setMetadataWithResponse(Metadata metadata, BlobAccessConditions accessConditions, - Context context) { - metadata = metadata == null ? new Metadata() : metadata; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - - return postProcessResponse(this.azureBlobStorage.blobs().setMetadataWithRestResponseAsync( - null, null, null, metadata, null, accessConditions.getLeaseAccessConditions(), cpk, - accessConditions.getModifiedAccessConditions(), context)) - .map(response -> new SimpleResponse<>(response, null)); - } - - /** - * Creates a read-only snapshot of the blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.createSnapshot} - * - *

For more information, see the - * Azure Docs

- * - * @return A response containing a {@link BlobAsyncClient} which is used to interact with the created snapshot, use - * {@link BlobAsyncClient#getSnapshotId()} to get the identifier for the snapshot. - */ - public Mono createSnapshot() { - return createSnapshotWithResponse(null, null).flatMap(FluxUtil::toMono); - } - - /** - * Creates a read-only snapshot of the blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse#Metadata-BlobAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - * @param accessConditions {@link BlobAccessConditions} - * @return A response containing a {@link BlobAsyncClient} which is used to interact with the created snapshot, use - * {@link BlobAsyncClient#getSnapshotId()} to get the identifier for the snapshot. - */ - public Mono> createSnapshotWithResponse(Metadata metadata, - BlobAccessConditions accessConditions) { - return withContext(context -> createSnapshotWithResponse(metadata, accessConditions, context)); - } - - Mono> createSnapshotWithResponse(Metadata metadata, BlobAccessConditions accessConditions, - Context context) { - metadata = metadata == null ? new Metadata() : metadata; - accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; - - return postProcessResponse(this.azureBlobStorage.blobs().createSnapshotWithRestResponseAsync( - null, null, null, metadata, null, cpk, accessConditions.getModifiedAccessConditions(), - accessConditions.getLeaseAccessConditions(), context)) - .map(rb -> new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getSnapshot()))); - } - - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in - * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of - * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's - * etag. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier} - * - *

For more information, see the - * Azure Docs

- * - * @param tier The new tier for the blob. - * @return A reactive response signalling completion. - */ - public Mono setTier(AccessTier tier) { - return setTierWithResponse(tier, null, null).flatMap(FluxUtil::toMono); - } - - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in - * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of - * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's - * etag. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions} - * - *

For more information, see the - * Azure Docs

- * - * @param tier The new tier for the blob. - * @param priority Optional priority to set for re-hydrating blobs. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @return A reactive response signalling completion. - */ - public Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions) { - return withContext(context -> setTierWithResponse(tier, priority, leaseAccessConditions, context)); - } - - Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions, Context context) { - Utility.assertNotNull("tier", tier); - - return postProcessResponse(this.azureBlobStorage.blobs().setTierWithRestResponseAsync( - null, null, tier, null, priority, null, leaseAccessConditions, context)) - .map(response -> new SimpleResponse<>(response, null)); - } - - /** - * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.undelete} - * - *

For more information, see the - * Azure Docs

- * - * @return A reactive response signalling completion. - */ - public Mono undelete() { - return undeleteWithResponse().flatMap(FluxUtil::toMono); - } - - /** - * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse} - * - *

For more information, see the - * Azure Docs

- * - * @return A reactive response signalling completion. - */ - public Mono> undeleteWithResponse() { - return withContext(this::undeleteWithResponse); - } - - Mono> undeleteWithResponse(Context context) { - return postProcessResponse(this.azureBlobStorage.blobs().undeleteWithRestResponseAsync(null, - null, context)) - .map(response -> new SimpleResponse<>(response, null)); - } - - /** - * Returns the sku name and account kind for the account. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getAccountInfo} - * - *

For more information, see the - * Azure Docs

- * - * @return a reactor response containing the sku name and account kind. - */ - public Mono getAccountInfo() { - return getAccountInfoWithResponse().flatMap(FluxUtil::toMono); - } - - /** - * Returns the sku name and account kind for the account. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse} - * - *

For more information, see the - * Azure Docs

- * - * @return a reactor response containing the sku name and account kind. - */ - public Mono> getAccountInfoWithResponse() { - return withContext(this::getAccountInfoWithResponse); - } - - Mono> getAccountInfoWithResponse(Context context) { - return postProcessResponse( - this.azureBlobStorage.blobs().getAccountInfoWithRestResponseAsync(null, null, context)) - .map(rb -> new SimpleResponse<>(rb, new StorageAccountInfo(rb.getDeserializedHeaders()))); - } - - /** - * Generates a user delegation SAS with the specified parameters - * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime) { - return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, null /* - startTime */, null /* version */, null /*sasProtocol */, null /* ipRange */, null /* cacheControl */, null - /*contentDisposition */, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); - } - - /** - * Generates a user delegation SAS token with the specified parameters - * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange) { - return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, - version, sasProtocol, ipRange, null /* cacheControl */, null /* contentDisposition */, null /* - contentEncoding */, null /* contentLanguage */, null /* contentType */); - } - - /** - * Generates a user delegation SAS token with the specified parameters - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} - * - *

For more information, see the - * Azure - * Docs

- * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @param cacheControl An optional {@code String} cache-control header for the SAS. - * @param contentDisposition An optional {@code String} content-disposition header for the SAS. - * @param contentEncoding An optional {@code String} content-encoding header for the SAS. - * @param contentLanguage An optional {@code String} content-language header for the SAS. - * @param contentType An optional {@code String} content-type header for the SAS. - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange, String cacheControl, String contentDisposition, - String contentEncoding, String contentLanguage, String contentType) { - - BlobServiceSASSignatureValues blobServiceSASSignatureValues = new BlobServiceSASSignatureValues(version, - sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, - null /* identifier*/, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - - BlobServiceSASSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, - accountName); - - BlobServiceSASQueryParameters blobServiceSasQueryParameters = - values.generateSASQueryParameters(userDelegationKey); - - return blobServiceSasQueryParameters.encode(); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @return A string that represents the SAS token - */ - public String generateSAS(BlobSASPermission permissions, OffsetDateTime expiryTime) { - return this.generateSAS(null, permissions, expiryTime, null /* startTime */, /* identifier */ null /* - version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* contentLanguage*/, - null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier) { - return this.generateSAS(identifier, null /* permissions */, null /* expiryTime */, null /* startTime */, - null /* version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* - contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier, BlobSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { - return this.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null - /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, - null /* contentType */); - } - - /** - * Generates a SAS token with the specified parameters - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} - * - *

For more information, see the - * Azure Docs

- * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @param cacheControl An optional {@code String} cache-control header for the SAS. - * @param contentDisposition An optional {@code String} content-disposition header for the SAS. - * @param contentEncoding An optional {@code String} content-encoding header for the SAS. - * @param contentLanguage An optional {@code String} content-language header for the SAS. - * @param contentType An optional {@code String} content-type header for the SAS. - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier, BlobSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - - BlobServiceSASSignatureValues blobServiceSASSignatureValues = new BlobServiceSASSignatureValues(version, - sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, - identifier, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - - SharedKeyCredential sharedKeyCredential = - Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); - - Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); - - BlobServiceSASSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, - sharedKeyCredential.getAccountName()); - - BlobServiceSASQueryParameters blobServiceSasQueryParameters = - values.generateSASQueryParameters(sharedKeyCredential); - - return blobServiceSasQueryParameters.encode(); - } - - /** - * Sets blobServiceSASSignatureValues parameters dependent on the current blob type - */ - BlobServiceSASSignatureValues configureServiceSASSignatureValues( - BlobServiceSASSignatureValues blobServiceSASSignatureValues, String accountName) { - - // Set canonical name - blobServiceSASSignatureValues.setCanonicalName(this.azureBlobStorage.getUrl(), accountName); - - // Set snapshotId - blobServiceSASSignatureValues.setSnapshotId(getSnapshotId()); - - // Set resource - if (isSnapshot()) { - blobServiceSASSignatureValues.setResource(Constants.UrlConstants.SAS_BLOB_SNAPSHOT_CONSTANT); - } else { - blobServiceSASSignatureValues.setResource(Constants.UrlConstants.SAS_BLOB_CONSTANT); + ranges.add(new BlobRange(pos, count)); } - - return blobServiceSASSignatureValues; - } - - /** - * Gets the snapshotId for a blob resource - * - * @return A string that represents the snapshotId of the snapshot blob - */ - public String getSnapshotId() { - return this.snapshot; - } - - /** - * Determines if a blob is a snapshot - * - * @return A boolean that indicates if a blob is a snapshot - */ - public boolean isSnapshot() { - return this.snapshot != null; - } - - /** - * Get the container name. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getContainerName} - * - * @return The name of the container. - */ - public final String getContainerName() { - return URLParser.parse(this.azureBlobStorage.getUrl(), logger).getContainerName(); - } - - /** - * Get the blob name. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getBlobName} - * - * @return The name of the blob. - */ - public final String getBlobName() { - return URLParser.parse(this.azureBlobStorage.getUrl(), logger).getBlobName(); + return ranges; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index cad8bdc0199a..e9bf7b0eb152 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -3,102 +3,56 @@ package com.azure.storage.blob; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.annotation.ServiceClient; -import com.azure.core.implementation.util.FluxUtil; -import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; -import com.azure.storage.blob.models.BlobRange; -import com.azure.storage.blob.models.BlobStartCopyFromURLHeaders; -import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.RehydratePriority; -import com.azure.storage.blob.models.ReliableDownloadOptions; -import com.azure.storage.blob.models.StorageAccountInfo; -import com.azure.storage.blob.models.StorageException; -import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.IPRange; -import com.azure.storage.common.SASProtocol; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.specialized.AppendBlobClient; +import com.azure.storage.blob.specialized.BlobClientBase; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.blob.specialized.PageBlobClient; +import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder; import com.azure.storage.common.Utility; import reactor.core.publisher.Mono; import java.io.IOException; -import java.io.OutputStream; import java.io.UncheckedIOException; -import java.net.URL; -import java.nio.file.FileAlreadyExistsException; import java.time.Duration; -import java.time.OffsetDateTime; +import java.util.Map; /** - * Client to a blob of any type: block, append, or page. It may only be instantiated through a {@link BlobClientBuilder} - * or via the method {@link ContainerClient#getBlobClient(String)}. This class does not hold any state about a - * particular blob, but is instead a convenient way of sending appropriate requests to the resource on the service. + * This class provides a client that contains generic blob operations for Azure Storage Blobs. Operations allowed by + * the client are downloading and copying a blob, retrieving and setting metadata, retrieving and setting HTTP headers, + * and deleting and un-deleting a blob. * *

- * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please - * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. This - * client can be converted into one of these clients easily through the methods {@link #asBlockBlobClient}, {@link - * #asPageBlobClient}, and {@link #asAppendBlobClient}. + * This client is instantiated through {@link BlobClientBuilder} or retrieved via + * {@link BlobContainerClient#getBlobClient(String) getBlobClient}. * *

- * This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, and - * operations on the service are available on {@link BlobServiceClient}. + * For operations on a specific blob type (i.e append, block, or page) use + * {@link #getAppendBlobClient() getAppendBlobClient}, {@link #getBlockBlobClient() getBlockBlobClient}, or + * {@link #getPageBlobClient() getPageBlobClient} to construct a client that allows blob specific operations. * *

* Please refer to the Azure * Docs for more information. */ @ServiceClient(builder = BlobClientBuilder.class) -public class BlobClient { +public class BlobClient extends BlobClientBase { private final ClientLogger logger = new ClientLogger(BlobClient.class); - - private final BlobAsyncClient blobAsyncClient; + private final BlobAsyncClient client; /** * Package-private constructor for use by {@link BlobClientBuilder}. * - * @param blobAsyncClient the async blob client - */ - BlobClient(BlobAsyncClient blobAsyncClient) { - this.blobAsyncClient = blobAsyncClient; - } - - /** - * Creates a new {@link BlockBlobClient} to this resource, maintaining configurations. Only do this for blobs that - * are known to be block blobs. - * - * @return A {@link BlockBlobClient} to this resource. - */ - public BlockBlobClient asBlockBlobClient() { - return new BlockBlobClient(blobAsyncClient.asBlockBlobAsyncClient()); - } - - /** - * Creates a new {@link AppendBlobClient} to this resource, maintaining configurations. Only do this for blobs that - * are known to be append blobs. - * - * @return A {@link AppendBlobClient} to this resource. - */ - public AppendBlobClient asAppendBlobClient() { - return new AppendBlobClient(blobAsyncClient.asAppendBlobAsyncClient()); - } - - /** - * Creates a new {@link PageBlobClient} to this resource, maintaining configurations. Only do this for blobs that - * are known to be page blobs. - * - * @return A {@link PageBlobClient} to this resource. + * @param client the async blob client */ - public PageBlobClient asPageBlobClient() { - return new PageBlobClient(blobAsyncClient.asPageBlobAsyncClient()); + BlobClient(BlobAsyncClient client) { + super(client); + this.client = client; } /** @@ -107,858 +61,85 @@ public PageBlobClient asPageBlobClient() { * @param snapshot the identifier for a specific snapshot of this blob * @return a {@link BlobClient} used to interact with the specific snapshot. */ + @Override public BlobClient getSnapshotClient(String snapshot) { - return new BlobClient(blobAsyncClient.getSnapshotClient(snapshot)); - } - - /** - * Initializes a {@link ContainerClient} object pointing to the container this blob is in. This method does not - * create a container. It simply constructs the URL to the container and offers access to methods relevant to - * containers. - * - * @return A {@link ContainerClient} object pointing to the container containing the blob - */ - public ContainerClient getContainerClient() { - return new ContainerClient(blobAsyncClient.getContainerAsyncClient()); + return new BlobClient(client.getSnapshotClient(snapshot)); } /** - * Gets the URL of the blob represented by this client. + * Creates a new {@link AppendBlobClient} associated to this blob. * - * @return the URL. + * @return a {@link AppendBlobClient} associated to this blob. */ - public URL getBlobUrl() { - return blobAsyncClient.getBlobUrl(); + public AppendBlobClient getAppendBlobClient() { + return new SpecializedBlobClientBuilder() + .blobClient(this) + .buildAppendBlobClient(); } /** - * Gets the {@link HttpPipeline} powering this client. - * - * @return The pipeline. - */ - public HttpPipeline getHttpPipeline() { - return blobAsyncClient.getHttpPipeline(); - } - - /** - * Opens a blob input stream to download the blob. - *

- * - * @return An InputStream object that represents the stream to use for reading from the blob. - * @throws StorageException If a storage service error occurred. - */ - public final BlobInputStream openInputStream() { - return openInputStream(new BlobRange(0), null); - } - - /** - * Opens a blob input stream to download the specified range of the blob. - *

- * - * @param range {@link BlobRange} - * @param accessConditions An {@link BlobAccessConditions} object that represents the access conditions for the - * blob. - * @return An InputStream object that represents the stream to use for reading from the blob. - * @throws StorageException If a storage service error occurred. - */ - public final BlobInputStream openInputStream(BlobRange range, BlobAccessConditions accessConditions) { - return new BlobInputStream(blobAsyncClient, range.getOffset(), range.getCount(), accessConditions); - } - - /** - * Gets if the container this client represents exists in the cloud. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.exists} - * - * @return true if the container exists, false if it doesn't - */ - public boolean exists() { - return existsWithResponse(null, Context.NONE).getValue(); - } - - /** - * Gets if the container this client represents exists in the cloud. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.existsWithResponse#Duration-Context} - * - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return true if the container exists, false if it doesn't - */ - public Response existsWithResponse(Duration timeout, Context context) { - Mono> response = blobAsyncClient.existsWithResponse(context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Copies the data at the source URL to a blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.startCopyFromURL#URL} - * - *

For more information, see the - * Azure Docs

- * - * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @return The copy ID for the long running operation. - */ - public String startCopyFromURL(URL sourceURL) { - return startCopyFromURLWithResponse(sourceURL, null, null, null, null, null, null, Context.NONE).getValue(); - } - - /** - * Copies the data at the source URL to a blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.startCopyFromURLWithResponse#URL-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the destination blob. - * @param priority {@link RehydratePriority} for rehydrating the blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access - * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions - * related to when the blob was changed relative to the given request. The request will fail if the specified - * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The copy ID for the long running operation. - */ - public Response startCopyFromURLWithResponse(URL sourceURL, Metadata metadata, AccessTier tier, - RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, - BlobAccessConditions destAccessConditions, Duration timeout, Context context) { - Mono> response = blobAsyncClient - .startCopyFromURLWithResponse(sourceURL, metadata, tier, priority, sourceModifiedAccessConditions, - destAccessConditions, context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.abortCopyFromURL#String} - * - *

For more information, see the - * Azure Docs

- * - * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link - * BlobStartCopyFromURLHeaders} object. - */ - public void abortCopyFromURL(String copyId) { - abortCopyFromURLWithResponse(copyId, null, null, Context.NONE); - } - - /** - * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link - * BlobStartCopyFromURLHeaders} object. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, - Duration timeout, Context context) { - Mono> response = blobAsyncClient.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, - context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.copyFromURL#URL} - * - *

For more information, see the - * Azure Docs

- * - * @param copySource The source URL to copy from. - * @return The copy ID for the long running operation. - */ - public String copyFromURL(URL copySource) { - return copyFromURLWithResponse(copySource, null, null, null, null, null, Context.NONE).getValue(); - } - - /** - * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.copyFromURLWithResponse#URL-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the destination blob. - * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access - * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions - * related to when the blob was changed relative to the given request. The request will fail if the specified - * condition is not satisfied. - * @param destAccessConditions {@link BlobAccessConditions} against the destination. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The copy ID for the long running operation. - */ - public Response copyFromURLWithResponse(URL copySource, Metadata metadata, AccessTier tier, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, - Duration timeout, Context context) { - Mono> response = blobAsyncClient - .copyFromURLWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, - context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Downloads the entire blob into an output stream. Uploading data must be done from the {@link BlockBlobClient}, - * {@link PageBlobClient}, or {@link AppendBlobClient}. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.download#OutputStream} - * - *

For more information, see the - * Azure Docs

- * - * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. - * @throws UncheckedIOException If an I/O error occurs. - */ - public void download(OutputStream stream) { - downloadWithResponse(stream, null, null, null, false, null, Context.NONE); - } - - /** - * Downloads a range of bytes from a blob into an output stream. Uploading data must be done from the {@link - * BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient}. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.downloadWithResponse#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. - * @param range {@link BlobRange} - * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - * @throws UncheckedIOException If an I/O error occurs. - * @throws NullPointerException If stream is null - */ - public Response downloadWithResponse(OutputStream stream, BlobRange range, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { - Utility.assertNotNull("stream", stream); - Mono> download = blobAsyncClient - .downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context) - .flatMapMany(res -> res.getValue() - .doOnNext(bf -> { - try { - stream.write(FluxUtil.byteBufferToArray(bf)); - } catch (IOException e) { - throw logger.logExceptionAsError(new UncheckedIOException(e)); - } - }).map(bf -> res)) - .last() - .map(response -> new SimpleResponse<>(response, null)); - - return Utility.blockWithOptionalTimeout(download, timeout); - } - - /** - * Downloads the entire blob into a file specified by the path. - * - *

The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} - * will be thrown.

- * - *

Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link - * AppendBlobClient}.

- * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.downloadToFile#String} - * - *

For more information, see the - * Azure Docs

- * - * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. - * @throws UncheckedIOException If an I/O error occurs - */ - public void downloadToFile(String filePath) { - downloadToFile(filePath, null, null, null, null, false, null, Context.NONE); - } - - /** - * Downloads the entire blob into a file specified by the path. - * - *

The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} - * will be thrown.

- * - *

Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link - * AppendBlobClient}.

- * - *

This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra - * call, provide the {@link BlobRange} parameter.

- * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. - * @param range {@link BlobRange} - * @param blockSize the size of a chunk to download at a time, in bytes - * @param options {@link ReliableDownloadOptions} - * @param accessConditions {@link BlobAccessConditions} - * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @throws UncheckedIOException If an I/O error occurs - */ - public void downloadToFile(String filePath, BlobRange range, Integer blockSize, ReliableDownloadOptions options, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { - Mono download = blobAsyncClient.downloadToFile(filePath, range, blockSize, options, accessConditions, - rangeGetContentMD5, context); - - Utility.blockWithOptionalTimeout(download, timeout); - } - - /** - * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.delete} - * - *

For more information, see the - * Azure Docs

- */ - public void delete() { - deleteWithResponse(null, null, null, Context.NONE); - } - - /** - * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} - * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being - * deleted, you must pass null. - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, - BlobAccessConditions accessConditions, Duration timeout, Context context) { - Mono> response = blobAsyncClient - .deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Returns the blob's metadata and properties. - * - *

Code Samples

+ * Creates a new {@link BlockBlobClient} associated to this blob. * - * {@codesnippet com.azure.storage.blob.BlobClient.getProperties} - * - *

For more information, see the - * Azure Docs

- * - * @return The blob properties and metadata. + * @return a {@link BlockBlobClient} associated to this blob. */ - public BlobProperties getProperties() { - return getPropertiesWithResponse(null, null, Context.NONE).getValue(); + public BlockBlobClient getBlockBlobClient() { + return new SpecializedBlobClientBuilder() + .blobClient(this) + .buildBlockBlobClient(); } /** - * Returns the blob's metadata and properties. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.getPropertiesWithResponse#BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

+ * Creates a new {@link PageBlobClient} associated to this blob. * - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The blob properties and metadata. + * @return a {@link PageBlobClient} associated to this blob. */ - public Response getPropertiesWithResponse(BlobAccessConditions accessConditions, Duration timeout, - Context context) { - Mono> response = blobAsyncClient.getPropertiesWithResponse(accessConditions, context); - - return Utility.blockWithOptionalTimeout(response, timeout); + public PageBlobClient getPageBlobClient() { + return new SpecializedBlobClientBuilder() + .blobClient(this) + .buildPageBlobClient(); } /** - * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. + * Creates a new block blob, or updates the content of an existing block blob. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders} + * {@codesnippet com.azure.storage.blob.BlobClient.uploadFromFile#String} * - *

For more information, see the - * Azure Docs

- * - * @param headers {@link BlobHTTPHeaders} + * @param filePath Path of the file to upload + * @throws IOException If an I/O error occurs */ - public void setHTTPHeaders(BlobHTTPHeaders headers) { - setHTTPHeadersWithResponse(headers, null, null, Context.NONE); + public void uploadFromFile(String filePath) throws IOException { + uploadFromFile(filePath, null, null, null, null, null, null); } /** - * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. + * Creates a new block blob, or updates the content of an existing block blob. * *

Code Samples

* - * {@codesnippet com.azure.storage.blob.BlobClient.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

+ * {@codesnippet com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration} * + * @param filePath Path of the file to upload + * @param parallelTransferOptions {@link ParallelTransferOptions} to use to upload from file. Number of parallel + * transfers parameter is ignored. * @param headers {@link BlobHTTPHeaders} + * @param metadata Metadata to associate with the blob. + * @param tier {@link AccessTier} for the uploaded blob * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response setHTTPHeadersWithResponse(BlobHTTPHeaders headers, BlobAccessConditions accessConditions, - Duration timeout, Context context) { - Mono> response = blobAsyncClient - .setHTTPHeadersWithResponse(headers, accessConditions, context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.setMetadata#Metadata} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - */ - public void setMetadata(Metadata metadata) { - setMetadataWithResponse(metadata, null, null, Context.NONE); - } - - /** - * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.setMetadataWithResponse#Metadata-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response setMetadataWithResponse(Metadata metadata, BlobAccessConditions accessConditions, - Duration timeout, Context context) { - Mono> response = blobAsyncClient.setMetadataWithResponse(metadata, accessConditions, context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Creates a read-only snapshot of the blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.createSnapshot} - * - *

For more information, see the - * Azure Docs

- * - * @return A response containing a {@link BlobClient} which is used to interact with the created snapshot, use - * {@link BlobClient#getSnapshotId()} to get the identifier for the snapshot. - */ - public BlobClient createSnapshot() { - return createSnapshotWithResponse(null, null, null, Context.NONE).getValue(); - } - - - /** - * Creates a read-only snapshot of the blob. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.createSnapshotWithResponse#Metadata-BlobAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param metadata {@link Metadata} - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing a {@link BlobClient} which is used to interact with the created snapshot, use - * {@link BlobClient#getSnapshotId()} to get the identifier for the snapshot. - */ - public Response createSnapshotWithResponse(Metadata metadata, BlobAccessConditions accessConditions, - Duration timeout, Context context) { - Mono> response = blobAsyncClient - .createSnapshotWithResponse(metadata, accessConditions, context) - .map(rb -> new SimpleResponse<>(rb, new BlobClient(rb.getValue()))); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in - * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of - * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's - * etag. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.setTier#AccessTier} - * - *

For more information, see the - * Azure Docs

- * - * @param tier The new tier for the blob. - */ - public void setTier(AccessTier tier) { - setTierWithResponse(tier, null, null, null, Context.NONE); - } - - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in - * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of - * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's - * etag. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param tier The new tier for the blob. - * @param priority Optional priority to set for re-hydrating blobs. - * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does - * not match the active lease on the blob. - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response setTierWithResponse(AccessTier tier, RehydratePriority priority, - LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { - Mono> response = blobAsyncClient.setTierWithResponse(tier, priority, leaseAccessConditions, - context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.undelete} - * - *

For more information, see the - * Azure Docs

- */ - public void undelete() { - undeleteWithResponse(null, Context.NONE); - } - - /** - * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.undeleteWithResponse#Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. - */ - public Response undeleteWithResponse(Duration timeout, Context context) { - Mono> response = blobAsyncClient.undeleteWithResponse(context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Returns the sku name and account kind for the account. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.getAccountInfo} - * - *

For more information, see the - * Azure Docs

- * - * @return The sku name and account kind. - */ - public StorageAccountInfo getAccountInfo() { - return getAccountInfoWithResponse(null, Context.NONE).getValue(); - } - - /** - * Returns the sku name and account kind for the account. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.getAccountInfoWithResponse#Duration-Context} - * - *

For more information, see the - * Azure Docs

- * - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return The sku name and account kind. - */ - public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = blobAsyncClient.getAccountInfoWithResponse(context); - - return Utility.blockWithOptionalTimeout(response, timeout); - } - - /** - * Generates a user delegation SAS token with the specified parameters - * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime) { - return this.blobAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime); - } - - /** - * Generates a user delegation SAS token with the specified parameters - * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange) { - return this.blobAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, - startTime, version, sasProtocol, ipRange); - } - - /** - * Generates a user delegation SAS token with the specified parameters - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} - * - *

For more information, see the - * Azure - * Docs

- * - * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS - * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @param cacheControl An optional {@code String} cache-control header for the SAS. - * @param contentDisposition An optional {@code String} content-disposition header for the SAS. - * @param contentEncoding An optional {@code String} content-encoding header for the SAS. - * @param contentLanguage An optional {@code String} content-language header for the SAS. - * @param contentType An optional {@code String} content-type header for the SAS. - * @return A string that represents the SAS token - */ - public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - BlobSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange, String cacheControl, String contentDisposition, - String contentEncoding, String contentLanguage, String contentType) { - return this.blobAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, - startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, - contentLanguage, contentType); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @return A string that represents the SAS token - */ - public String generateSAS(OffsetDateTime expiryTime, BlobSASPermission permissions) { - return this.blobAsyncClient.generateSAS(permissions, expiryTime); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier) { - return this.blobAsyncClient.generateSAS(identifier); - } - - /** - * Generates a SAS token with the specified parameters - * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier, BlobSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { - return this.blobAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, - ipRange); - } - - /** - * Generates a SAS token with the specified parameters - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} - * - *

For more information, see the - * Azure Docs

- * - * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code BlobSASPermission} permission for the SAS - * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param startTime An optional {@code OffsetDateTime} start time for the SAS - * @param version An optional {@code String} version for the SAS - * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS - * @param cacheControl An optional {@code String} cache-control header for the SAS. - * @param contentDisposition An optional {@code String} content-disposition header for the SAS. - * @param contentEncoding An optional {@code String} content-encoding header for the SAS. - * @param contentLanguage An optional {@code String} content-language header for the SAS. - * @param contentType An optional {@code String} content-type header for the SAS. - * @return A string that represents the SAS token - */ - public String generateSAS(String identifier, BlobSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - return this.blobAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, - ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - } - - /** - * Gets the snapshotId for a blob resource - * - * @return A string that represents the snapshotId of the snapshot blob - */ - public String getSnapshotId() { - return this.blobAsyncClient.getSnapshotId(); - } - - /** - * Determines if a blob is a snapshot - * - * @return A boolean that indicates if a blob is a snapshot - */ - public boolean isSnapshot() { - return this.blobAsyncClient.isSnapshot(); - } - - /** - * Get the container name. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.getContainerName} - * - * @return The name of the container. - */ - public final String getContainerName() { - return this.blobAsyncClient.getContainerName(); - } - - /** - * Get the blob name. - * - *

Code Samples

- * - * {@codesnippet com.azure.storage.blob.BlobClient.getBlobName} - * - * @return The name of the blob. + * @throws UncheckedIOException If an I/O error occurs */ - public final String getBlobName() { - return this.blobAsyncClient.getBlobName(); + public void uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, + BlobHTTPHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, + Duration timeout) { + Mono upload = this.client.uploadFromFile( + filePath, parallelTransferOptions, headers, metadata, tier, accessConditions); + + try { + Utility.blockWithOptionalTimeout(upload, timeout); + } catch (UncheckedIOException e) { + throw logger.logExceptionAsError(e); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index a98d21b05d26..781e98116026 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -7,20 +7,18 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.PageRange; import com.azure.storage.common.credentials.SASTokenCredential; -import java.io.InputStream; + import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; -import java.util.List; import java.util.Objects; -import reactor.core.publisher.Flux; /** - * This class provides a fluent builder API to help aid the configuration and instantiation of Storage Blob clients. + * This class provides a fluent builder API to help aid the configuration and instantiation of + * {@link BlobClient BlobClients} and {@link BlobAsyncClient BlobAsyncClients} when + * {@link #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} as called + * respectively. * *

* The following information must be provided on this builder: @@ -31,23 +29,8 @@ *

  • the credential through {@code .credential()} or {@code .connectionString()} if the container is not publicly * accessible. * - * - *

    - * Once all the configurations are set on this builder use the following mapping to construct the given client: - *

      - *
    • {@link BlobClientBuilder#buildBlobClient()} - {@link BlobClient}
    • - *
    • {@link BlobClientBuilder#buildBlobAsyncClient()} - {@link BlobAsyncClient}
    • - *
    • {@link BlobClientBuilder#buildAppendBlobClient()} - {@link AppendBlobClient}
    • - *
    • {@link BlobClientBuilder#buildAppendBlobAsyncClient()} - {@link AppendBlobAsyncClient}
    • - *
    • {@link BlobClientBuilder#buildBlockBlobClient()} - {@link BlockBlobClient}
    • - *
    • {@link BlobClientBuilder#buildBlockBlobAsyncClient()} - {@link BlockBlobAsyncClient}
    • - *
    • {@link BlobClientBuilder#buildPageBlobClient()} - {@link PageBlobClient}
    • - *
    • {@link BlobClientBuilder#buildPageBlobAsyncClient()} - {@link PageBlobAsyncClient}
    • - *
    */ -@ServiceClientBuilder(serviceClients = {BlobClient.class, BlobAsyncClient.class, AppendBlobClient.class, - AppendBlobAsyncClient.class, BlockBlobClient.class, BlockBlobAsyncClient.class, PageBlobClient.class, - PageBlobAsyncClient.class}) +@ServiceClientBuilder(serviceClients = {BlobClient.class, BlobAsyncClient.class }) public final class BlobClientBuilder extends BaseBlobClientBuilder { private final ClientLogger logger = new ClientLogger(BlobClientBuilder.class); @@ -57,26 +40,12 @@ public final class BlobClientBuilder extends BaseBlobClientBuilderCode Samples

    * - * {@codesnippet com.azure.storage.blob.BlobClientBuilder.buildBlobClient} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.Builder.buildClient} * * @return a {@link BlobClient} created from the configurations in this builder. * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. */ - public BlobClient buildBlobClient() { - return new BlobClient(buildBlobAsyncClient()); + public BlobClient buildClient() { + return new BlobClient(buildAsyncClient()); } /** @@ -100,90 +69,24 @@ public BlobClient buildBlobClient() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobClientBuilder.buildBlobAsyncClient} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.Builder.buildAsyncClient} * * @return a {@link BlobAsyncClient} created from the configurations in this builder. * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. */ - public BlobAsyncClient buildBlobAsyncClient() { - return new BlobAsyncClient(constructImpl(), snapshot, cpk); - } - - /** - * Creates a {@link AppendBlobClient} based on options set in the Builder. AppendBlobClients are used to perform - * append blob specific operations such as {@link AppendBlobClient#appendBlock(InputStream, long) append block}, - * only use this when the blob is known to be an append blob. - * - * @return a {@link AppendBlobClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public AppendBlobClient buildAppendBlobClient() { - return new AppendBlobClient(buildAppendBlobAsyncClient()); - } - - /** - * Creates a {@link AppendBlobAsyncClient} based on options set in the Builder. AppendBlobAsyncClients are used to - * perform append blob specific operations such as {@link AppendBlobAsyncClient#appendBlock(Flux, long) append - * blob}, only use this when the blob is known to be an append blob. - * - * @return a {@link AppendBlobAsyncClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public AppendBlobAsyncClient buildAppendBlobAsyncClient() { - return new AppendBlobAsyncClient(constructImpl(), snapshot, cpk); - } - - /** - * Creates a {@link BlockBlobClient} based on options set in the Builder. BlockBlobClients are used to perform - * generic upload operations such as {@link BlockBlobClient#uploadFromFile(String) upload from file} and block blob - * specific operations such as {@link BlockBlobClient#stageBlock(String, InputStream, long) stage block} and {@link - * BlockBlobClient#commitBlockList(List)}, only use this when the blob is known to be a block blob. - * - * @return a {@link BlockBlobClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public BlockBlobClient buildBlockBlobClient() { - return new BlockBlobClient(buildBlockBlobAsyncClient()); - } + public BlobAsyncClient buildAsyncClient() { + Objects.requireNonNull(containerName, "'containerName' cannot be null."); + Objects.requireNonNull(blobName, "'blobName' cannot be null."); - /** - * Creates a {@link BlockBlobAsyncClient} based on options set in the Builder. BlockBlobAsyncClients are used to - * perform generic upload operations such as {@link BlockBlobAsyncClient#uploadFromFile(String) upload from file} - * and block blob specific operations such as {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, - * LeaseAccessConditions) stage block} and {@link BlockBlobAsyncClient#commitBlockList(List) commit block list}, - * only use this when the blob is known to be a block blob. - * - * @return a {@link BlockBlobAsyncClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public BlockBlobAsyncClient buildBlockBlobAsyncClient() { - return new BlockBlobAsyncClient(constructImpl(), snapshot, cpk); - } - - /** - * Creates a {@link PageBlobClient} based on options set in the Builder. PageBlobClients are used to perform page - * blob specific operations such as {@link PageBlobClient#uploadPages(PageRange, InputStream) upload pages} and - * {@link PageBlobClient#clearPages(PageRange) clear pages}, only use this when the blob is known to be a page - * blob. - * - * @return a {@link PageBlobClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public PageBlobClient buildPageBlobClient() { - return new PageBlobClient(buildPageBlobAsyncClient()); - } + HttpPipeline pipeline = super.getPipeline(); + if (pipeline == null) { + pipeline = super.buildPipeline(); + } - /** - * Creates a {@link PageBlobAsyncClient} based on options set in the Builder. PageBlobAsyncClients are used to - * perform page blob specific operations such as {@link PageBlobAsyncClient#uploadPages(PageRange, Flux) upload - * pages} and {@link PageBlobAsyncClient#clearPages(PageRange) clear pages}, only use this when the blob is known to - * be a page blob. - * - * @return a {@link PageBlobAsyncClient} created from the configurations in this builder. - * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. - */ - public PageBlobAsyncClient buildPageBlobAsyncClient() { - return new PageBlobAsyncClient(constructImpl(), snapshot, cpk); + return new BlobAsyncClient(new AzureBlobStorageBuilder() + .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) + .pipeline(pipeline) + .build(), snapshot, customerProvidedKey); } /** @@ -191,7 +94,7 @@ public PageBlobAsyncClient buildPageBlobAsyncClient() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobClientBuilder.endpoint#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.Builder.endpoint#String} * * @param endpoint URL of the service * @return the updated BlobClientBuilder object @@ -201,10 +104,10 @@ public PageBlobAsyncClient buildPageBlobAsyncClient() { public BlobClientBuilder endpoint(String endpoint) { try { URL url = new URL(endpoint); - BlobURLParts parts = URLParser.parse(url); + BlobURLParts parts = BlobURLParts.parse(url); this.endpoint = parts.getScheme() + "://" + parts.getHost(); - this.containerName = parts.getContainerName(); + this.containerName = parts.getBlobContainerName(); this.blobName = parts.getBlobName(); this.snapshot = parts.getSnapshot(); @@ -225,14 +128,14 @@ public BlobClientBuilder endpoint(String endpoint) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobClientBuilder.containerName#String} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.Builder.containerName#String} * * @param containerName the name of the container * @return the updated BlobClientBuilder object * @throws NullPointerException If {@code containerName} is {@code null} */ public BlobClientBuilder containerName(String containerName) { - this.containerName = Objects.requireNonNull(containerName); + this.containerName = Objects.requireNonNull(containerName, "'containerName' cannot be null."); return this; } @@ -244,7 +147,7 @@ public BlobClientBuilder containerName(String containerName) { * @throws NullPointerException If {@code blobName} is {@code null} */ public BlobClientBuilder blobName(String blobName) { - this.blobName = Objects.requireNonNull(blobName); + this.blobName = Objects.requireNonNull(blobName, "'blobName' cannot be null."); return this; } @@ -258,4 +161,9 @@ public BlobClientBuilder snapshot(String snapshot) { this.snapshot = snapshot; return this; } + + @Override + protected Class getClazz() { + return BlobClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java similarity index 69% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 2c70bf062037..5ed79aae5c3a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -3,60 +3,60 @@ package com.azure.storage.blob; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; +import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobItem; -import com.azure.storage.blob.models.ContainerAccessConditions; -import com.azure.storage.blob.models.ContainerAccessPolicies; -import com.azure.storage.blob.models.ContainersListBlobFlatSegmentResponse; -import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentResponse; +import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.SignedIdentifier; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.StorageException; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.specialized.BlobServiceSasQueryParameters; +import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SharedKeyCredential; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.storage.blob.PostProcessor.postProcessResponse; +import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse; /** - * Client to a container. It may only be instantiated through a {@link ContainerClientBuilder} or via the method {@link - * BlobServiceAsyncClient#getContainerAsyncClient(String)}. This class does not hold any state about a particular blob - * but is instead a convenient way of sending off appropriate requests to the resource on the service. It may also be - * used to construct URLs to blobs. + * Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method + * {@link BlobServiceAsyncClient#getBlobContainerAsyncClient(String)}. This class does not hold any state about a + * particular blob but is instead a convenient way of sending off appropriate requests to the resource on the service. + * It may also be used to construct URLs to blobs. * *

    * This client contains operations on a container. Operations on a blob are available on {@link BlobAsyncClient} through @@ -72,152 +72,26 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@ServiceClient(builder = ContainerClientBuilder.class, isAsync = true) -public final class ContainerAsyncClient { +@ServiceClient(builder = BlobContainerClientBuilder.class, isAsync = true) +public final class BlobContainerAsyncClient { public static final String ROOT_CONTAINER_NAME = "$root"; public static final String STATIC_WEBSITE_CONTAINER_NAME = "$web"; public static final String LOG_CONTAINER_NAME = "$logs"; - private final ClientLogger logger = new ClientLogger(ContainerAsyncClient.class); + private final ClientLogger logger = new ClientLogger(BlobContainerAsyncClient.class); private final AzureBlobStorageImpl azureBlobStorage; - private final CpkInfo cpk; // only used to pass down to blob clients + private final CpkInfo customerProvidedKey; // only used to pass down to blob clients /** - * Package-private constructor for use by {@link ContainerClientBuilder}. + * Package-private constructor for use by {@link BlobContainerClientBuilder}. * * @param azureBlobStorage the API client for blob storage */ - ContainerAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo cpk) { + BlobContainerAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo cpk) { this.azureBlobStorage = azureBlobStorage; - this.cpk = cpk; - } - - /** - * Creates a new {@link BlockBlobAsyncClient} object by concatenating the blobName to the end of - * ContainerAsyncClient's URL. The new BlockBlobAsyncClient uses the same request policy pipeline as the - * ContainerAsyncClient. To change the pipeline, create the BlockBlobAsyncClient and then call its WithPipeline - * method passing in the desired pipeline object. Or, call this package's NewBlockBlobAsyncClient instead of calling - * this object's NewBlockBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link BlockBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName) { - return getBlockBlobAsyncClient(blobName, null); - } - - /** - * Creates a new {@link BlockBlobAsyncClient} object by concatenating the blobName to the end of - * ContainerAsyncClient's URL. The new BlockBlobAsyncClient uses the same request policy pipeline as the - * ContainerAsyncClient. To change the pipeline, create the BlockBlobAsyncClient and then call its WithPipeline - * method passing in the desired pipeline object. Or, call this package's NewBlockBlobAsyncClient instead of calling - * this object's NewBlockBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link BlockBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName, String snapshot) { - return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); - } - - /** - * Creates creates a new PageBlobAsyncClient object by concatenating blobName to the end of ContainerAsyncClient's - * URL. The new PageBlobAsyncClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the PageBlobAsyncClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewPageBlobAsyncClient instead of calling this object's NewPageBlobAsyncClient - * method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link PageBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public PageBlobAsyncClient getPageBlobAsyncClient(String blobName) { - return getPageBlobAsyncClient(blobName, null); - } - - /** - * Creates creates a new PageBlobAsyncClient object by concatenating blobName to the end of ContainerAsyncClient's - * URL. The new PageBlobAsyncClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the PageBlobAsyncClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewPageBlobAsyncClient instead of calling this object's NewPageBlobAsyncClient - * method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link PageBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public PageBlobAsyncClient getPageBlobAsyncClient(String blobName, String snapshot) { - return new PageBlobAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); - } - - /** - * Creates creates a new AppendBlobAsyncClient object by concatenating blobName to the end of ContainerAsyncClient's - * URL. The new AppendBlobAsyncClient uses the same request policy pipeline as the ContainerAsyncClient. To change - * the pipeline, create the AppendBlobAsyncClient and then call its WithPipeline method passing in the desired - * pipeline object. Or, call this package's NewAppendBlobAsyncClient instead of calling this object's - * NewAppendBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link AppendBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName) { - return getAppendBlobAsyncClient(blobName, null); - } - - /** - * Creates creates a new AppendBlobAsyncClient object by concatenating blobName to the end of ContainerAsyncClient's - * URL. The new AppendBlobAsyncClient uses the same request policy pipeline as the ContainerAsyncClient. To change - * the pipeline, create the AppendBlobAsyncClient and then call its WithPipeline method passing in the desired - * pipeline object. Or, call this package's NewAppendBlobAsyncClient instead of calling this object's - * NewAppendBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link AppendBlobAsyncClient} object which references the blob with the specified name in this - * container. - */ - public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName, String snapshot) { - return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); + this.customerProvidedKey = cpk; } /** @@ -228,7 +102,7 @@ public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName, String sn * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String} * * @param blobName A {@code String} representing the name of the blob. * @return A new {@link BlobAsyncClient} object which references the blob with the specified name in this container. @@ -245,7 +119,7 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String-String} * * @param blobName A {@code String} representing the name of the blob. * @param snapshot the snapshot identifier for the blob. @@ -253,36 +127,31 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { */ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { return new BlobAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) + .url(Utility.appendToURLPath(getBlobContainerUrl(), blobName).toString()) .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), snapshot, cpk); + .build(), snapshot, customerProvidedKey); } /** - * Initializes a {@link BlobServiceAsyncClient} object pointing to the storage account this container is in. + * Gets the URL of the container represented by this client. * - * @return A {@link BlobServiceAsyncClient} object pointing to the specified storage account + * @return the URL. */ - public BlobServiceAsyncClient getBlobServiceAsyncClient() { - return new BlobServiceAsyncClient(new AzureBlobStorageBuilder() - .url(Utility.stripLastPathSegment(getContainerUrl()).toString()) - .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), cpk); + public String getBlobContainerUrl() { + return azureBlobStorage.getUrl(); } /** - * Gets the URL of the container represented by this client. + * Get the container name. * - * @return the URL. - * @throws RuntimeException If the container has a malformed URL. + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getBlobContainerName} + * + * @return The name of container. */ - public URL getContainerUrl() { - try { - return new URL(azureBlobStorage.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e)); - } + public String getBlobContainerName() { + return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName(); } /** @@ -294,12 +163,22 @@ public HttpPipeline getHttpPipeline() { return azureBlobStorage.getHttpPipeline(); } + /** + * Gets the {@link CpkInfo} associated with this client that will be passed to + * {@link BlobAsyncClient BlobAsyncClients} when {@link #getBlobAsyncClient(String) getBlobAsyncClient} is called. + * + * @return the customer provided key used for encryption. + */ + public CpkInfo getCustomerProvidedKey() { + return customerProvidedKey; + } + /** * Gets if the container this client represents exists in the cloud. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.exists} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.exists} * * @return true if the container exists, false if it doesn't */ @@ -312,7 +191,7 @@ public Mono exists() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.existsWithResponse} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.existsWithResponse} * * @return true if the container exists, false if it doesn't */ @@ -342,7 +221,7 @@ Mono> existsWithResponse(Context context) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.create} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.create} * * @return A reactive response signalling completion. */ @@ -357,20 +236,19 @@ public Mono create() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.createWithResponse#Metadata-PublicAccessType} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.createWithResponse#Map-PublicAccessType} * - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container. * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. * @return A reactive response signalling completion. */ - public Mono> createWithResponse(Metadata metadata, PublicAccessType accessType) { + public Mono> createWithResponse(Map metadata, PublicAccessType accessType) { return withContext(context -> createWithResponse(metadata, accessType, context)); } - Mono> createWithResponse(Metadata metadata, PublicAccessType accessType, Context context) { - metadata = metadata == null ? new Metadata() : metadata; - + Mono> createWithResponse(Map metadata, PublicAccessType accessType, + Context context) { return postProcessResponse(this.azureBlobStorage.containers().createWithRestResponseAsync( null, null, metadata, accessType, null, context)) .map(response -> new SimpleResponse<>(response, null)); @@ -383,7 +261,7 @@ Mono> createWithResponse(Metadata metadata, PublicAccessType acce * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.delete} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.delete} * * @return A reactive response signalling completion. */ @@ -398,19 +276,19 @@ public Mono delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse#ContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions} * - * @param accessConditions {@link ContainerAccessConditions} + * @param accessConditions {@link BlobContainerAccessConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link ContainerAccessConditions#getModifiedAccessConditions()} has + * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has * either {@link ModifiedAccessConditions#getIfMatch()} or {@link ModifiedAccessConditions#getIfNoneMatch()} set. */ - public Mono> deleteWithResponse(ContainerAccessConditions accessConditions) { + public Mono> deleteWithResponse(BlobContainerAccessConditions accessConditions) { return withContext(context -> deleteWithResponse(accessConditions, context)); } - Mono> deleteWithResponse(ContainerAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new ContainerAccessConditions() : accessConditions; + Mono> deleteWithResponse(BlobContainerAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; if (!validateNoEtag(accessConditions.getModifiedAccessConditions())) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until @@ -430,12 +308,12 @@ Mono> deleteWithResponse(ContainerAccessConditions accessConditio * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getProperties} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getProperties} * * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} containing the * container properties. */ - public Mono getProperties() { + public Mono getProperties() { return getPropertiesWithResponse(null).flatMap(FluxUtil::toMono); } @@ -445,21 +323,22 @@ public Mono getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions} * * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. * @return A reactive response containing the container properties. */ - public Mono> getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions) { + public Mono> getPropertiesWithResponse( + LeaseAccessConditions leaseAccessConditions) { return withContext(context -> getPropertiesWithResponse(leaseAccessConditions, context)); } - Mono> getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, + Mono> getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, Context context) { return postProcessResponse(this.azureBlobStorage.containers() .getPropertiesWithRestResponseAsync(null, null, null, leaseAccessConditions, context)) - .map(rb -> new SimpleResponse<>(rb, new ContainerProperties(rb.getDeserializedHeaders()))); + .map(rb -> new SimpleResponse<>(rb, new BlobContainerProperties(rb.getDeserializedHeaders()))); } /** @@ -468,13 +347,13 @@ Mono> getPropertiesWithResponse(LeaseAccessConditi * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.setMetadata#Metadata} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setMetadata#Map} * - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains signalling * completion. */ - public Mono setMetadata(Metadata metadata) { + public Mono setMetadata(Map metadata) { return setMetadataWithResponse(metadata, null).flatMap(FluxUtil::toMono); } @@ -484,22 +363,22 @@ public Mono setMetadata(Metadata metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse#Metadata-ContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions} * - * @param metadata {@link Metadata} - * @param accessConditions {@link ContainerAccessConditions} + * @param metadata Metadata to associate with the container. + * @param accessConditions {@link BlobContainerAccessConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link ContainerAccessConditions#getModifiedAccessConditions()} has + * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has * anything set other than {@link ModifiedAccessConditions#getIfModifiedSince()}. */ - public Mono> setMetadataWithResponse(Metadata metadata, ContainerAccessConditions accessConditions) { + public Mono> setMetadataWithResponse(Map metadata, + BlobContainerAccessConditions accessConditions) { return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); } - Mono> setMetadataWithResponse(Metadata metadata, ContainerAccessConditions accessConditions, - Context context) { - metadata = metadata == null ? new Metadata() : metadata; - accessConditions = accessConditions == null ? new ContainerAccessConditions() : accessConditions; + Mono> setMetadataWithResponse(Map metadata, + BlobContainerAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; if (!validateNoEtag(accessConditions.getModifiedAccessConditions()) || accessConditions.getModifiedAccessConditions().getIfUnmodifiedSince() != null) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until @@ -520,11 +399,11 @@ Mono> setMetadataWithResponse(Metadata metadata, ContainerAccessC * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicy} * * @return A reactive response containing the container access policy. */ - public Mono getAccessPolicy() { + public Mono getAccessPolicy() { return getAccessPolicyWithResponse(null).flatMap(FluxUtil::toMono); } @@ -535,22 +414,22 @@ public Mono getAccessPolicy() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions} * * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. * @return A reactive response containing the container access policy. */ - public Mono> getAccessPolicyWithResponse( + public Mono> getAccessPolicyWithResponse( LeaseAccessConditions leaseAccessConditions) { return withContext(context -> getAccessPolicyWithResponse(leaseAccessConditions, context)); } - Mono> getAccessPolicyWithResponse(LeaseAccessConditions leaseAccessConditions, + Mono> getAccessPolicyWithResponse(LeaseAccessConditions leaseAccessConditions, Context context) { return postProcessResponse(this.azureBlobStorage.containers().getAccessPolicyWithRestResponseAsync(null, null, null, leaseAccessConditions, context).map(response -> new SimpleResponse<>(response, - new ContainerAccessPolicies(response.getDeserializedHeaders().getBlobPublicAccess(), + new BlobContainerAccessPolicies(response.getDeserializedHeaders().getBlobPublicAccess(), response.getValue())))); } @@ -562,7 +441,7 @@ Mono> getAccessPolicyWithResponse(LeaseAccessC * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy#PublicAccessType-List} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicy#PublicAccessType-List} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -585,7 +464,7 @@ public Mono setAccessPolicy(PublicAccessType accessType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -593,19 +472,19 @@ public Mono setAccessPolicy(PublicAccessType accessType, * Please see * here * for more information. Passing null will clear all access policies. - * @param accessConditions {@link ContainerAccessConditions} + * @param accessConditions {@link BlobContainerAccessConditions} * @return A reactive response signalling completion. - * @throws UnsupportedOperationException If {@link ContainerAccessConditions#getModifiedAccessConditions()} has + * @throws UnsupportedOperationException If {@link BlobContainerAccessConditions#getModifiedAccessConditions()} has * either {@link ModifiedAccessConditions#getIfMatch()} or {@link ModifiedAccessConditions#getIfNoneMatch()} set. */ public Mono> setAccessPolicyWithResponse(PublicAccessType accessType, - List identifiers, ContainerAccessConditions accessConditions) { + List identifiers, BlobContainerAccessConditions accessConditions) { return withContext(context -> setAccessPolicyWithResponse(accessType, identifiers, accessConditions, context)); } Mono> setAccessPolicyWithResponse(PublicAccessType accessType, List identifiers, - ContainerAccessConditions accessConditions, Context context) { - accessConditions = accessConditions == null ? new ContainerAccessConditions() : accessConditions; + BlobContainerAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobContainerAccessConditions() : accessConditions; if (!validateNoEtag(accessConditions.getModifiedAccessConditions())) { // Throwing is preferred to Single.error because this will error out immediately instead of waiting until @@ -659,7 +538,7 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat} * * @return A reactive response emitting the flattened blobs. */ @@ -687,7 +566,7 @@ public PagedFlux listBlobsFlat() { * * * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat#ListBlobsOptions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions} * * @param options {@link ListBlobsOptions} * @return A reactive response emitting the listed blobs, flattened. @@ -776,7 +655,7 @@ private Mono listBlobsFlatSegment(String * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String} * * @param directory The directory to list blobs underneath * @return A reactive response emitting the prefixes and blobs. @@ -811,7 +690,7 @@ public PagedFlux listBlobsHierarchy(String directory) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions} * * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories * @param options {@link ListBlobsOptions} @@ -859,7 +738,7 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List private Mono listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options, Duration timeout) { options = options == null ? new ListBlobsOptions() : options; - if (options.getDetails().getSnapshots()) { + if (options.getDetails().getRetrieveSnapshots()) { throw logger.logExceptionAsError( new UnsupportedOperationException("Including snapshots in a hierarchical listing is not supported.")); } @@ -877,7 +756,7 @@ private Mono listBlobsHierarchySegme * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAccountInfo} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfo} * * @return A reactive response containing the account info. */ @@ -891,7 +770,7 @@ public Mono getAccountInfo() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfoWithResponse} * * @return A reactive response containing the account info. */ @@ -918,12 +797,12 @@ private boolean validateNoEtag(ModifiedAccessConditions modifiedAccessConditions * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime) { + BlobContainerSasPermission permissions, OffsetDateTime expiryTime) { return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, null, null, null, null, null, null, null, null, null); } @@ -933,17 +812,17 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange) { + BlobContainerSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange) { return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null /* cacheControl */, null /* contentDisposition */, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); @@ -954,7 +833,7 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure @@ -962,12 +841,12 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -976,17 +855,17 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange, String cacheControl, String contentDisposition, - String contentEncoding, String contentLanguage, String contentType) { - BlobServiceSASSignatureValues blobServiceSASSignatureValues = new BlobServiceSASSignatureValues(version, + BlobContainerSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange, String cacheControl, String contentDisposition, + String contentEncoding, String contentLanguage, String contentType) { + BlobServiceSasSignatureValues blobServiceSASSignatureValues = new BlobServiceSasSignatureValues(version, sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, null /* identifier*/, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - BlobServiceSASSignatureValues values = + BlobServiceSasSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, accountName); - BlobServiceSASQueryParameters blobServiceSasQueryParameters = + BlobServiceSasQueryParameters blobServiceSasQueryParameters = values.generateSASQueryParameters(userDelegationKey); return blobServiceSasQueryParameters.encode(); @@ -995,11 +874,11 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str /** * Generates a SAS token with the specified parameters * - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token */ - public String generateSAS(ContainerSASPermission permissions, OffsetDateTime expiryTime) { + public String generateSAS(BlobContainerSasPermission permissions, OffsetDateTime expiryTime) { return this.generateSAS(null, permissions, /* identifier */ expiryTime, null /* startTime */, null /* version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* contentDisposition */, null /* contentEncoding */, null /* contentLanguage */, null /*contentType*/); @@ -1021,16 +900,16 @@ public String generateSAS(String identifier) { * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ContainerSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, BlobContainerSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null /* cacheControl */, null /* contentDisposition */, null /* contentEncoding */, null /* contentLanguage */, null /*contentType*/); @@ -1041,18 +920,18 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs

    * * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -1060,10 +939,10 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ContainerSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - BlobServiceSASSignatureValues blobServiceSASSignatureValues = new BlobServiceSASSignatureValues(version, + public String generateSAS(String identifier, BlobContainerSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + BlobServiceSasSignatureValues blobServiceSASSignatureValues = new BlobServiceSasSignatureValues(version, sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, identifier, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); @@ -1072,33 +951,20 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); - BlobServiceSASSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, + BlobServiceSasSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, sharedKeyCredential.getAccountName()); - BlobServiceSASQueryParameters blobServiceSasQueryParameters = + BlobServiceSasQueryParameters blobServiceSasQueryParameters = values.generateSASQueryParameters(sharedKeyCredential); return blobServiceSasQueryParameters.encode(); } - /** - * Get the container name. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerAsyncClient.getContainerName} - * - * @return The name of container. - */ - public String getContainerName() { - return URLParser.parse(this.azureBlobStorage.getUrl(), logger).getContainerName(); - } - /** * Sets blobServiceSASSignatureValues parameters dependent on the current blob type */ - private BlobServiceSASSignatureValues configureServiceSASSignatureValues( - BlobServiceSASSignatureValues blobServiceSASSignatureValues, String accountName) { + private BlobServiceSasSignatureValues configureServiceSASSignatureValues( + BlobServiceSasSignatureValues blobServiceSASSignatureValues, String accountName) { // Set canonical name blobServiceSASSignatureValues.setCanonicalName(this.azureBlobStorage.getUrl(), accountName); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java similarity index 61% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 3aa4944e66d7..e8b37a78173b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -3,36 +3,36 @@ package com.azure.storage.blob; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.storage.blob.models.BlobContainerAccessConditions; +import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobItem; -import com.azure.storage.blob.models.ContainerAccessConditions; -import com.azure.storage.blob.models.ContainerAccessPolicies; +import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.SignedIdentifier; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; +import java.util.Map; /** - * Client to a container. It may only be instantiated through a {@link ContainerClientBuilder} or via the method {@link - * BlobServiceClient#getContainerClient(String)}. This class does not hold any state about a particular container but is - * instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used to - * construct URLs to blobs. + * Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method + * {@link BlobServiceClient#getBlobContainerClient(String)}. This class does not hold any state about a particular + * container but is instead a convenient way of sending off appropriate requests to the resource on the service. It may + * also be used to construct URLs to blobs. * *

    * This client contains operations on a container. Operations on a blob are available on {@link BlobClient} through @@ -42,134 +42,23 @@ * Please refer to the Azure * Docs for more information on containers. */ -@ServiceClient(builder = ContainerClientBuilder.class) -public final class ContainerClient { - private final ContainerAsyncClient containerAsyncClient; - - public static final String ROOT_CONTAINER_NAME = ContainerAsyncClient.ROOT_CONTAINER_NAME; - - public static final String STATIC_WEBSITE_CONTAINER_NAME = ContainerAsyncClient.STATIC_WEBSITE_CONTAINER_NAME; - - public static final String LOG_CONTAINER_NAME = ContainerAsyncClient.LOG_CONTAINER_NAME; - - /** - * Package-private constructor for use by {@link ContainerClientBuilder}. - * - * @param containerAsyncClient the async container client - */ - ContainerClient(ContainerAsyncClient containerAsyncClient) { - this.containerAsyncClient = containerAsyncClient; - } - - /** - * Creates a new {@link BlockBlobClient} object by concatenating the blobName to the end of ContainerAsyncClient's - * URL. The new BlockBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the BlockBlobClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewBlockBlobAsyncClient instead of calling this object's NewBlockBlobAsyncClient - * method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerClient.getBlockBlobClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link BlockBlobClient} object which references the blob with the specified name in this container. - */ - public BlockBlobClient getBlockBlobClient(String blobName) { - return new BlockBlobClient(containerAsyncClient.getBlockBlobAsyncClient(blobName)); - } +@ServiceClient(builder = BlobContainerClientBuilder.class) +public final class BlobContainerClient { + private final BlobContainerAsyncClient blobContainerAsyncClient; - /** - * Creates a new {@link BlockBlobClient} object by concatenating the blobName to the end of ContainerAsyncClient's - * URL. The new BlockBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the BlockBlobClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewBlockBlobAsyncClient instead of calling this object's NewBlockBlobAsyncClient - * method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerClient.getBlockBlobClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link BlockBlobClient} object which references the blob with the specified name in this container. - */ - public BlockBlobClient getBlockBlobClient(String blobName, String snapshot) { - return new BlockBlobClient(containerAsyncClient.getBlockBlobAsyncClient(blobName, snapshot)); - } - - /** - * Creates creates a new PageBlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. - * The new PageBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the pipeline, - * create the PageBlobClient and then call its WithPipeline method passing in the desired pipeline object. Or, call - * this package's NewPageBlobAsyncClient instead of calling this object's NewPageBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerClient.getPageBlobClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link PageBlobClient} object which references the blob with the specified name in this container. - */ - public PageBlobClient getPageBlobClient(String blobName) { - return new PageBlobClient(containerAsyncClient.getPageBlobAsyncClient(blobName)); - } + public static final String ROOT_CONTAINER_NAME = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; - /** - * Creates creates a new PageBlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. - * The new PageBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the pipeline, - * create the PageBlobClient and then call its WithPipeline method passing in the desired pipeline object. Or, call - * this package's NewPageBlobAsyncClient instead of calling this object's NewPageBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerClient.getPageBlobClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link PageBlobClient} object which references the blob with the specified name in this container. - */ - public PageBlobClient getPageBlobClient(String blobName, String snapshot) { - return new PageBlobClient(containerAsyncClient.getPageBlobAsyncClient(blobName, snapshot)); - } + public static final String STATIC_WEBSITE_CONTAINER_NAME = BlobContainerAsyncClient.STATIC_WEBSITE_CONTAINER_NAME; - /** - * Creates creates a new AppendBlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. - * The new AppendBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the AppendBlobClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewAppendBlobAsyncClient instead of calling this object's - * NewAppendBlobAsyncClient method. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAppendBlobClient#String} - * - * @param blobName A {@code String} representing the name of the blob. - * @return A new {@link AppendBlobClient} object which references the blob with the specified name in this - * container. - */ - public AppendBlobClient getAppendBlobClient(String blobName) { - return new AppendBlobClient(containerAsyncClient.getAppendBlobAsyncClient(blobName)); - } + public static final String LOG_CONTAINER_NAME = BlobContainerAsyncClient.LOG_CONTAINER_NAME; /** - * Creates creates a new AppendBlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. - * The new AppendBlobClient uses the same request policy pipeline as the ContainerAsyncClient. To change the - * pipeline, create the AppendBlobClient and then call its WithPipeline method passing in the desired pipeline - * object. Or, call this package's NewAppendBlobAsyncClient instead of calling this object's - * NewAppendBlobAsyncClient method. - * - *

    Code Samples

    + * Package-private constructor for use by {@link BlobContainerClientBuilder}. * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAppendBlobClient#String-String} - * - * @param blobName A {@code String} representing the name of the blob. - * @param snapshot the snapshot identifier for the blob. - * @return A new {@link AppendBlobClient} object which references the blob with the specified name in this - * container. + * @param blobContainerAsyncClient the async container client */ - public AppendBlobClient getAppendBlobClient(String blobName, String snapshot) { - return new AppendBlobClient(containerAsyncClient.getAppendBlobAsyncClient(blobName, snapshot)); + BlobContainerClient(BlobContainerAsyncClient blobContainerAsyncClient) { + this.blobContainerAsyncClient = blobContainerAsyncClient; } /** @@ -182,11 +71,11 @@ public AppendBlobClient getAppendBlobClient(String blobName, String snapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getBlobClient#String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getBlobClient#String} * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName) { - return new BlobClient(containerAsyncClient.getBlobAsyncClient(blobName)); + return new BlobClient(blobContainerAsyncClient.getBlobAsyncClient(blobName)); } /** @@ -197,23 +86,14 @@ public BlobClient getBlobClient(String blobName) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getBlobClient#String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getBlobClient#String-String} * * @param blobName A {@code String} representing the name of the blob. * @param snapshot the snapshot identifier for the blob. * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName, String snapshot) { - return new BlobClient(containerAsyncClient.getBlobAsyncClient(blobName, snapshot)); - } - - /** - * Initializes a {@link BlobServiceClient} object pointing to the storage account this container is in. - * - * @return A {@link BlobServiceClient} object pointing to the specified storage account - */ - public BlobServiceClient getBlobServiceClient() { - return new BlobServiceClient(containerAsyncClient.getBlobServiceAsyncClient()); + return new BlobClient(blobContainerAsyncClient.getBlobAsyncClient(blobName, snapshot)); } /** @@ -221,8 +101,8 @@ public BlobServiceClient getBlobServiceClient() { * * @return the URL. */ - public URL getContainerUrl() { - return containerAsyncClient.getContainerUrl(); + public String getBlobContainerUrl() { + return blobContainerAsyncClient.getBlobContainerUrl(); } /** @@ -231,7 +111,17 @@ public URL getContainerUrl() { * @return The pipeline. */ public HttpPipeline getHttpPipeline() { - return containerAsyncClient.getHttpPipeline(); + return blobContainerAsyncClient.getHttpPipeline(); + } + + /** + * Gets the {@link CpkInfo} associated with this client that will be passed to {@link BlobClient BlobClients} when + * {@link #getBlobClient(String) getBlobClient} is called. + * + * @return the customer provided key used for encryption. + */ + public CpkInfo getCustomerProvidedKey() { + return blobContainerAsyncClient.getCustomerProvidedKey(); } /** @@ -239,7 +129,7 @@ public HttpPipeline getHttpPipeline() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.exists} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.exists} * * @return true if the container exists, false if it doesn't */ @@ -251,14 +141,14 @@ public boolean exists() { * Gets if the container this client represents exists in the cloud. *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.existsWithResponse#Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.existsWithResponse#Duration-Context} * * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return true if the container exists, false if it doesn't */ public Response existsWithResponse(Duration timeout, Context context) { - Mono> response = containerAsyncClient.existsWithResponse(context); + Mono> response = blobContainerAsyncClient.existsWithResponse(context); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -270,7 +160,7 @@ public Response existsWithResponse(Duration timeout, Context context) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.create} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.create} */ public void create() { createWithResponse(null, null, null, Context.NONE); @@ -283,19 +173,18 @@ public void create() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.createWithResponse#Metadata-PublicAccessType-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.createWithResponse#Map-PublicAccessType-Duration-Context} * - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container. * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ - public Response createWithResponse(Metadata metadata, PublicAccessType accessType, Duration timeout, - Context context) { - Mono> response = containerAsyncClient.createWithResponse(metadata, accessType, context); - + public Response createWithResponse(Map metadata, PublicAccessType accessType, + Duration timeout, Context context) { + Mono> response = blobContainerAsyncClient.createWithResponse(metadata, accessType, context); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -306,7 +195,7 @@ public Response createWithResponse(Metadata metadata, PublicAccessType acc * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.delete} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.delete} */ public void delete() { deleteWithResponse(null, null, Context.NONE); @@ -319,16 +208,16 @@ public void delete() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.deleteWithResponse#ContainerAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context} * - * @param accessConditions {@link ContainerAccessConditions} + * @param accessConditions {@link BlobContainerAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ - public Response deleteWithResponse(ContainerAccessConditions accessConditions, Duration timeout, + public Response deleteWithResponse(BlobContainerAccessConditions accessConditions, Duration timeout, Context context) { - Mono> response = containerAsyncClient.deleteWithResponse(accessConditions, context); + Mono> response = blobContainerAsyncClient.deleteWithResponse(accessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -339,11 +228,11 @@ public Response deleteWithResponse(ContainerAccessConditions accessConditi * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getProperties} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getProperties} * * @return The container properties. */ - public ContainerProperties getProperties() { + public BlobContainerProperties getProperties() { return getPropertiesWithResponse(null, null, Context.NONE).getValue(); } @@ -353,7 +242,7 @@ public ContainerProperties getProperties() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context} * * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. @@ -361,9 +250,9 @@ public ContainerProperties getProperties() { * @param context Additional context that is passed through the Http pipeline during the service call. * @return The container properties. */ - public Response getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, + public Response getPropertiesWithResponse(LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { - Mono> response = containerAsyncClient + Mono> response = blobContainerAsyncClient .getPropertiesWithResponse(leaseAccessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); @@ -375,11 +264,11 @@ public Response getPropertiesWithResponse(LeaseAccessCondit * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.setMetadata#Metadata} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setMetadata#Map} * - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container. */ - public void setMetadata(Metadata metadata) { + public void setMetadata(Map metadata) { setMetadataWithResponse(metadata, null, null, Context.NONE); } @@ -389,19 +278,17 @@ public void setMetadata(Metadata metadata) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.setMetadataWithResponse#Metadata-ContainerAccessConditions-Duration-Context} - * - * @param metadata {@link Metadata} - * @param accessConditions {@link ContainerAccessConditions} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context} + * @param metadata Metadata to associate with the container. + * @param accessConditions {@link BlobContainerAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ - public Response setMetadataWithResponse(Metadata metadata, - ContainerAccessConditions accessConditions, Duration timeout, Context context) { - Mono> response = containerAsyncClient.setMetadataWithResponse(metadata, accessConditions, + public Response setMetadataWithResponse(Map metadata, + BlobContainerAccessConditions accessConditions, Duration timeout, Context context) { + Mono> response = blobContainerAsyncClient.setMetadataWithResponse(metadata, accessConditions, context); - return Utility.blockWithOptionalTimeout(response, timeout); } @@ -412,11 +299,11 @@ public Response setMetadataWithResponse(Metadata metadata, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAccessPolicy} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccessPolicy} * * @return The container access policy. */ - public ContainerAccessPolicies getAccessPolicy() { + public BlobContainerAccessPolicies getAccessPolicy() { return getAccessPolicyWithResponse(null, null, Context.NONE).getValue(); } @@ -427,7 +314,7 @@ public ContainerAccessPolicies getAccessPolicy() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context} * * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. @@ -435,9 +322,10 @@ public ContainerAccessPolicies getAccessPolicy() { * @param context Additional context that is passed through the Http pipeline during the service call. * @return The container access policy. */ - public Response getAccessPolicyWithResponse(LeaseAccessConditions leaseAccessConditions, + public Response getAccessPolicyWithResponse( + LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { - Mono> response = containerAsyncClient + Mono> response = blobContainerAsyncClient .getAccessPolicyWithResponse(leaseAccessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); @@ -451,7 +339,7 @@ public Response getAccessPolicyWithResponse(LeaseAccess * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.setAccessPolicy#PublicAccessType-List} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setAccessPolicy#PublicAccessType-List} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -473,7 +361,7 @@ public void setAccessPolicy(PublicAccessType accessType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context} * * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. @@ -481,15 +369,15 @@ public void setAccessPolicy(PublicAccessType accessType, * Please see * here * for more information. Passing null will clear all access policies. - * @param accessConditions {@link ContainerAccessConditions} + * @param accessConditions {@link BlobContainerAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ public Response setAccessPolicyWithResponse(PublicAccessType accessType, - List identifiers, ContainerAccessConditions accessConditions, + List identifiers, BlobContainerAccessConditions accessConditions, Duration timeout, Context context) { - Mono> response = containerAsyncClient + Mono> response = blobContainerAsyncClient .setAccessPolicyWithResponse(accessType, identifiers, accessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); @@ -508,7 +396,7 @@ public Response setAccessPolicyWithResponse(PublicAccessType accessType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.listBlobsFlat} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsFlat} * * @return The listed blobs, flattened. */ @@ -529,14 +417,14 @@ public PagedIterable listBlobsFlat() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.listBlobsFlat#ListBlobsOptions-Duration} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration} * * @param options {@link ListBlobsOptions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The listed blobs, flattened. */ public PagedIterable listBlobsFlat(ListBlobsOptions options, Duration timeout) { - return new PagedIterable<>(containerAsyncClient.listBlobsFlatWithOptionalTimeout(options, timeout)); + return new PagedIterable<>(blobContainerAsyncClient.listBlobsFlatWithOptionalTimeout(options, timeout)); } /** @@ -565,7 +453,7 @@ public PagedIterable listBlobsFlat(ListBlobsOptions options, Duration * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String} * * @param directory The directory to list blobs underneath * @return A reactive response emitting the prefixes and blobs. @@ -600,7 +488,7 @@ public PagedIterable listBlobsHierarchy(String directory) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration} * * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories * @param options {@link ListBlobsOptions} @@ -608,7 +496,7 @@ public PagedIterable listBlobsHierarchy(String directory) { * @return A reactive response emitting the prefixes and blobs. */ public PagedIterable listBlobsHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) { - return new PagedIterable<>(containerAsyncClient + return new PagedIterable<>(blobContainerAsyncClient .listBlobsHierarchyWithOptionalTimeout(delimiter, options, timeout)); } @@ -620,7 +508,7 @@ public PagedIterable listBlobsHierarchy(String delimiter, ListBlobsOpt * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAccountInfo#Duration} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccountInfo#Duration} * @return The account info. */ public StorageAccountInfo getAccountInfo(Duration timeout) { @@ -633,14 +521,14 @@ public StorageAccountInfo getAccountInfo(Duration timeout) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse#Duration-Context} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getAccountInfoWithResponse#Duration-Context} * * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The account info. */ public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = containerAsyncClient.getAccountInfoWithResponse(context); + Mono> response = blobContainerAsyncClient.getAccountInfoWithResponse(context); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -650,13 +538,13 @@ public Response getAccountInfoWithResponse(Duration timeout, * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime) { - return this.containerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, + BlobContainerSasPermission permissions, OffsetDateTime expiryTime) { + return this.blobContainerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime); } @@ -665,18 +553,18 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange) { - return this.containerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, + BlobContainerSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange) { + return this.blobContainerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange); } @@ -685,7 +573,7 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure @@ -693,12 +581,12 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS * @param accountName The {@code String} account name for the SAS - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -707,10 +595,10 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str * @return A string that represents the SAS token */ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, - ContainerSASPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - SASProtocol sasProtocol, IPRange ipRange, String cacheControl, String contentDisposition, - String contentEncoding, String contentLanguage, String contentType) { - return this.containerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, + BlobContainerSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange, String cacheControl, String contentDisposition, + String contentEncoding, String contentLanguage, String contentType) { + return this.blobContainerAsyncClient.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); } @@ -718,12 +606,12 @@ public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, Str /** * Generates a SAS token with the specified parameters * - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token */ - public String generateSAS(ContainerSASPermission permissions, OffsetDateTime expiryTime) { - return this.containerAsyncClient.generateSAS(permissions, expiryTime); + public String generateSAS(BlobContainerSasPermission permissions, OffsetDateTime expiryTime) { + return this.blobContainerAsyncClient.generateSAS(permissions, expiryTime); } /** @@ -733,24 +621,24 @@ public String generateSAS(ContainerSASPermission permissions, OffsetDateTime exp * @return A string that represents the SAS token */ public String generateSAS(String identifier) { - return this.containerAsyncClient.generateSAS(identifier); + return this.blobContainerAsyncClient.generateSAS(identifier); } /** * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ContainerSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { - return this.containerAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, + public String generateSAS(String identifier, BlobContainerSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { + return this.blobContainerAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange); } @@ -759,18 +647,18 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs

    * * @param identifier The {@code String} name of the access policy on the container this SAS references if any - * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param permissions The {@code BlobContainerSasPermissions} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -778,10 +666,10 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ContainerSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - return this.containerAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, + public String generateSAS(String identifier, BlobContainerSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + return this.blobContainerAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); } @@ -790,11 +678,11 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClient.getContainerName} + * {@codesnippet com.azure.storage.blob.BlobContainerClient.getBlobContainerName} * * @return The name of container. */ - public String getContainerName() { - return this.containerAsyncClient.getContainerName(); + public String getBlobContainerName() { + return this.blobContainerAsyncClient.getBlobContainerName(); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java similarity index 58% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index 0ecab1d2d279..f246c4b8e55d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -13,8 +13,9 @@ import java.util.Objects; /** - * Fluent ContainerClientBuilder for instantiating a {@link ContainerClient} or {@link ContainerAsyncClient} using - * {@link ContainerClientBuilder#buildClient()} or {@link ContainerClientBuilder#buildAsyncClient()} respectively. + * Fluent ContainerClientBuilder for instantiating a {@link BlobContainerClient} or {@link BlobContainerAsyncClient} + * using {@link BlobContainerClientBuilder#buildClient()} or {@link BlobContainerClientBuilder#buildAsyncClient()} + * respectively. * *

    * The following information must be provided on this builder: @@ -27,42 +28,42 @@ * * *

    - * Once all the configurations are set on this builder, call {@code .buildClient()} to create a {@link ContainerClient} - * or {@code .buildAsyncClient()} to create a {@link ContainerAsyncClient}. + * Once all the configurations are set on this builder, call {@code .buildClient()} to create a {@link + * BlobContainerClient} or {@code .buildAsyncClient()} to create a {@link BlobContainerAsyncClient}. */ -@ServiceClientBuilder(serviceClients = {ContainerClient.class, ContainerAsyncClient.class}) -public final class ContainerClientBuilder extends BaseBlobClientBuilder { +@ServiceClientBuilder(serviceClients = {BlobContainerClient.class, BlobContainerAsyncClient.class}) +public final class BlobContainerClientBuilder extends BaseBlobClientBuilder { - private final ClientLogger logger = new ClientLogger(ContainerClientBuilder.class); + private final ClientLogger logger = new ClientLogger(BlobContainerClientBuilder.class); private String containerName; /** - * Creates a builder instance that is able to configure and construct {@link ContainerClient ContainerClients} and - * {@link ContainerAsyncClient ContainerAsyncClients}. + * Creates a builder instance that is able to configure and construct {@link BlobContainerClient ContainerClients} + * and {@link BlobContainerAsyncClient ContainerAsyncClients}. */ - public ContainerClientBuilder() { + public BlobContainerClientBuilder() { } /** *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClientBuilder.buildClient} + * {@codesnippet com.azure.storage.blob.BlobContainerClientBuilder.buildClient} * - * @return a {@link ContainerClient} created from the configurations in this builder. + * @return a {@link BlobContainerClient} created from the configurations in this builder. */ - public ContainerClient buildClient() { - return new ContainerClient(buildAsyncClient()); + public BlobContainerClient buildClient() { + return new BlobContainerClient(buildAsyncClient()); } /** *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClientBuilder.buildAsyncClient} + * {@codesnippet com.azure.storage.blob.BlobContainerClientBuilder.buildAsyncClient} * - * @return a {@link ContainerAsyncClient} created from the configurations in this builder. + * @return a {@link BlobContainerAsyncClient} created from the configurations in this builder. */ - public ContainerAsyncClient buildAsyncClient() { + public BlobContainerAsyncClient buildAsyncClient() { Objects.requireNonNull(containerName); HttpPipeline pipeline = super.getPipeline(); @@ -70,10 +71,10 @@ public ContainerAsyncClient buildAsyncClient() { pipeline = super.buildPipeline(); } - return new ContainerAsyncClient(new AzureBlobStorageBuilder() + return new BlobContainerAsyncClient(new AzureBlobStorageBuilder() .url(String.format("%s/%s", endpoint, containerName)) .pipeline(pipeline) - .build(), cpk); + .build(), customerProvidedKey); } /** @@ -81,20 +82,20 @@ public ContainerAsyncClient buildAsyncClient() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClientBuilder.endpoint#String} + * {@codesnippet com.azure.storage.blob.BlobContainerClientBuilder.endpoint#String} * * @param endpoint URL of the service * @return the updated ContainerClientBuilder object * @throws IllegalArgumentException If {@code endpoint} is {@code null} or is a malformed URL. */ @Override - public ContainerClientBuilder endpoint(String endpoint) { + public BlobContainerClientBuilder endpoint(String endpoint) { try { URL url = new URL(endpoint); - BlobURLParts parts = URLParser.parse(url); + BlobURLParts parts = BlobURLParts.parse(url); this.endpoint = parts.getScheme() + "://" + parts.getHost(); - this.containerName = parts.getContainerName(); + this.containerName = parts.getBlobContainerName(); SASTokenCredential sasTokenCredential = SASTokenCredential .fromSASTokenString(parts.getSasQueryParameters().encode()); @@ -114,16 +115,21 @@ public ContainerClientBuilder endpoint(String endpoint) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.ContainerClientBuilder.containerName#String} + * {@codesnippet com.azure.storage.blob.BlobContainerClientBuilder.containerName#String} * * @param containerName the name of the container * @return the updated ContainerClientBuilder object */ - public ContainerClientBuilder containerName(String containerName) { + public BlobContainerClientBuilder containerName(String containerName) { this.containerName = containerName; return this; } + @Override + protected Class getClazz() { + return BlobContainerClientBuilder.class; + } + String endpoint() { return this.endpoint; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java similarity index 86% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java index eeb59f84187c..129855e14f43 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerProperties.java @@ -3,18 +3,18 @@ package com.azure.storage.blob; -import com.azure.storage.blob.models.ContainerGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ContainerGetPropertiesHeaders; import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.PublicAccessType; import java.time.OffsetDateTime; +import java.util.Map; -public final class ContainerProperties { +public final class BlobContainerProperties { - private final Metadata metadata; + private final Map metadata; private final String eTag; private final OffsetDateTime lastModified; private final LeaseDurationType leaseDuration; @@ -24,8 +24,8 @@ public final class ContainerProperties { private final boolean hasImmutabilityPolicy; private final boolean hasLegalHold; - ContainerProperties(ContainerGetPropertiesHeaders generatedResponseHeaders) { - this.metadata = new Metadata(generatedResponseHeaders.getMetadata()); + BlobContainerProperties(ContainerGetPropertiesHeaders generatedResponseHeaders) { + this.metadata = generatedResponseHeaders.getMetadata(); this.eTag = generatedResponseHeaders.getETag(); this.lastModified = generatedResponseHeaders.getLastModified(); this.leaseDuration = generatedResponseHeaders.getLeaseDuration(); @@ -39,7 +39,7 @@ public final class ContainerProperties { /** * @return the metadata associated with the container */ - public Metadata getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java new file mode 100644 index 000000000000..efa6e5605225 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerSasPermission.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob; + + +import com.azure.storage.common.SR; + +import java.util.Locale; + +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * It is possible to construct the permissions string without this class, but the order of the permissions is + * particular and this class guarantees correctness. + */ +public final class BlobContainerSasPermission { + private boolean readPermission; + + private boolean addPermission; + + private boolean createPermission; + + private boolean writePermission; + + private boolean deletePermission; + + private boolean listPermission; + + /** + * Initializes an {@code BlobContainerSasPermission} object with all fields set to false. + */ + public BlobContainerSasPermission() { + } + + /** + * Creates an {@code BlobContainerSasPermission} from the specified permissions string. This method will throw an + * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. + * + * @param permString A {@code String} which represents the {@code BlobContainerSasPermission}. + * @return A {@code BlobContainerSasPermission} generated from the given {@code String}. + * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, or l. + */ + public static BlobContainerSasPermission parse(String permString) { + BlobContainerSasPermission permissions = new BlobContainerSasPermission(); + + for (int i = 0; i < permString.length(); i++) { + char c = permString.charAt(i); + switch (c) { + case 'r': + permissions.readPermission = true; + break; + case 'a': + permissions.addPermission = true; + break; + case 'c': + permissions.createPermission = true; + break; + case 'w': + permissions.writePermission = true; + break; + case 'd': + permissions.deletePermission = true; + break; + case 'l': + permissions.listPermission = true; + break; + default: + throw new IllegalArgumentException( + String.format(Locale.ROOT, SR.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, + "Permissions", permString, c)); + } + } + return permissions; + } + + /** + * @return the read permission status + */ + public boolean getReadPermission() { + return readPermission; + } + + /** + * Sets the read permission status. + * + * @param hasReadPermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setReadPermission(boolean hasReadPermission) { + this.readPermission = hasReadPermission; + return this; + } + + /** + * @return the add permission status + */ + public boolean getAddPermission() { + return addPermission; + } + + /** + * Sets the add permission status. + * + * @param hasAddPermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setAddPermission(boolean hasAddPermission) { + this.addPermission = hasAddPermission; + return this; + } + + /** + * @return the create permission status + */ + public boolean getCreatePermission() { + return createPermission; + } + + /** + * Sets the create permission status. + * + * @param hasCreatePermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setCreatePermission(boolean hasCreatePermission) { + this.createPermission = hasCreatePermission; + return this; + } + + /** + * @return the write permission status + */ + public boolean getWritePermission() { + return writePermission; + } + + /** + * Sets the write permission status. + * + * @param hasWritePermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setWritePermission(boolean hasWritePermission) { + this.writePermission = hasWritePermission; + return this; + } + + /** + * @return the delete permission status + */ + public boolean getDeletePermission() { + return deletePermission; + } + + /** + * Sets the delete permission status. + * + * @param hasDeletePermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setDeletePermission(boolean hasDeletePermission) { + this.deletePermission = hasDeletePermission; + return this; + } + + /** + * @return the list permission status + */ + public boolean getListPermission() { + return listPermission; + } + + /** + * Sets the list permission status. + * + * @param hasListPermission Permission status to set + * @return the updated BlobContainerSasPermission object + */ + public BlobContainerSasPermission setListPermission(boolean hasListPermission) { + this.listPermission = hasListPermission; + return this; + } + + /** + * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @return A {@code String} which represents the {@code BlobContainerSasPermission}. + */ + @Override + public String toString() { + // The order of the characters should be as specified here to ensure correctness: + // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + final StringBuilder builder = new StringBuilder(); + + if (this.readPermission) { + builder.append('r'); + } + + if (this.addPermission) { + builder.append('a'); + } + + if (this.createPermission) { + builder.append('c'); + } + + if (this.writePermission) { + builder.append('w'); + } + + if (this.deletePermission) { + builder.append('d'); + } + + if (this.listPermission) { + builder.append('l'); + } + + return builder.toString(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java index a44177df0efa..40ac5ac0fea6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java @@ -4,17 +4,17 @@ package com.azure.storage.blob; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.blob.implementation.models.BlobGetPropertiesHeaders; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.ArchiveStatus; -import com.azure.storage.blob.models.BlobGetPropertiesHeaders; import com.azure.storage.blob.models.BlobType; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; -import com.azure.storage.blob.models.Metadata; import java.time.OffsetDateTime; +import java.util.Map; public final class BlobProperties { private final OffsetDateTime creationTime; @@ -46,10 +46,10 @@ public final class BlobProperties { private final ArchiveStatus archiveStatus; private final String encryptionKeySha256; private final OffsetDateTime accessTierChangeTime; - private final Metadata metadata; + private final Map metadata; private final Integer committedBlockCount; - BlobProperties(BlobGetPropertiesHeaders generatedHeaders) { + public BlobProperties(BlobGetPropertiesHeaders generatedHeaders) { this.creationTime = generatedHeaders.getCreationTime(); this.lastModified = generatedHeaders.getLastModified(); this.eTag = generatedHeaders.getETag(); @@ -79,7 +79,7 @@ public final class BlobProperties { this.archiveStatus = ArchiveStatus.fromString(generatedHeaders.getArchiveStatus()); this.encryptionKeySha256 = generatedHeaders.getEncryptionKeySha256(); this.accessTierChangeTime = generatedHeaders.getAccessTierChangeTime(); - this.metadata = new Metadata(generatedHeaders.getMetadata()); + this.metadata = generatedHeaders.getMetadata(); this.committedBlockCount = generatedHeaders.getBlobCommittedBlockCount(); } @@ -300,7 +300,7 @@ public OffsetDateTime getAccessTierChangeTime() { /** * @return the metadata associated to this blob */ - public Metadata getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java similarity index 77% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java index a5ff84ce5548..f761d3f41531 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSasPermission.java @@ -9,12 +9,11 @@ /** * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting - * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all - * the values are set, this should be serialized with toString and set as the permissions field on a {@link - * BlobServiceSASSignatureValues} object. It is possible to construct the permissions string without this class, but the - * order of the permissions is particular and this class guarantees correctness. + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. It is + * possible to construct the permissions string without this class, but the order of the permissions is particular and + * this class guarantees correctness. */ -public final class BlobSASPermission { +public final class BlobSasPermission { private boolean readPermission; @@ -27,21 +26,21 @@ public final class BlobSASPermission { private boolean deletePermission; /** - * Initializes a {@code BlobSASPermission} object with all fields set to false. + * Initializes a {@code BlobSasPermission} object with all fields set to false. */ - public BlobSASPermission() { + public BlobSasPermission() { } /** - * Creates a {@code BlobSASPermission} from the specified permissions string. This method will throw an + * Creates a {@code BlobSasPermission} from the specified permissions string. This method will throw an * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. * - * @param permString A {@code String} which represents the {@code BlobSASPermission}. - * @return A {@code BlobSASPermission} generated from the given {@code String}. + * @param permString A {@code String} which represents the {@code BlobSasPermission}. + * @return A {@code BlobSasPermission} generated from the given {@code String}. * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, or d. */ - public static BlobSASPermission parse(String permString) { - BlobSASPermission permissions = new BlobSASPermission(); + public static BlobSasPermission parse(String permString) { + BlobSasPermission permissions = new BlobSasPermission(); for (int i = 0; i < permString.length(); i++) { char c = permString.charAt(i); @@ -81,9 +80,9 @@ public boolean getReadPermission() { * Sets the read permission status. * * @param hasReadPermission Permission status to set - * @return the updated BlobSASPermission object. + * @return the updated BlobSasPermission object. */ - public BlobSASPermission setReadPermission(boolean hasReadPermission) { + public BlobSasPermission setReadPermission(boolean hasReadPermission) { this.readPermission = hasReadPermission; return this; } @@ -99,9 +98,9 @@ public boolean getAddPermission() { * Sets the add permission status. * * @param hasAddPermission Permission status to set - * @return the updated BlobSASPermission object. + * @return the updated BlobSasPermission object. */ - public BlobSASPermission setAddPermission(boolean hasAddPermission) { + public BlobSasPermission setAddPermission(boolean hasAddPermission) { this.addPermission = hasAddPermission; return this; } @@ -117,9 +116,9 @@ public boolean getCreatePermission() { * Sets the create permission status. * * @param hasCreatePermission Permission status to set - * @return the updated BlobSASPermission object. + * @return the updated BlobSasPermission object. */ - public BlobSASPermission setCreatePermission(boolean hasCreatePermission) { + public BlobSasPermission setCreatePermission(boolean hasCreatePermission) { this.createPermission = hasCreatePermission; return this; } @@ -135,9 +134,9 @@ public boolean getWritePermission() { * Sets the write permission status. * * @param hasWritePermission Permission status to set - * @return the updated BlobSASPermission object. + * @return the updated BlobSasPermission object. */ - public BlobSASPermission setWritePermission(boolean hasWritePermission) { + public BlobSasPermission setWritePermission(boolean hasWritePermission) { this.writePermission = hasWritePermission; return this; } @@ -153,9 +152,9 @@ public boolean getDeletePermission() { * Sets the delete permission status. * * @param hasDeletePermission Permission status to set - * @return the updated BlobSASPermission object. + * @return the updated BlobSasPermission object. */ - public BlobSASPermission getDeletePermission(boolean hasDeletePermission) { + public BlobSasPermission setDeletePermission(boolean hasDeletePermission) { this.deletePermission = hasDeletePermission; return this; } @@ -164,7 +163,7 @@ public BlobSASPermission getDeletePermission(boolean hasDeletePermission) { * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. * - * @return A {@code String} which represents the {@code BlobSASPermission}. + * @return A {@code String} which represents the {@code BlobSasPermission}. */ @Override public String toString() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index d24eb7056926..63e8fac4eb20 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -3,26 +3,25 @@ package com.azure.storage.blob; +import com.azure.core.annotation.ServiceClient; import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.models.ContainerItem; +import com.azure.storage.blob.implementation.models.ServicesListContainersSegmentResponse; +import com.azure.storage.blob.models.BlobContainerItem; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.KeyInfo; -import com.azure.storage.blob.models.ListContainersOptions; -import com.azure.storage.blob.models.Metadata; +import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; -import com.azure.storage.blob.models.ServicesListContainersSegmentResponse; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.StorageServiceProperties; import com.azure.storage.blob.models.StorageServiceStats; @@ -31,20 +30,19 @@ import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; import com.azure.storage.common.AccountSASSignatureValues; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SharedKeyCredential; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.Map; import java.util.function.Function; import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.storage.blob.PostProcessor.postProcessResponse; +import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse; /** * Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does @@ -52,8 +50,9 @@ * requests to the resource on the service. It may also be used to construct URLs to blobs and containers. * *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient} - * through {@link #getContainerAsyncClient(String)}, and operations on a blob are available on {@link BlobAsyncClient}. + * This client contains operations on a blob. Operations on a container are available on {@link + * BlobContainerAsyncClient} through {@link #getBlobContainerAsyncClient(String)}, and operations on a blob are + * available on {@link BlobAsyncClient}. * *

    * Please see here for more @@ -70,35 +69,35 @@ public final class BlobServiceAsyncClient { private final ClientLogger logger = new ClientLogger(BlobServiceAsyncClient.class); private final AzureBlobStorageImpl azureBlobStorage; - private final CpkInfo cpk; + private final CpkInfo customerProvidedKey; /** * Package-private constructor for use by {@link BlobServiceClientBuilder}. * * @param azureBlobStorage the API client for blob storage */ - BlobServiceAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo cpk) { + BlobServiceAsyncClient(AzureBlobStorageImpl azureBlobStorage, CpkInfo customerProvidedKey) { this.azureBlobStorage = azureBlobStorage; - this.cpk = cpk; + this.customerProvidedKey = customerProvidedKey; } /** - * Initializes a {@link ContainerAsyncClient} object pointing to the specified container. This method does not + * Initializes a {@link BlobContainerAsyncClient} object pointing to the specified container. This method does not * create a container. It simply constructs the URL to the container and offers access to methods relevant to * containers. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.getContainerAsyncClient#String} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.getBlobContainerAsyncClient#String} * * @param containerName The name of the container to point to. - * @return A {@link ContainerAsyncClient} object pointing to the specified container + * @return A {@link BlobContainerAsyncClient} object pointing to the specified container */ - public ContainerAsyncClient getContainerAsyncClient(String containerName) { - return new ContainerAsyncClient(new AzureBlobStorageBuilder() + public BlobContainerAsyncClient getBlobContainerAsyncClient(String containerName) { + return new BlobContainerAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getAccountUrl(), containerName).toString()) .pipeline(azureBlobStorage.getHttpPipeline()) - .build(), cpk); + .build(), customerProvidedKey); } /** @@ -117,13 +116,13 @@ public HttpPipeline getHttpPipeline() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.createContainer#String} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainer#String} * * @param containerName Name of the container to create - * @return A {@link Mono} containing a {@link ContainerAsyncClient} used to interact with the container created. + * @return A {@link Mono} containing a {@link BlobContainerAsyncClient} used to interact with the container created. */ - public Mono createContainer(String containerName) { - return createContainerWithResponse(containerName, null, null).flatMap(FluxUtil::toMono); + public Mono createBlobContainer(String containerName) { + return createBlobContainerWithResponse(containerName, null, null).flatMap(FluxUtil::toMono); } /** @@ -133,26 +132,26 @@ public Mono createContainer(String containerName) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.createContainerWithResponse#String-Metadata-PublicAccessType} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainerWithResponse#String-Map-PublicAccessType} * * @param containerName Name of the container to create - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains a {@link - * ContainerAsyncClient} used to interact with the container created. + * BlobContainerAsyncClient} used to interact with the container created. */ - public Mono> createContainerWithResponse(String containerName, Metadata metadata, - PublicAccessType accessType) { - return withContext(context -> createContainerWithResponse(containerName, metadata, accessType, context)); + public Mono> createBlobContainerWithResponse(String containerName, + Map metadata, PublicAccessType accessType) { + return withContext(context -> createBlobContainerWithResponse(containerName, metadata, accessType, context)); } - Mono> createContainerWithResponse(String containerName, Metadata metadata, - PublicAccessType accessType, Context context) { - ContainerAsyncClient containerAsyncClient = getContainerAsyncClient(containerName); + Mono> createBlobContainerWithResponse(String containerName, + Map metadata, PublicAccessType accessType, Context context) { + BlobContainerAsyncClient blobContainerAsyncClient = getBlobContainerAsyncClient(containerName); - return containerAsyncClient.createWithResponse(metadata, accessType, context) - .map(response -> new SimpleResponse<>(response, containerAsyncClient)); + return blobContainerAsyncClient.createWithResponse(metadata, accessType, context) + .map(response -> new SimpleResponse<>(response, blobContainerAsyncClient)); } /** @@ -161,13 +160,13 @@ Mono> createContainerWithResponse(String containe * Docs. *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.deleteContainer#String} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainer#String} * * @param containerName Name of the container to delete * @return A {@link Mono} containing containing status code and HTTP headers */ - public Mono deleteContainer(String containerName) { - return deleteContainerWithResponse(containerName).flatMap(FluxUtil::toMono); + public Mono deleteBlobContainer(String containerName) { + return deleteBlobContainerWithResponse(containerName).flatMap(FluxUtil::toMono); } /** @@ -177,32 +176,26 @@ public Mono deleteContainer(String containerName) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.deleteContainerWithResponse#String-Context} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainerWithResponse#String-Context} * * @param containerName Name of the container to delete * @return A {@link Mono} containing containing status code and HTTP headers */ - public Mono> deleteContainerWithResponse(String containerName) { - return withContext(context -> deleteContainerWithResponse(containerName, context)); + public Mono> deleteBlobContainerWithResponse(String containerName) { + return withContext(context -> deleteBlobContainerWithResponse(containerName, context)); } - Mono> deleteContainerWithResponse(String containerName, Context context) { - return getContainerAsyncClient(containerName).deleteWithResponse(null, context); + Mono> deleteBlobContainerWithResponse(String containerName, Context context) { + return getBlobContainerAsyncClient(containerName).deleteWithResponse(null, context); } /** * Gets the URL of the storage account represented by this client. * * @return the URL. - * @throws RuntimeException If the account URL is malformed. */ - public URL getAccountUrl() { - try { - return new URL(azureBlobStorage.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e)); - } + public String getAccountUrl() { + return azureBlobStorage.getUrl(); } /** @@ -211,12 +204,12 @@ public URL getAccountUrl() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.listContainers} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers} * * @return A reactive response emitting the list of containers. */ - public PagedFlux listContainers() { - return this.listContainers(new ListContainersOptions()); + public PagedFlux listBlobContainers() { + return this.listBlobContainers(new ListBlobContainersOptions()); } /** @@ -225,18 +218,19 @@ public PagedFlux listContainers() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.listContainers#ListContainersOptions} + * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers#ListBlobContainersOptions} * - * @param options A {@link ListContainersOptions} which specifies what data should be returned by the service. + * @param options A {@link ListBlobContainersOptions} which specifies what data should be returned by the service. * @return A reactive response emitting the list of containers. */ - public PagedFlux listContainers(ListContainersOptions options) { - return listContainersWithOptionalTimeout(options, null); + public PagedFlux listBlobContainers(ListBlobContainersOptions options) { + return listBlobContainersWithOptionalTimeout(options, null); } - PagedFlux listContainersWithOptionalTimeout(ListContainersOptions options, Duration timeout) { - Function>> func = - marker -> listContainersSegment(marker, options, timeout) + PagedFlux listBlobContainersWithOptionalTimeout(ListBlobContainersOptions options, + Duration timeout) { + Function>> func = + marker -> listBlobContainersSegment(marker, options, timeout) .map(response -> new PagedResponseBase<>( response.getRequest(), response.getStatusCode(), @@ -248,9 +242,9 @@ PagedFlux listContainersWithOptionalTimeout(ListContainersOptions return new PagedFlux<>(() -> func.apply(null), func); } - private Mono listContainersSegment(String marker, - ListContainersOptions options, Duration timeout) { - options = options == null ? new ListContainersOptions() : options; + private Mono listBlobContainersSegment(String marker, + ListBlobContainersOptions options, Duration timeout) { + options = options == null ? new ListBlobContainersOptions() : options; return postProcessResponse(Utility.applyOptionalTimeout( this.azureBlobStorage.services().listContainersSegmentWithRestResponseAsync( @@ -344,6 +338,7 @@ Mono> setPropertiesWithResponse(StorageServiceProperties properti * @param expiry Expiration of the key's validity. * @return A {@link Mono} containing the user delegation key. * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. */ public Mono getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) { return withContext(context -> getUserDelegationKeyWithResponse(start, expiry, context)) @@ -363,6 +358,7 @@ public Mono getUserDelegationKey(OffsetDateTime start, Offset * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} containing the user * delegation key. * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. */ public Mono> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry) { @@ -466,6 +462,7 @@ Mono> getAccountInfoWithResponse(Context context) { * @param accountSASPermission The {@code AccountSASPermission} permission for the account SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission, OffsetDateTime expiryTime) { @@ -478,7 +475,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs

    @@ -489,13 +486,14 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index bcd6ea424631..7e6d13c51843 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -3,16 +3,15 @@ package com.azure.storage.blob; +import com.azure.core.annotation.ServiceClient; import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; -import com.azure.storage.blob.models.ContainerItem; -import com.azure.storage.blob.models.ListContainersOptions; -import com.azure.storage.blob.models.Metadata; +import com.azure.storage.blob.models.BlobContainerItem; +import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.StorageServiceProperties; @@ -21,14 +20,14 @@ import com.azure.storage.common.AccountSASPermission; import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.Map; /** * Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does @@ -36,8 +35,8 @@ * requests to the resource on the service. It may also be used to construct URLs to blobs and containers. * *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerClient} through - * {@link #getContainerClient(String)}, and operations on a blob are available on {@link BlobClient}. + * This client contains operations on a blob. Operations on a container are available on {@link BlobContainerClient} + * through {@link #getBlobContainerClient(String)}, and operations on a blob are available on {@link BlobClient}. * *

    * Please see here for more @@ -57,18 +56,18 @@ public final class BlobServiceClient { } /** - * Initializes a {@link ContainerClient} object pointing to the specified container. This method does not create a - * container. It simply constructs the URL to the container and offers access to methods relevant to containers. + * Initializes a {@link BlobContainerClient} object pointing to the specified container. This method does not create + * a container. It simply constructs the URL to the container and offers access to methods relevant to containers. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.getContainerClient#String} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.getBlobContainerClient#String} * * @param containerName The name of the container to point to. - * @return A {@link ContainerClient} object pointing to the specified container + * @return A {@link BlobContainerClient} object pointing to the specified container */ - public ContainerClient getContainerClient(String containerName) { - return new ContainerClient(blobServiceAsyncClient.getContainerAsyncClient(containerName)); + public BlobContainerClient getBlobContainerClient(String containerName) { + return new BlobContainerClient(blobServiceAsyncClient.getBlobContainerAsyncClient(containerName)); } /** @@ -87,13 +86,13 @@ public HttpPipeline getHttpPipeline() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.createContainer#String} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.createBlobContainer#String} * * @param containerName Name of the container to create - * @return The {@link ContainerClient} used to interact with the container created. + * @return The {@link BlobContainerClient} used to interact with the container created. */ - public ContainerClient createContainer(String containerName) { - return createContainerWithResponse(containerName, null, null, Context.NONE).getValue(); + public BlobContainerClient createBlobContainer(String containerName) { + return createBlobContainerWithResponse(containerName, null, null, Context.NONE).getValue(); } /** @@ -103,20 +102,19 @@ public ContainerClient createContainer(String containerName) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.createContainerWithResponse#String-Metadata-PublicAccessType-Context} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.createBlobContainerWithResponse#String-Map-PublicAccessType-Context} * * @param containerName Name of the container to create - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the container. * @param accessType Specifies how the data in this container is available to the public. See the * x-ms-blob-public-access header in the Azure Docs for more information. Pass null for no public access. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link ContainerClient} used to - * interact with the container created. + * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link BlobContainerClient} used + * to interact with the container created. */ - public Response createContainerWithResponse(String containerName, Metadata metadata, - PublicAccessType accessType, Context context) { - ContainerClient client = getContainerClient(containerName); - + public Response createBlobContainerWithResponse(String containerName, + Map metadata, PublicAccessType accessType, Context context) { + BlobContainerClient client = getBlobContainerClient(containerName); return new SimpleResponse<>(client.createWithResponse(metadata, accessType, null, context), client); } @@ -127,12 +125,12 @@ public Response createContainerWithResponse(String containerNam * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.deleteContainer#String} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.deleteBlobContainer#String} * * @param containerName Name of the container to delete */ - public void deleteContainer(String containerName) { - deleteContainerWithResponse(containerName, Context.NONE); + public void deleteBlobContainer(String containerName) { + deleteBlobContainerWithResponse(containerName, Context.NONE); } /** @@ -144,8 +142,8 @@ public void deleteContainer(String containerName) { * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers */ - public Response deleteContainerWithResponse(String containerName, Context context) { - return blobServiceAsyncClient.deleteContainerWithResponse(containerName).block(); + public Response deleteBlobContainerWithResponse(String containerName, Context context) { + return blobServiceAsyncClient.deleteBlobContainerWithResponse(containerName).block(); } /** @@ -153,7 +151,7 @@ public Response deleteContainerWithResponse(String containerName, Context * * @return the URL. */ - public URL getAccountUrl() { + public String getAccountUrl() { return blobServiceAsyncClient.getAccountUrl(); } @@ -164,12 +162,12 @@ public URL getAccountUrl() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.listContainers} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.listBlobContainers} * * @return The list of containers. */ - public PagedIterable listContainers() { - return this.listContainers(new ListContainersOptions(), null); + public PagedIterable listBlobContainers() { + return this.listBlobContainers(new ListBlobContainersOptions(), null); } /** @@ -179,14 +177,14 @@ public PagedIterable listContainers() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlobServiceClient.listContainers#ListContainersOptions-Duration} + * {@codesnippet com.azure.storage.blob.BlobServiceClient.listBlobContainers#ListBlobContainersOptions-Duration} * - * @param options A {@link ListContainersOptions} which specifies what data should be returned by the service. + * @param options A {@link ListBlobContainersOptions} which specifies what data should be returned by the service. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The list of containers. */ - public PagedIterable listContainers(ListContainersOptions options, Duration timeout) { - return new PagedIterable<>(blobServiceAsyncClient.listContainersWithOptionalTimeout(options, timeout)); + public PagedIterable listBlobContainers(ListBlobContainersOptions options, Duration timeout) { + return new PagedIterable<>(blobServiceAsyncClient.listBlobContainersWithOptionalTimeout(options, timeout)); } /** @@ -382,7 +380,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs

    @@ -393,13 +391,13 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { return this.blobServiceAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index 0b4860f6c6ad..a550baf30b32 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -60,7 +60,7 @@ public BlobServiceAsyncClient buildAsyncClient() { return new BlobServiceAsyncClient(new AzureBlobStorageBuilder() .url(super.endpoint) .pipeline(pipeline) - .build(), cpk); + .build(), customerProvidedKey); } /** @@ -76,7 +76,7 @@ public BlobServiceClientBuilder endpoint(String endpoint) { super.endpoint = url.getProtocol() + "://" + url.getAuthority(); SASTokenCredential sasTokenCredential = SASTokenCredential - .fromSASTokenString(URLParser.parse(url).getSasQueryParameters().encode()); + .fromSASTokenString(BlobURLParts.parse(url).getSasQueryParameters().encode()); if (sasTokenCredential != null) { super.credential(sasTokenCredential); } @@ -88,6 +88,11 @@ public BlobServiceClientBuilder endpoint(String endpoint) { return this; } + @Override + protected Class getClazz() { + return BlobServiceClientBuilder.class; + } + String endpoint() { return super.endpoint; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java index f43a8ca393ea..7d6869a87842 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java @@ -4,55 +4,55 @@ package com.azure.storage.blob; import com.azure.core.implementation.http.UrlBuilder; +import com.azure.core.implementation.util.ImplUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.specialized.BlobServiceSasQueryParameters; import com.azure.storage.common.Constants; import com.azure.storage.common.Utility; import java.net.MalformedURLException; import java.net.URL; +import java.util.Comparator; import java.util.HashMap; +import java.util.Locale; import java.util.Map; +import java.util.TreeMap; /** - * A BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You may parse an - * existing URL into its parts with the {@link URLParser} class. You may construct a URL from parts by calling - * {@link #toURL()}. It is also possible to use the empty constructor to buildClient a blobURL from scratch. - * - *

    NOTE: Changing any SAS-related field requires computing a new SAS signature.

    + * This class represents the components that make up an Azure Storage Container/Blob URL. You may parse an + * existing URL into its parts with the {@link #parse(URL)} class. You may construct a URL from parts by calling {@link + * #toURL()}. */ -final class BlobURLParts { - +public final class BlobURLParts { private String scheme; - private String host; - private String containerName; - private String blobName; - private String snapshot; - - private BlobServiceSASQueryParameters blobServiceSasQueryParameters; - + private BlobServiceSasQueryParameters blobServiceSasQueryParameters; private Map unparsedParameters; /** - * Initializes a BlobURLParts object with all fields set to null, except unparsedParameters, which is an empty map. - * This may be useful for constructing a URL to a blob storage resource from scratch when the constituent parts are - * already known. + * Initializes a BlobURLParts object which helps aid in the construction of a Blob Storage URL. */ - BlobURLParts() { + public BlobURLParts() { unparsedParameters = new HashMap<>(); } /** - * The scheme. Ex: "https://". + * Gets the URL scheme, ex. "https://". + * + * @return the URL scheme. */ public String getScheme() { return scheme; } /** - * The scheme. Ex: "https://". + * Sets the URL scheme, ex. "https://". + * + * @param scheme The URL scheme. + * @return the updated BlobURLParts object. */ public BlobURLParts setScheme(String scheme) { this.scheme = scheme; @@ -60,14 +60,19 @@ public BlobURLParts setScheme(String scheme) { } /** - * The host. Ex: "account.blob.core.windows.net". + * Gets the URL host, ex. "account.blob.core.windows.net". + * + * @return the URL host. */ public String getHost() { return host; } /** - * The host. Ex: "account.blob.core.windows.net". + * Sets the URL host, ex. "account.blob.core.windows.net". + * + * @param host The URL host. + * @return the updated BlobURLParts object. */ public BlobURLParts setHost(String host) { this.host = host; @@ -75,14 +80,19 @@ public BlobURLParts setHost(String host) { } /** - * The container name or {@code null} if a {@link BlobServiceAsyncClient} was parsed. + * Gets the container name that will be used as part of the URL path. + * + * @return the container name. */ - public String getContainerName() { + public String getBlobContainerName() { return containerName; } /** - * The container name or {@code null} if a {@link BlobServiceAsyncClient} was parsed. + * Sets the container name that will be used as part of the URL path. + * + * @param containerName The container nme. + * @return the updated BlobURLParts object. */ public BlobURLParts setContainerName(String containerName) { this.containerName = containerName; @@ -90,14 +100,19 @@ public BlobURLParts setContainerName(String containerName) { } /** - * The blob name or {@code null} if a {@link BlobServiceAsyncClient} or {@link ContainerAsyncClient} was parsed. + * Gets the blob name that will be used as part of the URL path. + * + * @return the blob name. */ public String getBlobName() { return blobName; } /** - * The blob name or {@code null} if a {@link BlobServiceAsyncClient} or {@link ContainerAsyncClient} was parsed. + * Sets the blob name that will be used as part of the URL path. + * + * @param blobName The blob name. + * @return the updated BlobURLParts object. */ public BlobURLParts setBlobName(String blobName) { this.blobName = blobName; @@ -105,14 +120,19 @@ public BlobURLParts setBlobName(String blobName) { } /** - * The snapshot time or {@code null} if anything except a URL to a snapshot was parsed. + * Gets the snapshot identifier that will be used as part of the query string if set. + * + * @return the snapshot identifier. */ public String getSnapshot() { return snapshot; } /** - * The snapshot time or {@code null} if anything except a URL to a snapshot was parsed. + * Sets the snapshot identifier that will be used as part of the query string if set. + * + * @param snapshot The snapshot identifier. + * @return the updated BlobURLParts object. */ public BlobURLParts setSnapshot(String snapshot) { this.snapshot = snapshot; @@ -120,33 +140,41 @@ public BlobURLParts setSnapshot(String snapshot) { } /** - * A {@link BlobServiceSASQueryParameters} representing the SAS query parameters or {@code null} if there were no - * such parameters. + * Gets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters that will be used to + * generate the SAS token for this URL. + * + * @return the {@link BlobServiceSasQueryParameters} of the URL */ - public BlobServiceSASQueryParameters getSasQueryParameters() { + public BlobServiceSasQueryParameters getSasQueryParameters() { return blobServiceSasQueryParameters; } /** - * A {@link BlobServiceSASQueryParameters} representing the SAS query parameters or {@code null} if there were no - * such parameters. + * Sets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters that will be used to + * generate the SAS token for this URL. + * + * @param blobServiceSasQueryParameters The SAS query parameters. + * @return the updated BlobURLParts object. */ - public BlobURLParts setSasQueryParameters(BlobServiceSASQueryParameters blobServiceSasQueryParameters) { + public BlobURLParts setSasQueryParameters(BlobServiceSasQueryParameters blobServiceSasQueryParameters) { this.blobServiceSasQueryParameters = blobServiceSasQueryParameters; return this; } /** - * The query parameter key value pairs aside from SAS parameters and snapshot time or {@code null} if there were no - * such parameters. + * Gets the query string parameters that aren't part of the SAS token that will be used by this URL. + * + * @return the non-SAS token query string values. */ public Map getUnparsedParameters() { return unparsedParameters; } /** - * The query parameter key value pairs aside from SAS parameters and snapshot time or {@code null} if there were no - * such parameters. + * Sets the query string parameters that aren't part of the SAS token that will be used by this URL. + * + * @param unparsedParameters The non-SAS token query string values. + * @return the updated BlobURLParts object. */ public BlobURLParts setUnparsedParameters(Map unparsedParameters) { this.unparsedParameters = unparsedParameters; @@ -156,7 +184,7 @@ public BlobURLParts setUnparsedParameters(Map unparsedParamete /** * Converts the blob URL parts to a {@link URL}. * - * @return A {@code java.net.URL} to the blob resource composed of all the elements in the object. + * @return A {@code URL} to the blob resource composed of all the elements in this object. * @throws MalformedURLException The fields present on the BlobURLParts object were insufficient to construct a * valid URL or were ill-formatted. */ @@ -191,4 +219,125 @@ public URL toURL() throws MalformedURLException { return url.toURL(); } + + /** + * URLParser parses a string URL initializing BlobURLParts' fields including any SAS-related and snapshot query + * parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields + * in the BlobURLParts object. + * + * @param url The string URL to be parsed. + * @param logger Logger associated to the calling class to log a {@link MalformedURLException}. + * @return A {@link BlobURLParts} object containing all the components of a BlobURL. + * @throws IllegalArgumentException If the {@code url} is malformed. + */ + public static BlobURLParts parse(String url, ClientLogger logger) { + try { + return parse(new URL(url)); + } catch (MalformedURLException e) { + throw logger.logExceptionAsError(new IllegalArgumentException("Please double check the URL format. URL: " + + url)); + } + } + + /** + * Parses an existing URL into a BlobURLParts. + * + *

    Query parameters will be parsed into two properties, {@link BlobServiceSasQueryParameters} which contains + * all SAS token related values and {@link #getUnparsedParameters() unparsedParameters} which is all other query + * parameters.

    + * + * @param url The {@code URL} to be parsed. + * @return A {@link BlobURLParts} object containing all the components of a BlobURL. + */ + public static BlobURLParts parse(URL url) { + + final String scheme = url.getProtocol(); + final String host = url.getHost(); + + String containerName = null; + String blobName = null; + + // find the container & blob names (if any) + String path = url.getPath(); + if (!ImplUtils.isNullOrEmpty(path)) { + // if the path starts with a slash remove it + if (path.charAt(0) == '/') { + path = path.substring(1); + } + + int containerEndIndex = path.indexOf('/'); + if (containerEndIndex == -1) { + // path contains only a container name and no blob name + containerName = path; + } else { + // path contains the container name up until the slash and blob name is everything after the slash + containerName = path.substring(0, containerEndIndex); + blobName = path.substring(containerEndIndex + 1); + } + } + Map queryParamsMap = parseQueryString(url.getQuery()); + + String snapshot = null; + String[] snapshotArray = queryParamsMap.get("snapshot"); + if (snapshotArray != null) { + snapshot = snapshotArray[0]; + queryParamsMap.remove("snapshot"); + } + + BlobServiceSasQueryParameters blobServiceSasQueryParameters = + new BlobServiceSasQueryParameters(queryParamsMap, true); + + return new BlobURLParts() + .setScheme(scheme) + .setHost(host) + .setContainerName(containerName) + .setBlobName(blobName) + .setSnapshot(snapshot) + .setSasQueryParameters(blobServiceSasQueryParameters) + .setUnparsedParameters(queryParamsMap); + } + + /** + * Parses a query string into a one to many hashmap. + * + * @param queryParams The string of query params to parse. + * @return A {@code HashMap} of the key values. + */ + private static TreeMap parseQueryString(String queryParams) { + final TreeMap retVals = new TreeMap<>(Comparator.naturalOrder()); + + if (ImplUtils.isNullOrEmpty(queryParams)) { + return retVals; + } + + // split name value pairs by splitting on the '&' character + final String[] valuePairs = queryParams.split("&"); + + // for each field value pair parse into appropriate map entries + for (String valuePair : valuePairs) { + // Getting key and value for a single query parameter + final int equalDex = valuePair.indexOf("="); + String key = Utility.urlDecode(valuePair.substring(0, equalDex)).toLowerCase(Locale.ROOT); + String value = Utility.urlDecode(valuePair.substring(equalDex + 1)); + + // add to map + String[] keyValues = retVals.get(key); + + // check if map already contains key + if (keyValues == null) { + // map does not contain this key + keyValues = new String[]{value}; + } else { + // map contains this key already so append + final String[] newValues = new String[keyValues.length + 1]; + System.arraycopy(keyValues, 0, newValues, 0, keyValues.length); + + newValues[newValues.length - 1] = value; + keyValues = newValues; + } + retVals.put(key, keyValues); + } + + return retVals; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java deleted file mode 100644 index 83d90b1408e2..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob; - - -import com.azure.storage.common.SR; - -import java.util.Locale; - -/** - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. - * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. - * Once all the values are set, this should be serialized with toString and set as the permissions field on a {@link - * BlobServiceSASSignatureValues} object. It is possible to construct the permissions string without this class, but the - * order of the permissions is particular and this class guarantees correctness. - */ -public final class ContainerSASPermission { - private boolean read; - - private boolean add; - - private boolean create; - - private boolean write; - - private boolean delete; - - private boolean list; - - /** - * Initializes an {@code ContainerSASPermssion} object with all fields set to false. - */ - public ContainerSASPermission() { - } - - /** - * Creates an {@code ContainerSASPermission} from the specified permissions string. This method will throw an - * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. - * - * @param permString A {@code String} which represents the {@code ContainerSASPermission}. - * @return A {@code ContainerSASPermission} generated from the given {@code String}. - * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, or l. - */ - public static ContainerSASPermission parse(String permString) { - ContainerSASPermission permissions = new ContainerSASPermission(); - - for (int i = 0; i < permString.length(); i++) { - char c = permString.charAt(i); - switch (c) { - case 'r': - permissions.read = true; - break; - case 'a': - permissions.add = true; - break; - case 'c': - permissions.create = true; - break; - case 'w': - permissions.write = true; - break; - case 'd': - permissions.delete = true; - break; - case 'l': - permissions.list = true; - break; - default: - throw new IllegalArgumentException( - String.format(Locale.ROOT, SR.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, - "Permissions", permString, c)); - } - } - return permissions; - } - - /** - * @return the read permission status - */ - public boolean getRead() { - return read; - } - - /** - * Sets the read permission status. - * - * @param read Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setRead(boolean read) { - this.read = read; - return this; - } - - /** - * @return the add permission status - */ - public boolean getAdd() { - return add; - } - - /** - * Sets the add permission status. - * - * @param add Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setAdd(boolean add) { - this.add = add; - return this; - } - - /** - * @return the create permission status - */ - public boolean getCreate() { - return create; - } - - /** - * Sets the create permission status. - * - * @param create Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setCreate(boolean create) { - this.create = create; - return this; - } - - /** - * @return the write permission status - */ - public boolean getWrite() { - return write; - } - - /** - * Sets the write permission status. - * - * @param write Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * @return the delete permission status - */ - public boolean getDelete() { - return delete; - } - - /** - * Sets the delete permission status. - * - * @param delete Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * @return the list permission status - */ - public boolean getList() { - return list; - } - - /** - * Sets the list permission status. - * - * @param list Permission status to set - * @return the updated ContainerSASPermission object - */ - public ContainerSASPermission setList(boolean list) { - this.list = list; - return this; - } - - /** - * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * @return A {@code String} which represents the {@code ContainerSASPermission}. - */ - @Override - public String toString() { - // The order of the characters should be as specified here to ensure correctness: - // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - final StringBuilder builder = new StringBuilder(); - - if (this.read) { - builder.append('r'); - } - - if (this.add) { - builder.append('a'); - } - - if (this.create) { - builder.append('c'); - } - - if (this.write) { - builder.append('w'); - } - - if (this.delete) { - builder.append('d'); - } - - if (this.list) { - builder.append('l'); - } - - return builder.toString(); - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/URLParser.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/URLParser.java deleted file mode 100644 index 5ca8f2b8673e..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/URLParser.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob; - -import com.azure.core.implementation.util.ImplUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.Utility; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Comparator; -import java.util.Locale; -import java.util.Map; -import java.util.TreeMap; - -/** - * A class used to conveniently parse URLs into {@link BlobURLParts} to modify the components of the URL. - */ -final class URLParser { - - /** - * URLParser parses a string URL initializing BlobURLParts' fields including any SAS-related and snapshot query - * parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields - * in the BlobURLParts object. - * - * @param url The string URL to be parsed. - * @return A {@link BlobURLParts} object containing all the components of a BlobURL. - */ - public static BlobURLParts parse(String url, ClientLogger logger) { - try { - return parse(new URL(url)); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new IllegalArgumentException("Please double check the URL format. URL: " - + url)); - } - } - - /** - * URLParser parses a URL initializing BlobURLParts' fields including any SAS-related and snapshot query parameters. - * Any other query parameters remain in the UnparsedParams field. This method overwrites all fields in the - * BlobURLParts object. - * - * @param url The {@code URL} to be parsed. - * @return A {@link BlobURLParts} object containing all the components of a BlobURL. - */ - public static BlobURLParts parse(URL url) { - - final String scheme = url.getProtocol(); - final String host = url.getHost(); - - String containerName = null; - String blobName = null; - - // find the container & blob names (if any) - String path = url.getPath(); - if (!ImplUtils.isNullOrEmpty(path)) { - // if the path starts with a slash remove it - if (path.charAt(0) == '/') { - path = path.substring(1); - } - - int containerEndIndex = path.indexOf('/'); - if (containerEndIndex == -1) { - // path contains only a container name and no blob name - containerName = path; - } else { - // path contains the container name up until the slash and blob name is everything after the slash - containerName = path.substring(0, containerEndIndex); - blobName = path.substring(containerEndIndex + 1); - } - } - Map queryParamsMap = parseQueryString(url.getQuery()); - - String snapshot = null; - String[] snapshotArray = queryParamsMap.get("snapshot"); - if (snapshotArray != null) { - snapshot = snapshotArray[0]; - queryParamsMap.remove("snapshot"); - } - - BlobServiceSASQueryParameters blobServiceSasQueryParameters = - new BlobServiceSASQueryParameters(queryParamsMap, true); - - return new BlobURLParts() - .setScheme(scheme) - .setHost(host) - .setContainerName(containerName) - .setBlobName(blobName) - .setSnapshot(snapshot) - .setSasQueryParameters(blobServiceSasQueryParameters) - .setUnparsedParameters(queryParamsMap); - } - - /** - * Parses a query string into a one to many hashmap. - * - * @param queryParams The string of query params to parse. - * @return A {@code HashMap} of the key values. - */ - private static TreeMap parseQueryString(String queryParams) { - - final TreeMap retVals = new TreeMap<>(Comparator.naturalOrder()); - - if (ImplUtils.isNullOrEmpty(queryParams)) { - return retVals; - } - - // split name value pairs by splitting on the 'c&' character - final String[] valuePairs = queryParams.split("&"); - - // for each field value pair parse into appropriate map entries - for (String valuePair : valuePairs) { - // Getting key and value for a single query parameter - final int equalDex = valuePair.indexOf("="); - String key = Utility.urlDecode(valuePair.substring(0, equalDex)).toLowerCase(Locale.ROOT); - String value = Utility.urlDecode(valuePair.substring(equalDex + 1)); - - // add to map - String[] keyValues = retVals.get(key); - - // check if map already contains key - if (keyValues == null) { - // map does not contain this key - keyValues = new String[]{value}; - } else { - // map contains this key already so append - final String[] newValues = new String[keyValues.length + 1]; - System.arraycopy(keyValues, 0, newValues, 0, keyValues.length); - - newValues[newValues.length - 1] = value; - keyValues = newValues; - } - retVals.put(key, keyValues); - } - - return retVals; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java index b6278f480c2c..c5be9d815623 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/UploadBufferPool.java @@ -4,6 +4,7 @@ package com.azure.storage.blob; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.Utility; import reactor.core.publisher.Flux; @@ -41,7 +42,7 @@ final class UploadBufferPool { private final int maxBuffs; // The number of buffs we have allocated. We can query the queue for how many are available. - private int numBuffs = 0; + private int numBuffs; private final int buffSize; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 5323430eab02..1a2f394c8144 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; @@ -18,11 +16,13 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; -import com.azure.storage.blob.models.AppendBlobsAppendBlockFromUrlResponse; -import com.azure.storage.blob.models.AppendBlobsAppendBlockResponse; -import com.azure.storage.blob.models.AppendBlobsCreateResponse; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlResponse; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockResponse; +import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse; import com.azure.storage.blob.models.AppendPositionAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.CpkInfo; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java index bb2619e0d8d3..2733e398966b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java @@ -4,9 +4,9 @@ package com.azure.storage.blob.implementation; +import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; -import com.azure.core.annotation.ServiceClientBuilder; import com.azure.storage.blob.models.PathRenameMode; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 8f5e81f9dbfd..570679513706 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -21,34 +19,36 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; +import com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLResponse; +import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseResponse; +import com.azure.storage.blob.implementation.models.BlobsBreakLeaseResponse; +import com.azure.storage.blob.implementation.models.BlobsChangeLeaseResponse; +import com.azure.storage.blob.implementation.models.BlobsCopyFromURLResponse; +import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotResponse; +import com.azure.storage.blob.implementation.models.BlobsDeleteResponse; +import com.azure.storage.blob.implementation.models.BlobsDownloadResponse; +import com.azure.storage.blob.implementation.models.BlobsGetAccessControlResponse; +import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoResponse; +import com.azure.storage.blob.implementation.models.BlobsGetPropertiesResponse; +import com.azure.storage.blob.implementation.models.BlobsReleaseLeaseResponse; +import com.azure.storage.blob.implementation.models.BlobsRenameResponse; +import com.azure.storage.blob.implementation.models.BlobsRenewLeaseResponse; +import com.azure.storage.blob.implementation.models.BlobsSetAccessControlResponse; +import com.azure.storage.blob.implementation.models.BlobsSetHTTPHeadersResponse; +import com.azure.storage.blob.implementation.models.BlobsSetMetadataResponse; +import com.azure.storage.blob.implementation.models.BlobsSetTierResponse; +import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLResponse; +import com.azure.storage.blob.implementation.models.BlobsUndeleteResponse; +import com.azure.storage.blob.implementation.models.DirectoryHttpHeaders; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHTTPHeaders; -import com.azure.storage.blob.models.BlobsAbortCopyFromURLResponse; -import com.azure.storage.blob.models.BlobsAcquireLeaseResponse; -import com.azure.storage.blob.models.BlobsBreakLeaseResponse; -import com.azure.storage.blob.models.BlobsChangeLeaseResponse; -import com.azure.storage.blob.models.BlobsCopyFromURLResponse; -import com.azure.storage.blob.models.BlobsCreateSnapshotResponse; -import com.azure.storage.blob.models.BlobsDeleteResponse; -import com.azure.storage.blob.models.BlobsDownloadResponse; -import com.azure.storage.blob.models.BlobsGetAccessControlResponse; -import com.azure.storage.blob.models.BlobsGetAccountInfoResponse; -import com.azure.storage.blob.models.BlobsGetPropertiesResponse; -import com.azure.storage.blob.models.BlobsReleaseLeaseResponse; -import com.azure.storage.blob.models.BlobsRenameResponse; -import com.azure.storage.blob.models.BlobsRenewLeaseResponse; -import com.azure.storage.blob.models.BlobsSetAccessControlResponse; -import com.azure.storage.blob.models.BlobsSetHTTPHeadersResponse; -import com.azure.storage.blob.models.BlobsSetMetadataResponse; -import com.azure.storage.blob.models.BlobsSetTierResponse; -import com.azure.storage.blob.models.BlobsStartCopyFromURLResponse; -import com.azure.storage.blob.models.BlobsUndeleteResponse; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.DataLakeStorageErrorException; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.DirectoryHttpHeaders; import com.azure.storage.blob.models.EncryptionAlgorithmType; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ModifiedAccessConditions; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 6d70be8b0af1..53bb60004711 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -21,13 +21,13 @@ import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; +import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListResponse; +import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListResponse; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLResponse; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadResponse; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHTTPHeaders; -import com.azure.storage.blob.models.BlockBlobsCommitBlockListResponse; -import com.azure.storage.blob.models.BlockBlobsGetBlockListResponse; -import com.azure.storage.blob.models.BlockBlobsStageBlockFromURLResponse; -import com.azure.storage.blob.models.BlockBlobsStageBlockResponse; -import com.azure.storage.blob.models.BlockBlobsUploadResponse; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.BlockLookupList; import com.azure.storage.blob.models.CpkInfo; @@ -36,13 +36,12 @@ import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageErrorException; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 6a75bc62a397..b7bae11fc63c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -4,9 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.CollectionFormat; -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -21,22 +18,25 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.CollectionFormat; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.util.Context; -import com.azure.storage.blob.models.ContainersAcquireLeaseResponse; -import com.azure.storage.blob.models.ContainersBreakLeaseResponse; -import com.azure.storage.blob.models.ContainersChangeLeaseResponse; -import com.azure.storage.blob.models.ContainersCreateResponse; -import com.azure.storage.blob.models.ContainersDeleteResponse; -import com.azure.storage.blob.models.ContainersGetAccessPolicyResponse; -import com.azure.storage.blob.models.ContainersGetAccountInfoResponse; -import com.azure.storage.blob.models.ContainersGetPropertiesResponse; -import com.azure.storage.blob.models.ContainersListBlobFlatSegmentResponse; -import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentResponse; -import com.azure.storage.blob.models.ContainersReleaseLeaseResponse; -import com.azure.storage.blob.models.ContainersRenewLeaseResponse; -import com.azure.storage.blob.models.ContainersSetAccessPolicyResponse; -import com.azure.storage.blob.models.ContainersSetMetadataResponse; +import com.azure.storage.blob.implementation.models.ContainersAcquireLeaseResponse; +import com.azure.storage.blob.implementation.models.ContainersBreakLeaseResponse; +import com.azure.storage.blob.implementation.models.ContainersChangeLeaseResponse; +import com.azure.storage.blob.implementation.models.ContainersCreateResponse; +import com.azure.storage.blob.implementation.models.ContainersDeleteResponse; +import com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyResponse; +import com.azure.storage.blob.implementation.models.ContainersGetAccountInfoResponse; +import com.azure.storage.blob.implementation.models.ContainersGetPropertiesResponse; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; +import com.azure.storage.blob.implementation.models.ContainersReleaseLeaseResponse; +import com.azure.storage.blob.implementation.models.ContainersRenewLeaseResponse; +import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyResponse; +import com.azure.storage.blob.implementation.models.ContainersSetMetadataResponse; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.storage.blob.models.ModifiedAccessConditions; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java index cc64f892cffd..ad2632e9f511 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/DirectorysImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Head; @@ -20,14 +18,16 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; +import com.azure.storage.blob.implementation.models.DirectoryHttpHeaders; +import com.azure.storage.blob.implementation.models.DirectorysCreateResponse; +import com.azure.storage.blob.implementation.models.DirectorysDeleteResponse; +import com.azure.storage.blob.implementation.models.DirectorysGetAccessControlResponse; +import com.azure.storage.blob.implementation.models.DirectorysRenameResponse; +import com.azure.storage.blob.implementation.models.DirectorysSetAccessControlResponse; import com.azure.storage.blob.models.DataLakeStorageErrorException; -import com.azure.storage.blob.models.DirectoryHttpHeaders; -import com.azure.storage.blob.models.DirectorysCreateResponse; -import com.azure.storage.blob.models.DirectorysDeleteResponse; -import com.azure.storage.blob.models.DirectorysGetAccessControlResponse; -import com.azure.storage.blob.models.DirectorysRenameResponse; -import com.azure.storage.blob.models.DirectorysSetAccessControlResponse; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PathRenameMode; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index 0d8f7c65a4b6..3f2956c1afb3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -19,22 +17,25 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; +import com.azure.storage.blob.implementation.models.PageBlobsClearPagesResponse; +import com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalResponse; +import com.azure.storage.blob.implementation.models.PageBlobsCreateResponse; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffResponse; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesResponse; +import com.azure.storage.blob.implementation.models.PageBlobsResizeResponse; +import com.azure.storage.blob.implementation.models.PageBlobsUpdateSequenceNumberResponse; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLResponse; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesResponse; +import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.EncryptionAlgorithmType; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PageBlobsClearPagesResponse; -import com.azure.storage.blob.models.PageBlobsCopyIncrementalResponse; -import com.azure.storage.blob.models.PageBlobsCreateResponse; -import com.azure.storage.blob.models.PageBlobsGetPageRangesDiffResponse; -import com.azure.storage.blob.models.PageBlobsGetPageRangesResponse; -import com.azure.storage.blob.models.PageBlobsResizeResponse; -import com.azure.storage.blob.models.PageBlobsUpdateSequenceNumberResponse; -import com.azure.storage.blob.models.PageBlobsUploadPagesFromURLResponse; -import com.azure.storage.blob.models.PageBlobsUploadPagesResponse; import com.azure.storage.blob.models.SequenceNumberAccessConditions; import com.azure.storage.blob.models.SequenceNumberActionType; import com.azure.storage.blob.models.SourceModifiedAccessConditions; @@ -81,7 +82,7 @@ private interface PageBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -138,6 +139,7 @@ private interface PageBlobsService { @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Context context) { final Integer timeout = null; + final PremiumPageBlobAccessTier tier = null; final Map metadata = null; final Long blobSequenceNumber = 0L; final String requestId = null; @@ -156,7 +158,7 @@ public Mono createWithRestResponseAsync(String containe String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -167,6 +169,7 @@ public Mono createWithRestResponseAsync(String containe * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80'. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. @@ -179,7 +182,7 @@ public Mono createWithRestResponseAsync(String containe * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, Map metadata, Long blobSequenceNumber, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, Long blobSequenceNumber, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "PageBlob"; String blobContentType = null; if (blobHTTPHeaders != null) { @@ -240,7 +243,7 @@ public Mono createWithRestResponseAsync(String containe String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PostProcessor.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PostProcessor.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PostProcessor.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PostProcessor.java index b573adcdf6b6..61156c36056c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PostProcessor.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PostProcessor.java @@ -1,15 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.implementation; import com.azure.storage.blob.models.StorageErrorException; import com.azure.storage.blob.models.StorageException; import com.azure.storage.common.Utility; import reactor.core.publisher.Mono; -final class PostProcessor { - static Mono postProcessResponse(Mono response) { +/** + * This class is a helper class that offers functionality to apply processing to responses returned from the service. + */ +public final class PostProcessor { + + /** + * Applies cleaning to eTag returned from the service if the request was successful, otherwise maps the returned + * {@link StorageErrorException} to a {@link StorageException} which promotes information from the returned error. + * + * @param response Response from the service + * @param Generic value contained in the response + * @return The cleansed success response or the mapped exception + */ + public static Mono postProcessResponse(Mono response) { return Utility.postProcessResponse(response, (errorResponse) -> errorResponse.onErrorResume(StorageErrorException.class, resume -> resume.getResponse() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index 9c018d6b340e..601a467d50c4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.blob.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -18,16 +17,17 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; +import com.azure.storage.blob.implementation.models.ServicesGetAccountInfoResponse; +import com.azure.storage.blob.implementation.models.ServicesGetPropertiesResponse; +import com.azure.storage.blob.implementation.models.ServicesGetStatisticsResponse; +import com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyResponse; +import com.azure.storage.blob.implementation.models.ServicesListContainersSegmentResponse; +import com.azure.storage.blob.implementation.models.ServicesSetPropertiesResponse; +import com.azure.storage.blob.implementation.models.ServicesSubmitBatchResponse; import com.azure.storage.blob.models.KeyInfo; -import com.azure.storage.blob.models.ListContainersIncludeType; -import com.azure.storage.blob.models.ServicesGetAccountInfoResponse; -import com.azure.storage.blob.models.ServicesGetPropertiesResponse; -import com.azure.storage.blob.models.ServicesGetStatisticsResponse; -import com.azure.storage.blob.models.ServicesGetUserDelegationKeyResponse; -import com.azure.storage.blob.models.ServicesListContainersSegmentResponse; -import com.azure.storage.blob.models.ServicesSetPropertiesResponse; -import com.azure.storage.blob.models.ServicesSubmitBatchResponse; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; import com.azure.storage.blob.models.StorageErrorException; import com.azure.storage.blob.models.StorageServiceProperties; import java.nio.ByteBuffer; @@ -84,7 +84,7 @@ private interface ServicesService { @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono listContainersSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker1, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") ListContainersIncludeType include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); + Mono listContainersSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker1, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") ListBlobContainersIncludeType include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Post("") @ExpectedResponses({200}) @@ -212,7 +212,7 @@ public Mono listContainersSegmentWithRest final String prefix = null; final String marker = null; final Integer maxresults = null; - final ListContainersIncludeType include = null; + final ListBlobContainersIncludeType include = null; final Integer timeout = null; final String requestId = null; final String comp = "list"; @@ -233,7 +233,7 @@ public Mono listContainersSegmentWithRest * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listContainersSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, ListContainersIncludeType include, Integer timeout, String requestId, Context context) { + public Mono listContainersSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, ListBlobContainersIncludeType include, Integer timeout, String requestId, Context context) { final String comp = "list"; return service.listContainersSegment(this.client.getUrl(), prefix, marker, maxresults, include, timeout, this.client.getVersion(), requestId, comp, context); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockFromUrlHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockFromUrlHeaders.java index 10bd672a6ba3..1b46725823ad 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockFromUrlHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockHeaders.java index a767eba5747f..75d755f50a72 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobAppendBlockHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobCreateHeaders.java index a2d2db241fdd..0e8472ab3a04 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlResponse.java index 55cf1e763dc9..c0e27f9eee9e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockResponse.java index 2dc53c0da52d..c5ecfd7d4c49 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateResponse.java index c8f4cd830c9f..e637a3fcac90 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAbortCopyFromURLHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAbortCopyFromURLHeaders.java index e2c38c0fe144..440302e288f8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAbortCopyFromURLHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAcquireLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAcquireLeaseHeaders.java index b28816bbb212..be644544f139 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobAcquireLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobBreakLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobBreakLeaseHeaders.java index 07bfd754dc06..b06082e9cd8f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobBreakLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobChangeLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobChangeLeaseHeaders.java index 2373e29ce5d7..3c7862d03565 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobChangeLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopyFromURLHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopyFromURLHeaders.java index b02bb73f20a6..05f109de86ce 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopyFromURLHeaders.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.SyncCopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCreateSnapshotHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCreateSnapshotHeaders.java index d32a97e8b6b3..68372f7e2fd4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCreateSnapshotHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteHeaders.java index 92459434eb8d..1d1a7d79c7a2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java index 721b2d0703b3..ad1d5ff9aa30 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobItem; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccessControlHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccessControlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccessControlHeaders.java index e5614d52a474..4c10d30ca578 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccessControlHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java index b8aef5bd9064..84cc5b3a9b09 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java @@ -2,10 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.AccountKind; +import com.azure.storage.blob.models.SkuName; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java index c71d267592f9..e370e113464b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java @@ -2,12 +2,17 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.blob.models.BlobType; +import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.models.LeaseDurationType; +import com.azure.storage.blob.models.LeaseStateType; +import com.azure.storage.blob.models.LeaseStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java similarity index 93% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java index 307191dd9833..157eae4b8f33 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java @@ -2,9 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobItem; +import com.azure.storage.blob.models.BlobPrefix; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobReleaseLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobReleaseLeaseHeaders.java index 5b9b7a75f495..717f4edbdd23 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobReleaseLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenameHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenameHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenameHeaders.java index b4d76cd3a061..afad58a5248f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenameHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenewLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenewLeaseHeaders.java index cc39513c8072..fd0af9587e7b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobRenewLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetAccessControlHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetAccessControlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetAccessControlHeaders.java index 128c2a564a0d..a6cf2a903330 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetAccessControlHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetHTTPHeadersHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetHTTPHeadersHeaders.java index 06ea7d0a3383..2006174b0b88 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetHTTPHeadersHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetMetadataHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetMetadataHeaders.java index cbb99afb4e13..733b12a0b7e3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetTierHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetTierHeaders.java index 1f9caf4dc689..a9f9534b9ed8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSetTierHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStartCopyFromURLHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStartCopyFromURLHeaders.java index 606c12c3e177..739fb5389456 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStartCopyFromURLHeaders.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobUndeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobUndeleteHeaders.java index 2b7223a252bf..5ff194682945 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobUndeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLResponse.java index 00f2a2ca9759..1b16512eb53b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseResponse.java index 0073deeb6315..5bdff843acc1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseResponse.java index 9f5f9fda05ea..9dbf853b1cb3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseResponse.java index eb807aceb583..7e3445be9278 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLResponse.java index 36220b0bf1be..aaa851efe82a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotResponse.java index 3a76a46d1b72..e0b91e2902b3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteResponse.java index 0222cdc4676d..e6ddfe0b514d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadResponse.java similarity index 93% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadResponse.java index a08e1b290986..7c2e671472c8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.BlobDownloadHeaders; import java.io.Closeable; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccessControlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccessControlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlResponse.java index 22d187baf2be..2ed510a68f78 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccessControlResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoResponse.java index 5b33d4b6f495..2697394d8b5b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesResponse.java index de24a1b0b20a..97f6cac9b20e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseResponse.java index f379ead4105b..c749fb965d57 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenameResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenameResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameResponse.java index 1be4db789caa..24b3539062c9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenameResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseResponse.java index 53dfcb83563a..d3b6a0fd4120 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetAccessControlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetAccessControlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlResponse.java index 0f59a40bdfda..5b1416285fb5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetAccessControlResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHTTPHeadersResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHTTPHeadersResponse.java index 6e52d09d1b8b..77aef67534e3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHTTPHeadersResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataResponse.java index e9979fdcb85b..5d8598531fb6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierResponse.java index d11f82818471..b7fc378af076 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLResponse.java index 6c7821de05f3..96abae21f049 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteResponse.java index 21cf7a0cbe9f..2671d936f39f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobCommitBlockListHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobCommitBlockListHeaders.java index 3ceb9599c3a7..f3d3d8ca38c4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobCommitBlockListHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobGetBlockListHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobGetBlockListHeaders.java index 864c1b68386e..cb3186e9f9b1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobGetBlockListHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockFromURLHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockFromURLHeaders.java index d56b9ebe28fe..32a786d04db6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockFromURLHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockHeaders.java index 28affbd6d538..b177c29c4ac6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobStageBlockHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobUploadHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobUploadHeaders.java index 2c6c2b820b64..0d90cb321b61 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobUploadHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListResponse.java index e68cbc1f0770..176107091a60 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java index 75826083b88c..b045364ca1d7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.BlockList; /** * Contains all response data for the getBlockList operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLResponse.java index 848a75fefcb7..145a09359511 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockResponse.java index 9a1e5f8a2cba..92098b863845 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadResponse.java index aa667bea4116..e95dfd94df95 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerAcquireLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerAcquireLeaseHeaders.java index 161284f059a6..b5679c7ddda1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerAcquireLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerBreakLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerBreakLeaseHeaders.java index dfed88da617f..4bff75d04ac7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerBreakLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerChangeLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerChangeLeaseHeaders.java index 73598296f1bd..2dda39c38045 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerChangeLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerCreateHeaders.java index 8c40ee06fb0c..dc3a8d701c18 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerDeleteHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerDeleteHeaders.java index aa824cbd8228..a98ac5c67bc6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccessPolicyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccessPolicyHeaders.java index dae10ab7e573..b3c620a30d39 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccessPolicyHeaders.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.PublicAccessType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java index 679b327c855d..4d146ab4a477 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java @@ -2,10 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.AccountKind; +import com.azure.storage.blob.models.SkuName; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetPropertiesHeaders.java index 4ea9bec09790..3c6efcf7edb8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetPropertiesHeaders.java @@ -2,11 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.LeaseDurationType; +import com.azure.storage.blob.models.LeaseStateType; +import com.azure.storage.blob.models.LeaseStatusType; +import com.azure.storage.blob.models.PublicAccessType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobFlatSegmentHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobFlatSegmentHeaders.java index 0058f307b367..f89320bb052f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobFlatSegmentHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobHierarchySegmentHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobHierarchySegmentHeaders.java index a1e25b1dbe8c..6bc9163075a6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerListBlobHierarchySegmentHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerReleaseLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerReleaseLeaseHeaders.java index 50df268620f0..bda250169944 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerReleaseLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerRenewLeaseHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerRenewLeaseHeaders.java index 0f1bf3fb52ca..b54289b3260d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerRenewLeaseHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetAccessPolicyHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetAccessPolicyHeaders.java index 786faeb0ea88..601e4f9084d6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetAccessPolicyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetMetadataHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetMetadataHeaders.java index 1d2b815a5262..5244d6478687 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerSetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseResponse.java index 121be655fcb4..ce8c1ee8d18f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseResponse.java index c1fd19e3b28f..bbd891b207c8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseResponse.java index c89bb3bc9d03..c88233bafc12 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateResponse.java index b08eb783c553..ec1611a16ee3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteResponse.java index 62d4bcf04738..8aced79bc21f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java index abbe7cfc7722..e4a15a40f891 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.SignedIdentifier; import java.util.List; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoResponse.java index a4d2a3ab5cc9..190fc694b873 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesResponse.java index fecff3635a11..75c451c82920 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java index d4eacc0c169e..113a0c0af522 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java index df7eddaeecde..313af0ba4afb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseResponse.java index d719090a85c8..4ca56f5b9c20 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseResponse.java index 64ddebe26aa7..72ea393249c9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyResponse.java index 982160576ba5..5deaef6c1564 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataResponse.java index 0fc54a5d1f2c..87762ad947d1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CustomHierarchicalListingDeserializer.java similarity index 91% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CustomHierarchicalListingDeserializer.java index 5207ff299d13..dc271725a4e5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CustomHierarchicalListingDeserializer.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; +import com.azure.storage.blob.models.BlobItem; +import com.azure.storage.blob.models.BlobPrefix; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; @@ -38,4 +40,3 @@ public BlobHierarchyListSegment deserialize(JsonParser p, DeserializationContext return new BlobHierarchyListSegment().setBlobItems(blobItems).setBlobPrefixes(blobPrefixes); } } - diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryCreateHeaders.java index 865af9b9680a..575f3a531873 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryDeleteHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryDeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryDeleteHeaders.java index f6a545cf56e9..c4af4e3ea246 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryGetAccessControlHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryGetAccessControlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryGetAccessControlHeaders.java index 581124bf6e9f..991f5a93311e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryGetAccessControlHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryHttpHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java index cca59ba35eb6..3052bbb5c5e9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryRenameHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryRenameHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryRenameHeaders.java index 1c9e5334994f..ecf1f3db747d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectoryRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryRenameHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorySetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorySetAccessControlHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorySetAccessControlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorySetAccessControlHeaders.java index bd2309a639d8..5dd6a2fcf137 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorySetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorySetAccessControlHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysCreateResponse.java index 884c526dda38..f91ed1ad7abb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysCreateResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysDeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysDeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysDeleteResponse.java index 6e3c9d532875..1ed84d1ccf6d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysDeleteResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysGetAccessControlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysGetAccessControlResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysGetAccessControlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysGetAccessControlResponse.java index 6104b8c9afa7..f18748d8f0e5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysGetAccessControlResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysGetAccessControlResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysRenameResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysRenameResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysRenameResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysRenameResponse.java index afea46a8180b..c532f0a836d7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysRenameResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysRenameResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysSetAccessControlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysSetAccessControlResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysSetAccessControlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysSetAccessControlResponse.java index 3395f9a2a10b..7008ebf4224a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DirectorysSetAccessControlResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectorysSetAccessControlResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java index fe71a40d2d75..3991764e4670 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java index 9014d15dce1b..f894c98f2332 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListContainersSegmentResponse.java similarity index 91% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListContainersSegmentResponse.java index a75051180d07..21c76df8dde3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListContainersSegmentResponse.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobContainerItem; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -44,10 +45,10 @@ public final class ListContainersSegmentResponse { private static final class ContainersWrapper { @JacksonXmlProperty(localName = "Container") - private final List items; + private final List items; @JsonCreator - private ContainersWrapper(@JacksonXmlProperty(localName = "Container") List items) { + private ContainersWrapper(@JacksonXmlProperty(localName = "Container") List items) { this.items = items; } } @@ -149,9 +150,9 @@ public ListContainersSegmentResponse setMaxResults(int maxResults) { * * @return the containerItems value. */ - public List getContainerItems() { + public List getContainerItems() { if (this.containerItems == null) { - this.containerItems = new ContainersWrapper(new ArrayList()); + this.containerItems = new ContainersWrapper(new ArrayList()); } return this.containerItems.items; } @@ -159,11 +160,11 @@ public List getContainerItems() { /** * Set the containerItems property: The containerItems property. * - * @param containerItems the containerItems value to set. + * @param blobContainerItems the containerItems value to set. * @return the ListContainersSegmentResponse object itself. */ - public ListContainersSegmentResponse setContainerItems(List containerItems) { - this.containerItems = new ContainersWrapper(containerItems); + public ListContainersSegmentResponse setContainerItems(List blobContainerItems) { + this.containerItems = new ContainersWrapper(blobContainerItems); return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobClearPagesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobClearPagesHeaders.java index 3b3082bd53d6..7eda7d8f3575 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobClearPagesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCopyIncrementalHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCopyIncrementalHeaders.java index cc67adea0c5b..0a4e17dab8ab 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCopyIncrementalHeaders.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCreateHeaders.java index 1704be4f338e..780046b0ff65 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesDiffHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesDiffHeaders.java index 0b0287228afa..14f3aafb8050 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesDiffHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesHeaders.java index faa61a11f195..3caba2113ae3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobResizeHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobResizeHeaders.java index 9ad150d4be3a..571095d3e733 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobResizeHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUpdateSequenceNumberHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUpdateSequenceNumberHeaders.java index de7966aae7ee..f4a5800892de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUpdateSequenceNumberHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesFromURLHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesFromURLHeaders.java index 77ab765a7624..61364e6e8048 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesFromURLHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -86,8 +86,8 @@ public final class PageBlobUploadPagesFromURLHeaders { private Boolean isServerEncrypted; /* - * The SHA-256 hash of the encryption key used to encrypt the pages. This - * header is only returned when the pages were encrypted with a + * The SHA-256 hash of the encryption key used to encrypt the blob. This + * header is only returned when the blob was encrypted with a * customer-provided key. */ @JsonProperty(value = "x-ms-encryption-key-sha256") @@ -329,8 +329,8 @@ public PageBlobUploadPagesFromURLHeaders setIsServerEncrypted(Boolean isServerEn /** * Get the encryptionKeySha256 property: The SHA-256 hash of the encryption - * key used to encrypt the pages. This header is only returned when the - * pages were encrypted with a customer-provided key. + * key used to encrypt the blob. This header is only returned when the blob + * was encrypted with a customer-provided key. * * @return the encryptionKeySha256 value. */ @@ -340,8 +340,8 @@ public String getEncryptionKeySha256() { /** * Set the encryptionKeySha256 property: The SHA-256 hash of the encryption - * key used to encrypt the pages. This header is only returned when the - * pages were encrypted with a customer-provided key. + * key used to encrypt the blob. This header is only returned when the blob + * was encrypted with a customer-provided key. * * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the PageBlobUploadPagesFromURLHeaders object itself. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesHeaders.java index 8487a7ebb055..c1613015688e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobUploadPagesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesResponse.java index b85c5e2dff90..ed16af4c942c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalResponse.java index 819c8bbbd8d9..f50739f61462 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateResponse.java index 835d537ff9a8..10ff7b198cde 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java index 731938d27919..24deaa34825e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.PageList; /** * Contains all response data for the getPageRangesDiff operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java index aa5f60f5ab42..2bb47dcc7ec8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.PageList; /** * Contains all response data for the getPageRanges operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeResponse.java index 27f0cb1c38d3..6fc9017334e7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberResponse.java index 3855cd4a7ba5..3dad60f60273 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLResponse.java index f21558d5d6bf..f52f68f3955a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesResponse.java index 4d0c46ce08ca..1b4ec38e1259 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java new file mode 100644 index 000000000000..02caf3ce4b81 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for PremiumPageBlobAccessTier. + */ +public final class PremiumPageBlobAccessTier extends ExpandableStringEnum { + /** + * Static value P4 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P4 = fromString("P4"); + + /** + * Static value P6 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P6 = fromString("P6"); + + /** + * Static value P10 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P10 = fromString("P10"); + + /** + * Static value P15 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P15 = fromString("P15"); + + /** + * Static value P20 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P20 = fromString("P20"); + + /** + * Static value P30 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P30 = fromString("P30"); + + /** + * Static value P40 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P40 = fromString("P40"); + + /** + * Static value P50 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P50 = fromString("P50"); + + /** + * Static value P60 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P60 = fromString("P60"); + + /** + * Static value P70 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P70 = fromString("P70"); + + /** + * Static value P80 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P80 = fromString("P80"); + + /** + * Creates or finds a PremiumPageBlobAccessTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding PremiumPageBlobAccessTier. + */ + @JsonCreator + public static PremiumPageBlobAccessTier fromString(String name) { + return fromString(name, PremiumPageBlobAccessTier.class); + } + + /** + * @return known PremiumPageBlobAccessTier values. + */ + public static Collection values() { + return values(PremiumPageBlobAccessTier.class); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java index a0620f6b7fd9..4ce34154b39f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java @@ -2,10 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.blob.models.AccountKind; +import com.azure.storage.blob.models.SkuName; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetPropertiesHeaders.java index 97070fb21fe9..e39262e78d5c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetStatisticsHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetStatisticsHeaders.java index d2abc7c6d1ff..c506d8da0758 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetStatisticsHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetUserDelegationKeyHeaders.java similarity index 99% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetUserDelegationKeyHeaders.java index cc26fc24faea..87021a809d5a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetUserDelegationKeyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceListContainersSegmentHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceListContainersSegmentHeaders.java index b1ccee15c3dc..9f73b4639d2e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceListContainersSegmentHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSetPropertiesHeaders.java index 0f9f3075e088..d2170a930661 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSubmitBatchHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSubmitBatchHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSubmitBatchHeaders.java index 366c1d9fbd13..e8e76733f46c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceSubmitBatchHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoResponse.java index e4817e49e208..0c0cb1c675d5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java similarity index 91% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java index 231f3e8385a0..8259f6c7629b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.StorageServiceProperties; /** * Contains all response data for the getProperties operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java index 80f7beedfc19..9313cc66c15b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.StorageServiceStats; /** * Contains all response data for the getStatistics operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java index 4c221693725d..e7f1cb7687ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.blob.models.UserDelegationKey; /** * Contains all response data for the getUserDelegationKey operation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentResponse.java index 987868fd194a..b417a42c47c9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesSetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesSetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesResponse.java index db07375b93e7..0bf963b149cd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesSetPropertiesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchResponse.java similarity index 96% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchResponse.java index 06b222204d05..01c39398b3ae 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.blob.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java new file mode 100644 index 000000000000..6bbb6466b7e3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for AzureBlobStorage. + */ +package com.azure.storage.blob.implementation.models; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java index d522ec00c3d9..118f8307eb39 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java @@ -4,6 +4,9 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobAppendBlockHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobCreateHeaders; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java similarity index 89% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java index b07ca4bbd5cf..b2bf5d25e0c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessConditions.java @@ -9,7 +9,7 @@ * passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more * information on those particular access conditions. */ -public final class ContainerAccessConditions { +public final class BlobContainerAccessConditions { private ModifiedAccessConditions modifiedAccessConditions; @@ -18,7 +18,7 @@ public final class ContainerAccessConditions { /** * Creates an instance which has fields set to non-null, empty values. */ - public ContainerAccessConditions() { + public BlobContainerAccessConditions() { this.modifiedAccessConditions = new ModifiedAccessConditions(); this.leaseAccessConditions = new LeaseAccessConditions(); } @@ -42,7 +42,7 @@ public ModifiedAccessConditions getModifiedAccessConditions() { * @param modifiedAccessConditions the modified access conditions to set * @return the updated ContainerAccessConditions object */ - public ContainerAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { + public BlobContainerAccessConditions setModifiedAccessConditions(ModifiedAccessConditions modifiedAccessConditions) { this.modifiedAccessConditions = modifiedAccessConditions; return this; } @@ -64,7 +64,7 @@ public LeaseAccessConditions getLeaseAccessConditions() { * @param leaseID the lease access conditions to set * @return the updated ContainerAccessConditions object */ - public ContainerAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseID) { + public BlobContainerAccessConditions setLeaseAccessConditions(LeaseAccessConditions leaseID) { this.leaseAccessConditions = leaseID; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java similarity index 84% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java index 48eaa05a91ea..ff7b759284a4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerAccessPolicies.java @@ -8,11 +8,11 @@ /** * This class contains values which correlate to the access polices set on a specific container. */ -public class ContainerAccessPolicies { +public class BlobContainerAccessPolicies { private final PublicAccessType blobAccessType; private final List identifiers; - public ContainerAccessPolicies(PublicAccessType blobAccessType, List identifiers) { + public BlobContainerAccessPolicies(PublicAccessType blobAccessType, List identifiers) { this.blobAccessType = blobAccessType; this.identifiers = identifiers; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java similarity index 85% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java index 8f4052ffc7ff..075fe680dec7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java @@ -14,7 +14,7 @@ */ @JacksonXmlRootElement(localName = "Container") @Fluent -public final class ContainerItem { +public final class BlobContainerItem { /* * The name property. */ @@ -25,7 +25,7 @@ public final class ContainerItem { * The properties property. */ @JsonProperty(value = "Properties", required = true) - private ContainerProperties properties; + private BlobContainerProperties properties; /* * The metadata property. @@ -48,7 +48,7 @@ public String getName() { * @param name the name value to set. * @return the ContainerItem object itself. */ - public ContainerItem setName(String name) { + public BlobContainerItem setName(String name) { this.name = name; return this; } @@ -58,7 +58,7 @@ public ContainerItem setName(String name) { * * @return the properties value. */ - public ContainerProperties getProperties() { + public BlobContainerProperties getProperties() { return this.properties; } @@ -68,7 +68,7 @@ public ContainerProperties getProperties() { * @param properties the properties value to set. * @return the ContainerItem object itself. */ - public ContainerItem setProperties(ContainerProperties properties) { + public BlobContainerItem setProperties(BlobContainerProperties properties) { this.properties = properties; return this; } @@ -88,7 +88,7 @@ public Map getMetadata() { * @param metadata the metadata value to set. * @return the ContainerItem object itself. */ - public ContainerItem setMetadata(Map metadata) { + public BlobContainerItem setMetadata(Map metadata) { this.metadata = metadata; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java similarity index 63% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java index ca8f39373487..6f6511698c10 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerListDetails.java @@ -11,11 +11,11 @@ * requests, so changing the details for a different listing operation requires construction of a new object. Null may * be passed if none of the options are desirable. */ -public final class ContainerListDetails { +public final class BlobContainerListDetails { - private boolean metadata; + private boolean retrieveMetadata; - public ContainerListDetails() { + public BlobContainerListDetails() { } @@ -24,27 +24,27 @@ public ContainerListDetails() { * * @return a flag indicating whether metadata should be returned in the listing */ - public boolean getMetadata() { - return this.metadata; + public boolean getRetrieveMetadata() { + return this.retrieveMetadata; } /** * Whether metadata should be returned. * - * @param metadata Flag indicating whether metadata should be returned + * @param retrieveMetadata Flag indicating whether metadata should be returned * @return the updated ContainerListDetails object */ - public ContainerListDetails setMetadata(boolean metadata) { - this.metadata = metadata; + public BlobContainerListDetails setRetrieveMetadata(boolean retrieveMetadata) { + this.retrieveMetadata = retrieveMetadata; return this; } /** * @return the listing flags */ - public ListContainersIncludeType toIncludeType() { - if (this.metadata) { - return ListContainersIncludeType.METADATA; + public ListBlobContainersIncludeType toIncludeType() { + if (this.retrieveMetadata) { + return ListBlobContainersIncludeType.METADATA; } return null; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java similarity index 89% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java index 32dc9dba8d77..9ce79fb00916 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,7 +15,7 @@ */ @JacksonXmlRootElement(localName = "ContainerProperties") @Fluent -public final class ContainerProperties { +public final class BlobContainerProperties { /* * The lastModified property. */ @@ -83,7 +83,7 @@ public OffsetDateTime getLastModified() { * @param lastModified the lastModified value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setLastModified(OffsetDateTime lastModified) { + public BlobContainerProperties setLastModified(OffsetDateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { @@ -107,7 +107,7 @@ public String getEtag() { * @param etag the etag value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setEtag(String etag) { + public BlobContainerProperties setEtag(String etag) { this.etag = etag; return this; } @@ -129,7 +129,7 @@ public LeaseStatusType getLeaseStatus() { * @param leaseStatus the leaseStatus value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setLeaseStatus(LeaseStatusType leaseStatus) { + public BlobContainerProperties setLeaseStatus(LeaseStatusType leaseStatus) { this.leaseStatus = leaseStatus; return this; } @@ -151,7 +151,7 @@ public LeaseStateType getLeaseState() { * @param leaseState the leaseState value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setLeaseState(LeaseStateType leaseState) { + public BlobContainerProperties setLeaseState(LeaseStateType leaseState) { this.leaseState = leaseState; return this; } @@ -173,7 +173,7 @@ public LeaseDurationType getLeaseDuration() { * @param leaseDuration the leaseDuration value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setLeaseDuration(LeaseDurationType leaseDuration) { + public BlobContainerProperties setLeaseDuration(LeaseDurationType leaseDuration) { this.leaseDuration = leaseDuration; return this; } @@ -195,7 +195,7 @@ public PublicAccessType getPublicAccess() { * @param publicAccess the publicAccess value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setPublicAccess(PublicAccessType publicAccess) { + public BlobContainerProperties setPublicAccess(PublicAccessType publicAccess) { this.publicAccess = publicAccess; return this; } @@ -217,7 +217,7 @@ public Boolean isHasImmutabilityPolicy() { * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) { + public BlobContainerProperties setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) { this.hasImmutabilityPolicy = hasImmutabilityPolicy; return this; } @@ -237,7 +237,7 @@ public Boolean isHasLegalHold() { * @param hasLegalHold the hasLegalHold value to set. * @return the ContainerProperties object itself. */ - public ContainerProperties setHasLegalHold(Boolean hasLegalHold) { + public BlobContainerProperties setHasLegalHold(Boolean hasLegalHold) { this.hasLegalHold = hasLegalHold; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index bed5b3eca9f8..422e3b7e6bd1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -4,9 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java index c725855e5d9d..12c92d5994fb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java @@ -3,27 +3,27 @@ package com.azure.storage.blob.models; -import com.azure.storage.blob.ContainerClient; +import com.azure.storage.blob.BlobContainerClient; import java.util.ArrayList; /** * This type allows users to specify additional information the service should return with each blob when listing blobs - * in a container (via a {@link ContainerClient} object). This type is immutable to ensure thread-safety of requests, so + * in a container (via a {@link BlobContainerClient} object). This type is immutable to ensure thread-safety of requests, so * changing the details for a different listing operation requires construction of a new object. Null may be passed if * none of the options are desirable. */ public final class BlobListDetails { - private boolean copy; + private boolean retrieveCopy; - private boolean metadata; + private boolean retrieveMetadata; - private boolean snapshots; + private boolean retrieveSnapshots; - private boolean uncommittedBlobs; + private boolean retrieveUncommittedBlobs; - private boolean deletedBlobs; + private boolean retrieveDeletedBlobs; public BlobListDetails() { } @@ -34,19 +34,19 @@ public BlobListDetails() { * * @return a flag indicating if copy information will be returned in the listing */ - public boolean getCopy() { - return copy; + public boolean getRetrieveCopy() { + return retrieveCopy; } /** * Whether blob metadata related to any current or previous Copy Blob operation should be included in the * response. * - * @param copy Flag indicating whether copy information should be returned + * @param retrieveCopy Flag indicating whether copy information should be returned * @return the updated BlobListDetails object */ - public BlobListDetails setCopy(boolean copy) { - this.copy = copy; + public BlobListDetails setRetrieveCopy(boolean retrieveCopy) { + this.retrieveCopy = retrieveCopy; return this; } @@ -55,18 +55,18 @@ public BlobListDetails setCopy(boolean copy) { * * @return a flag indicating if metadata will be returned in the listing */ - public boolean getMetadata() { - return metadata; + public boolean getRetrieveMetadata() { + return retrieveMetadata; } /** * Whether blob metadata should be returned. * - * @param metadata Flag indicating whether metadata should be returned + * @param retrieveMetadata Flag indicating whether metadata should be returned * @return the updated BlobListDetails object */ - public BlobListDetails setMetadata(boolean metadata) { - this.metadata = metadata; + public BlobListDetails setRetrieveMetadata(boolean retrieveMetadata) { + this.retrieveMetadata = retrieveMetadata; return this; } @@ -75,18 +75,18 @@ public BlobListDetails setMetadata(boolean metadata) { * * @return a flag indicating if snapshots will be returned in the listing */ - public boolean getSnapshots() { - return snapshots; + public boolean getRetrieveSnapshots() { + return retrieveSnapshots; } /** * Whether snapshots should be returned. Snapshots are listed from oldest to newest. * - * @param snapshots Flag indicating whether snapshots should be returned + * @param retrieveSnapshots Flag indicating whether snapshots should be returned * @return the updated BlobListDetails object */ - public BlobListDetails setSnapshots(boolean snapshots) { - this.snapshots = snapshots; + public BlobListDetails setRetrieveSnapshots(boolean retrieveSnapshots) { + this.retrieveSnapshots = retrieveSnapshots; return this; } @@ -96,19 +96,19 @@ public BlobListDetails setSnapshots(boolean snapshots) { * * @return a flag indicating if uncommitted blobs will be returned in the listing */ - public boolean getUncommittedBlobs() { - return uncommittedBlobs; + public boolean getRetrieveUncommittedBlobs() { + return retrieveUncommittedBlobs; } /** * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, * should be included in the response. * - * @param uncommittedBlobs Flag indicating whether uncommitted blobs should be returned + * @param retrieveUncommittedBlobs Flag indicating whether uncommitted blobs should be returned * @return the updated BlobListDetails object */ - public BlobListDetails setUncommittedBlobs(boolean uncommittedBlobs) { - this.uncommittedBlobs = uncommittedBlobs; + public BlobListDetails setRetrieveUncommittedBlobs(boolean retrieveUncommittedBlobs) { + this.retrieveUncommittedBlobs = retrieveUncommittedBlobs; return this; } @@ -117,18 +117,18 @@ public BlobListDetails setUncommittedBlobs(boolean uncommittedBlobs) { * * @return a flag indicating if deleted blobs will be returned in the listing */ - public boolean getDeletedBlobs() { - return deletedBlobs; + public boolean getRetrieveDeletedBlobs() { + return retrieveDeletedBlobs; } /** * Whether blobs which have been soft deleted should be returned. * - * @param deletedBlobs Flag indicating whether deleted blobs should be returned + * @param retrieveDeletedBlobs Flag indicating whether deleted blobs should be returned * @return the updated BlobListDetails object */ - public BlobListDetails setDeletedBlobs(boolean deletedBlobs) { - this.deletedBlobs = deletedBlobs; + public BlobListDetails setRetrieveDeletedBlobs(boolean retrieveDeletedBlobs) { + this.retrieveDeletedBlobs = retrieveDeletedBlobs; return this; } @@ -137,19 +137,19 @@ public BlobListDetails setDeletedBlobs(boolean deletedBlobs) { */ public ArrayList toList() { ArrayList details = new ArrayList<>(); - if (this.copy) { + if (this.retrieveCopy) { details.add(ListBlobsIncludeItem.COPY); } - if (this.deletedBlobs) { + if (this.retrieveDeletedBlobs) { details.add(ListBlobsIncludeItem.DELETED); } - if (this.metadata) { + if (this.retrieveMetadata) { details.add(ListBlobsIncludeItem.METADATA); } - if (this.snapshots) { + if (this.retrieveSnapshots) { details.add(ListBlobsIncludeItem.SNAPSHOTS); } - if (this.uncommittedBlobs) { + if (this.retrieveUncommittedBlobs) { details.add(ListBlobsIncludeItem.UNCOMMITTEDBLOBS); } return details; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java deleted file mode 100644 index 5d1849527bcc..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java +++ /dev/null @@ -1,72 +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.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.Map; - -/** - * The BlobMetadata model. - */ -@JacksonXmlRootElement(localName = "Metadata") -@Fluent -public final class BlobMetadata { - /* - * Unmatched properties from the message are deserialized this collection - */ - @JsonProperty(value = "additionalProperties") - private Map additionalProperties; - - /* - * The encrypted property. - */ - @JacksonXmlProperty(localName = "Encrypted", isAttribute = true) - private String encrypted; - - /** - * Get the additionalProperties property: Unmatched properties from the - * message are deserialized this collection. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Unmatched properties from the - * message are deserialized this collection. - * - * @param additionalProperties the additionalProperties value to set. - * @return the BlobMetadata object itself. - */ - public BlobMetadata additionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Get the encrypted property: The encrypted property. - * - * @return the encrypted value. - */ - public String encrypted() { - return this.encrypted; - } - - /** - * Set the encrypted property: The encrypted property. - * - * @param encrypted the encrypted value to set. - * @return the BlobMetadata object itself. - */ - public BlobMetadata encrypted(String encrypted) { - this.encrypted = encrypted; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index 872fdf8f094c..30ce8de74efd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java index 1f5565477f9b..eaf54e710dbc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java @@ -4,6 +4,8 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.blob.implementation.models.BlockBlobCommitBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobUploadHeaders; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockItem.java deleted file mode 100644 index c55abb80551f..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockItem.java +++ /dev/null @@ -1,45 +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.storage.blob.models; - -/** - * Represents a single block in a block blob. - */ -public final class BlockItem { - /* Internal block object. */ - private final Block block; - private final boolean isCommitted; - - /** - * Creates an instance of a BlobItem. - * @param block the API blob object - * @param isCommitted if the blob is committed - */ - public BlockItem(Block block, boolean isCommitted) { - this.block = block; - this.isCommitted = isCommitted; - } - - /** - * @return the base64 encoded block ID. - */ - public String getName() { - return this.block.getName(); - } - - /** - * @return the block size in bytes. - */ - public int getSize() { - return this.block.getSize(); - } - - /** - * @return if the block has been committed. - */ - public boolean isCommitted() { - return isCommitted; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java index cc3484fe9c99..d29b0bbb65ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKey.java @@ -3,11 +3,14 @@ package com.azure.storage.blob.models; +import com.azure.core.util.logging.ClientLogger; + import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Base64; public class CustomerProvidedKey { + private final ClientLogger logger = new ClientLogger(CustomerProvidedKey.class); /** * Base64 encoded string of the encryption key. @@ -30,13 +33,18 @@ public class CustomerProvidedKey { * Creates a new wrapper for a client provided key. * * @param key The encryption key encoded as a base64 string. - * @throws NoSuchAlgorithmException Throws if MessageDigest "SHA-256" cannot be found. + * @throws RuntimeException If "SHA-256" cannot be found. */ - public CustomerProvidedKey(String key) throws NoSuchAlgorithmException { + public CustomerProvidedKey(String key) { this.key = key; - MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); + MessageDigest sha256; + try { + sha256 = MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } byte[] keyhash = sha256.digest(Base64.getDecoder().decode(key)); this.keySHA256 = Base64.getEncoder().encodeToString(keyhash); } @@ -46,13 +54,18 @@ public CustomerProvidedKey(String key) throws NoSuchAlgorithmException { * * @param key The encryption key bytes. * - * @throws NoSuchAlgorithmException Throws if MessageDigest "SHA-256" cannot be found. + * @throws RuntimeException If "SHA-256" cannot be found. */ - public CustomerProvidedKey(byte[] key) throws NoSuchAlgorithmException { + public CustomerProvidedKey(byte[] key) { this.key = Base64.getEncoder().encodeToString(key); - MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); + MessageDigest sha256; + try { + sha256 = MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } byte[] keyhash = sha256.digest(key); this.keySHA256 = Base64.getEncoder().encodeToString(keyhash); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKeyInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKeyInfo.java deleted file mode 100644 index 370bf5dbc4d3..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomerProvidedKeyInfo.java +++ /dev/null @@ -1,51 +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.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * Additional parameters for a set of operations. - */ -@JacksonXmlRootElement(localName = "customer-provided-key-info") -@Fluent -public final class CustomerProvidedKeyInfo { - /* - * Optional. Specifies the encryption scope to use to encrypt the data - * provided in the request. If not specified, encryption is performed with - * the root account encryption key. For more information, see Encryption - * at Rest for Azure Storage Services. - */ - @JsonProperty(value = "encryptionScope") - private String encryptionScope; - - /** - * Get the encryptionScope property: Optional. Specifies the encryption - * scope to use to encrypt the data provided in the request. If not - * specified, encryption is performed with the root account encryption key. - * For more information, see Encryption at Rest for Azure Storage Services. - * - * @return the encryptionScope value. - */ - public String encryptionScope() { - return this.encryptionScope; - } - - /** - * Set the encryptionScope property: Optional. Specifies the encryption - * scope to use to encrypt the data provided in the request. If not - * specified, encryption is performed with the root account encryption key. - * For more information, see Encryption at Rest for Azure Storage Services. - * - * @param encryptionScope the encryptionScope value to set. - * @return the CustomerProvidedKeyInfo object itself. - */ - public CustomerProvidedKeyInfo encryptionScope(String encryptionScope) { - this.encryptionScope = encryptionScope; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsItem.java deleted file mode 100644 index 1a7a8059e67d..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsItem.java +++ /dev/null @@ -1,94 +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.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * The FilterBlobsItem model. - */ -@JacksonXmlRootElement(localName = "Blob") -@Fluent -public final class FilterBlobsItem { - /* - * The name property. - */ - @JsonProperty(value = "Name") - private String name; - - /* - * The containerName property. - */ - @JsonProperty(value = "ContainerName") - private String containerName; - - /* - * The tagValue property. - */ - @JsonProperty(value = "TagValue") - private String tagValue; - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the FilterBlobsItem object itself. - */ - public FilterBlobsItem name(String name) { - this.name = name; - return this; - } - - /** - * Get the containerName property: The containerName property. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: The containerName property. - * - * @param containerName the containerName value to set. - * @return the FilterBlobsItem object itself. - */ - public FilterBlobsItem containerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the tagValue property: The tagValue property. - * - * @return the tagValue value. - */ - public String tagValue() { - return this.tagValue; - } - - /** - * Set the tagValue property: The tagValue property. - * - * @param tagValue the tagValue value to set. - * @return the FilterBlobsItem object itself. - */ - public FilterBlobsItem tagValue(String tagValue) { - this.tagValue = tagValue; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsResponse.java deleted file mode 100644 index 9055886cb366..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsResponse.java +++ /dev/null @@ -1,173 +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.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** - * An enumeration of blobs which matched the filter. - */ -@JacksonXmlRootElement(localName = "EnumerationResults") -@Fluent -public final class FilterBlobsResponse { - /* - * The serviceEndpoint property. - */ - @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) - private String serviceEndpoint; - - /* - * The filter property. - */ - @JsonProperty(value = "Filter", required = true) - private String filter; - - /* - * The marker property. - */ - @JsonProperty(value = "Marker") - private String marker; - - /* - * The maxResults property. - */ - @JsonProperty(value = "MaxResults") - private Integer maxResults; - - /* - * The segment property. - */ - @JsonProperty(value = "Blobs", required = true) - private FilterBlobsSegment segment; - - /* - * The nextMarker property. - */ - @JsonProperty(value = "NextMarker", required = true) - private String nextMarker; - - /** - * Get the serviceEndpoint property: The serviceEndpoint property. - * - * @return the serviceEndpoint value. - */ - public String serviceEndpoint() { - return this.serviceEndpoint; - } - - /** - * Set the serviceEndpoint property: The serviceEndpoint property. - * - * @param serviceEndpoint the serviceEndpoint value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse serviceEndpoint(String serviceEndpoint) { - this.serviceEndpoint = serviceEndpoint; - return this; - } - - /** - * Get the filter property: The filter property. - * - * @return the filter value. - */ - public String filter() { - return this.filter; - } - - /** - * Set the filter property: The filter property. - * - * @param filter the filter value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Get the marker property: The marker property. - * - * @return the marker value. - */ - public String marker() { - return this.marker; - } - - /** - * Set the marker property: The marker property. - * - * @param marker the marker value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse marker(String marker) { - this.marker = marker; - return this; - } - - /** - * Get the maxResults property: The maxResults property. - * - * @return the maxResults value. - */ - public Integer maxResults() { - return this.maxResults; - } - - /** - * Set the maxResults property: The maxResults property. - * - * @param maxResults the maxResults value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse maxResults(Integer maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Get the segment property: The segment property. - * - * @return the segment value. - */ - public FilterBlobsSegment getSegment() { - return this.segment; - } - - /** - * Set the segment property: The segment property. - * - * @param segment the segment value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse segment(FilterBlobsSegment segment) { - this.segment = segment; - return this; - } - - /** - * Get the nextMarker property: The nextMarker property. - * - * @return the nextMarker value. - */ - public String getNextMarker() { - return this.nextMarker; - } - - /** - * Set the nextMarker property: The nextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the FilterBlobsResponse object itself. - */ - public FilterBlobsResponse nextMarker(String nextMarker) { - this.nextMarker = nextMarker; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsSegment.java deleted file mode 100644 index a96c0db38e14..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FilterBlobsSegment.java +++ /dev/null @@ -1,44 +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.storage.blob.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.ArrayList; -import java.util.List; - -/** - * The FilterBlobsSegment model. - */ -@JacksonXmlRootElement(localName = "Blobs") -@Fluent -public final class FilterBlobsSegment { - /* - * The blobItems property. - */ - @JsonProperty("Blob") - private List blobItems = new ArrayList<>(); - - /** - * Get the blobItems property: The blobItems property. - * - * @return the blobItems value. - */ - public List getBlobItems() { - return this.blobItems; - } - - /** - * Set the blobItems property: The blobItems property. - * - * @param blobItems the blobItems value to set. - * @return the FilterBlobsSegment object itself. - */ - public FilterBlobsSegment blobItems(List blobItems) { - this.blobItems = blobItems; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java index abff7dddaab4..9ab4c4e3f73e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java similarity index 77% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java index 692bdc63286b..dc7200e8b79b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java @@ -10,7 +10,7 @@ /** * Defines values for ListContainersIncludeType. */ -public enum ListContainersIncludeType { +public enum ListBlobContainersIncludeType { /** * Enum value metadata. */ @@ -21,7 +21,7 @@ public enum ListContainersIncludeType { */ private final String value; - ListContainersIncludeType(String value) { + ListBlobContainersIncludeType(String value) { this.value = value; } @@ -32,9 +32,9 @@ public enum ListContainersIncludeType { * @return the parsed ListContainersIncludeType object, or null if unable to parse. */ @JsonCreator - public static ListContainersIncludeType fromString(String value) { - ListContainersIncludeType[] items = ListContainersIncludeType.values(); - for (ListContainersIncludeType item : items) { + public static ListBlobContainersIncludeType fromString(String value) { + ListBlobContainersIncludeType[] items = ListBlobContainersIncludeType.values(); + for (ListBlobContainersIncludeType item : items) { if (item.toString().equalsIgnoreCase(value)) { return item; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java similarity index 76% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java index a50b02a38423..c53dccca4f2b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersOptions.java @@ -11,31 +11,31 @@ * object. See the constructor for details on each of the options. Null may be passed in place of an object of this type * if no options are desirable. */ -public final class ListContainersOptions { - private final ClientLogger logger = new ClientLogger(ListContainersOptions.class); +public final class ListBlobContainersOptions { + private final ClientLogger logger = new ClientLogger(ListBlobContainersOptions.class); - private ContainerListDetails details; + private BlobContainerListDetails details; private String prefix; private Integer maxResults; - public ListContainersOptions() { - this.details = new ContainerListDetails(); + public ListBlobContainersOptions() { + this.details = new BlobContainerListDetails(); } /** * @return the details for listing specific containers */ - public ContainerListDetails getDetails() { + public BlobContainerListDetails getDetails() { return details; } /** * @param details The details for listing specific containers - * @return the updated ListContainersOptions object + * @return the updated ListBlobContainersOptions object */ - public ListContainersOptions setDetails(ContainerListDetails details) { + public ListBlobContainersOptions setDetails(BlobContainerListDetails details) { this.details = details; return this; } @@ -53,9 +53,9 @@ public String getPrefix() { * Filters the results to return only blobs whose names begin with the specified prefix. * * @param prefix The prefix that a container must match to be returned - * @return the updated ListContainersOptions object + * @return the updated ListBlobContainersOptions object */ - public ListContainersOptions setPrefix(String prefix) { + public ListBlobContainersOptions setPrefix(String prefix) { this.prefix = prefix; return this; } @@ -75,10 +75,10 @@ public Integer getMaxResults() { * specify maxResults or specifies a value greater than 5,000, the server will return up to 5,000 items. * * @param maxResults The number of containers to return in a single response - * @return the updated ListContainersOptions object + * @return the updated ListBlobContainersOptions object * @throws IllegalArgumentException If {@code maxResults} is less than or equal to {@code 0}. */ - public ListContainersOptions setMaxResults(Integer maxResults) { + public ListBlobContainersOptions setMaxResults(Integer maxResults) { if (maxResults != null && maxResults <= 0) { throw logger.logExceptionAsError(new IllegalArgumentException("MaxResults must be greater than 0.")); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index 56b14cd7fda5..489d9e72d52e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -4,10 +4,10 @@ package com.azure.storage.blob.models; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.ContainerClient; +import com.azure.storage.blob.BlobContainerClient; /** - * Defines options available to configure the behavior of a call to listBlobsFlatSegment on a {@link ContainerClient} + * Defines options available to configure the behavior of a call to listBlobsFlatSegment on a {@link BlobContainerClient} * object. See the constructor for details on each of the options. */ public final class ListBlobsOptions { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metadata.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metadata.java deleted file mode 100644 index b93413a57950..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metadata.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -import java.util.HashMap; -import java.util.Map; - -/** - * Contains metadata key/value pairs to be associated with a storage resource. The user may store any additional - * information about the resource that they like using this map. It is passed to create and setMetadata methods on any - * URL type. Null may be passed to set no metadata. - */ -public final class Metadata extends HashMap { - - // The Metadata is an offshoot of extending HashMap, which implements Serializable. - private static final long serialVersionUID = -6557244540575247796L; - - public Metadata() { - super(); - } - - public Metadata(Map m) { - super(m); - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java index becba0bca4ea..a7c29031cd18 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java index afebfc883491..eaf1e5d50496 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java @@ -4,6 +4,12 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.blob.implementation.models.PageBlobClearPagesHeaders; +import com.azure.storage.blob.implementation.models.PageBlobCreateHeaders; +import com.azure.storage.blob.implementation.models.PageBlobResizeHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUpdateSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUploadPagesFromURLHeaders; +import com.azure.storage.blob.implementation.models.PageBlobUploadPagesHeaders; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java new file mode 100644 index 000000000000..fe4dc30e1cab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ParallelTransferOptions.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.storage.common.Constants; +import com.azure.storage.common.Utility; + +public class ParallelTransferOptions { + + private static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; + private static final int BLOB_MAX_BLOCK_SIZE = 100 * Constants.MB; + + private static final int BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS = 8; + + private int blockSize; + private int numBuffers; + + /** + * Creates a new {@link ParallelTransferOptions} with default parameters applied. + * blockSize = 4MB + * numBuffers = 8 + */ + public ParallelTransferOptions() { + this.blockSize = BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + this.numBuffers = BLOB_DEFAULT_NUMBER_OF_PARALLEL_TRANSFERS; + } + + /** + * Gets the block size (chunk size) to transfer at a time. + * @return The block size. + */ + public int getBlockSize() { + return this.blockSize; + } + + /** + * Gets the number of buffers being used for a transfer operation. + * @return The number of buffers. + */ + public int getNumBuffers() { + return this.numBuffers; + } + + /** + * Sets the block size or the size of a chunk to transfer at a time. + * @param blockSize The block size. + * For upload, The block size is the size of each block that will be staged. This value also determines the size + * that each buffer used by this method will be and determines the number of requests that need to be made. The + * amount of memory consumed by this method may be up to blockSize * numBuffers. If block size is large, upload + * will make fewer network calls, but each individual call will send more data and will therefore take longer. + * @return The updated ParallelTransferOptions object. + * @throws IllegalArgumentException when block size is less than 0 or greater than max blob block size (10MB). + */ + public ParallelTransferOptions setBlockSize(int blockSize) { + Utility.assertInBounds("blockSize", blockSize, 0, BLOB_MAX_BLOCK_SIZE); + this.blockSize = blockSize; + return this; + } + + /** + * Sets the number of buffers being used for an upload/download operation. + * @param numBuffers The number of buffers. + * For upload, The number of buffers is the maximum number of buffers this method should allocate. + * Must be at least two. Typically, the larger the number of buffers, the more parallel, and thus faster, the + * upload portion of this operation will be. The amount of memory consumed by this method may be up to + * blockSize * numBuffers. + * @return The updated ParallelTransferOptions object. + * @throws IllegalArgumentException when numBuffers is less than 2. + */ + public ParallelTransferOptions setNumBuffers(int numBuffers) { + Utility.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); + this.numBuffers = numBuffers; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java index 0120f0e3c35e..20171492b04b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java @@ -4,7 +4,7 @@ package com.azure.storage.blob.models; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.DownloadAsyncResponse; +import com.azure.storage.blob.specialized.DownloadAsyncResponse; import java.util.Locale; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceFilterBlobsHeaders.java deleted file mode 100644 index ac5154b09c95..000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceFilterBlobsHeaders.java +++ /dev/null @@ -1,201 +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.storage.blob.models; - -import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for FilterBlobs operation. - */ -@JacksonXmlRootElement(localName = "Service-FilterBlobs-Headers") -@Fluent -public final class ServiceFilterBlobsHeaders { - /* - * The media type of the body of the response. For Filter Blobs this is - * 'application/xml' - */ - @JsonProperty(value = "Content-Type") - private String contentType; - - /* - * If a client request id header is sent in the request, this header will - * be present in the response with the same value. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String clientRequestId; - - /* - * This header uniquely identifies the request that was made and can be - * used for troubleshooting the request. - */ - @JsonProperty(value = "x-ms-request-id") - private String requestId; - - /* - * Indicates the version of the Blob service used to execute the request. - * This header is returned for requests made against version 2009-09-19 and - * above. - */ - @JsonProperty(value = "x-ms-version") - private String version; - - /* - * UTC date/time value generated by the service that indicates the time at - * which the response was initiated - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /* - * The errorCode property. - */ - @JsonProperty(value = "x-ms-error-code") - private String errorCode; - - /** - * Get the contentType property: The media type of the body of the - * response. For Filter Blobs this is 'application/xml'. - * - * @return the contentType value. - */ - public String contentType() { - return this.contentType; - } - - /** - * Set the contentType property: The media type of the body of the - * response. For Filter Blobs this is 'application/xml'. - * - * @param contentType the contentType value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders contentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the clientRequestId property: If a client request id header is sent - * in the request, this header will be present in the response with the - * same value. - * - * @return the clientRequestId value. - */ - public String clientRequestId() { - return this.clientRequestId; - } - - /** - * Set the clientRequestId property: If a client request id header is sent - * in the request, this header will be present in the response with the - * same value. - * - * @param clientRequestId the clientRequestId value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders clientRequestId(String clientRequestId) { - this.clientRequestId = clientRequestId; - return this; - } - - /** - * Get the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @return the requestId value. - */ - public String requestId() { - return this.requestId; - } - - /** - * Set the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @param requestId the requestId value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders requestId(String requestId) { - this.requestId = requestId; - return this; - } - - /** - * Get the version property: Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made - * against version 2009-09-19 and above. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made - * against version 2009-09-19 and above. - * - * @param version the version value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders version(String version) { - this.version = version; - return this; - } - - /** - * Get the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. - * - * @return the dateProperty value. - */ - public OffsetDateTime dateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. - * - * @param dateProperty the dateProperty value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders dateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the errorCode property: The errorCode property. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: The errorCode property. - * - * @param errorCode the errorCode value to set. - * @return the ServiceFilterBlobsHeaders object itself. - */ - public ServiceFilterBlobsHeaders errorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java index 58660bcff35a..1e28f1940ba2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java index d019752ac029..33f8479ecadc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java @@ -2,6 +2,10 @@ // Licensed under the MIT License. package com.azure.storage.blob.models; +import com.azure.storage.blob.implementation.models.BlobGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.ContainerGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.ServiceGetAccountInfoHeaders; + public class StorageAccountInfo { private final SkuName skuName; private final AccountKind accountKind; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java index 5ef1a7209dee..0ff94f712a3b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java @@ -537,6 +537,31 @@ public final class StorageErrorCode extends ExpandableStringEnum - * This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link BlobServiceAsyncClient}. + * This client contains operations on a blob. Operations on a container are available on {@link + * BlobContainerAsyncClient}, and operations on the service are available on {@link BlobServiceAsyncClient}. * *

    * Please refer to the Azure @@ -48,8 +51,8 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) -public final class AppendBlobAsyncClient extends BlobAsyncClient { +@ServiceClient(builder = SpecializedBlobClientBuilder.class, isAsync = true) +public final class AppendBlobAsyncClient extends BlobAsyncClientBase { /** * Indicates the maximum number of bytes that can be sent in a call to appendBlock. */ @@ -74,7 +77,7 @@ public final class AppendBlobAsyncClient extends BlobAsyncClient { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.create} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.create} * * @return A {@link Mono} containing the information of the created appended blob. */ @@ -87,27 +90,26 @@ public Mono create() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions} * * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param accessConditions {@link BlobAccessConditions} * @return A {@link Mono} containing {@link Response} whose {@link Response#getValue() value} contains the created * appended blob. */ - public Mono> createWithResponse(BlobHTTPHeaders headers, Metadata metadata, + public Mono> createWithResponse(BlobHTTPHeaders headers, Map metadata, BlobAccessConditions accessConditions) { return withContext(context -> createWithResponse(headers, metadata, accessConditions, context)); } - Mono> createWithResponse(BlobHTTPHeaders headers, Metadata metadata, + Mono> createWithResponse(BlobHTTPHeaders headers, Map metadata, BlobAccessConditions accessConditions, Context context) { - metadata = (metadata == null) ? new Metadata() : metadata; accessConditions = (accessConditions == null) ? new BlobAccessConditions() : accessConditions; return postProcessResponse(this.azureBlobStorage.appendBlobs().createWithRestResponseAsync(null, - null, 0, null, metadata, null, headers, accessConditions.getLeaseAccessConditions(), cpk, - accessConditions.getModifiedAccessConditions(), context)) + null, 0, null, metadata, null, headers, accessConditions.getLeaseAccessConditions(), + getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new AppendBlobItem(rb.getDeserializedHeaders()))); } @@ -119,7 +121,7 @@ Mono> createWithResponse(BlobHTTPHeaders headers, Metad * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.appendBlock#Flux-long} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlock#Flux-long} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -139,7 +141,7 @@ public Mono appendBlock(Flux data, long length) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -162,7 +164,7 @@ Mono> appendBlockWithResponse(Flux data, lo return postProcessResponse(this.azureBlobStorage.appendBlobs().appendBlockWithRestResponseAsync( null, null, data, length, null, null, null, null, appendBlobAccessConditions.getLeaseAccessConditions(), - appendBlobAccessConditions.getAppendPositionAccessConditions(), cpk, + appendBlobAccessConditions.getAppendPositionAccessConditions(), getCustomerProvidedKey(), appendBlobAccessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new AppendBlobItem(rb.getDeserializedHeaders()))); } @@ -172,7 +174,7 @@ Mono> appendBlockWithResponse(Flux data, lo * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange} * * @param sourceURL The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -190,7 +192,7 @@ public Mono appendBlockFromUrl(URL sourceURL, BlobRange sourceRa * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions} * * @param sourceURL The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -219,8 +221,8 @@ Mono> appendBlockFromUrlWithResponse(URL sourceURL, Blo ? new AppendBlobAccessConditions() : destAccessConditions; return postProcessResponse( - this.azureBlobStorage.appendBlobs().appendBlockFromUrlWithRestResponseAsync(null, null, - sourceURL, 0, sourceRange.toString(), sourceContentMD5, null, null, null, null, cpk, + this.azureBlobStorage.appendBlobs().appendBlockFromUrlWithRestResponseAsync(null, null, sourceURL, 0, + sourceRange.toString(), sourceContentMD5, null, null, null, null, getCustomerProvidedKey(), destAccessConditions.getLeaseAccessConditions(), destAccessConditions.getAppendPositionAccessConditions(), destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context)) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java similarity index 69% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index d16ec1b903a1..fd6643e8b565 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -1,18 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; +import com.azure.core.annotation.ServiceClient; import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageException; import com.azure.storage.common.Utility; @@ -24,24 +27,24 @@ import java.net.URL; import java.nio.ByteBuffer; import java.time.Duration; +import java.util.Map; import java.util.Objects; /** - * Client to an append blob. It may only be instantiated through a {@link BlobClientBuilder}, via the method {@link - * BlobClient#asAppendBlobClient()}, or via the method {@link ContainerClient#getAppendBlobClient(String)}. This class - * does not hold any state about a particular blob, but is instead a convenient way of sending appropriate requests to - * the resource on the service. + * Client to an append blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the + * method {@link BlobClient#getAppendBlobClient()}. This class does not hold any state about a particular blob, but is + * instead a convenient way of sending appropriate requests to the resource on the service. * *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, and - * operations on the service are available on {@link BlobServiceClient}. + * This client contains operations on a blob. Operations on a container are available on {@link BlobContainerClient}, + * and operations on the service are available on {@link BlobServiceClient}. * *

    * Please refer to the Azure * Docs for more information. */ -@ServiceClient(builder = BlobClientBuilder.class) -public final class AppendBlobClient extends BlobClient { +@ServiceClient(builder = SpecializedBlobClientBuilder.class) +public final class AppendBlobClient extends BlobClientBase { private final AppendBlobAsyncClient appendBlobAsyncClient; /** @@ -93,30 +96,12 @@ public BlobOutputStream getBlobOutputStream(AppendBlobAccessConditions accessCon * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.create} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.create} * * @return The information of the created appended blob. */ public AppendBlobItem create() { - return create(null, null, null, null); - } - - /** - * Creates a 0-length append blob. Call appendBlock to append data to an append blob. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.create#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration} - * - * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @return The information of the created appended blob. - */ - public AppendBlobItem create(BlobHTTPHeaders headers, Metadata metadata, - BlobAccessConditions accessConditions, Duration timeout) { - return createWithResponse(headers, metadata, accessConditions, timeout, Context.NONE).getValue(); + return createWithResponse(null, null, null, null, Context.NONE).getValue(); } /** @@ -124,16 +109,16 @@ public AppendBlobItem create(BlobHTTPHeaders headers, Metadata metadata, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context} * * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A {@link Response} whose {@link Response#getValue() value} contains the created appended blob. */ - public Response createWithResponse(BlobHTTPHeaders headers, Metadata metadata, + public Response createWithResponse(BlobHTTPHeaders headers, Map metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { return Utility.blockWithOptionalTimeout(appendBlobAsyncClient. createWithResponse(headers, metadata, accessConditions, context), timeout); @@ -147,7 +132,7 @@ public Response createWithResponse(BlobHTTPHeaders headers, Meta * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.appendBlock#InputStream-long} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlock#InputStream-long} * * @param data The data to write to the blob. * @param length The exact length of the data. It is important that this value match precisely the length of the @@ -166,7 +151,7 @@ public AppendBlobItem appendBlock(InputStream data, long length) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -193,7 +178,7 @@ public Response appendBlockWithResponse(InputStream data, long l * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrl#URL-BlobRange} * * @param sourceURL The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob @@ -203,33 +188,7 @@ public Response appendBlockWithResponse(InputStream data, long l * @return The information of the append blob operation. */ public AppendBlobItem appendBlockFromUrl(URL sourceURL, BlobRange sourceRange) { - return appendBlockFromUrl(sourceURL, sourceRange, null, null, null, null); - } - - /** - * Commits a new block of data from another blob to the end of this append blob. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration} - * - * @param sourceURL The url to the blob that will be the source of the copy. A source blob in the same storage - * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob - * must either be public or must be authenticated via a shared access signature. If the source blob is public, no - * authentication is required to perform the operation. - * @param sourceRange {@link BlobRange} - * @param sourceContentMD5 An MD5 hash of the block content from the source blob. If specified, the service will - * calculate the MD5 of the received data and fail the request if it does not match the provided MD5. - * @param destAccessConditions {@link AppendBlobAccessConditions} - * @param sourceAccessConditions {@link SourceModifiedAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @return The information of the append blob operation. - */ - public AppendBlobItem appendBlockFromUrl(URL sourceURL, BlobRange sourceRange, - byte[] sourceContentMD5, AppendBlobAccessConditions destAccessConditions, - SourceModifiedAccessConditions sourceAccessConditions, Duration timeout) { - return this.appendBlockFromUrlWithResponse(sourceURL, sourceRange, sourceContentMD5, destAccessConditions, - sourceAccessConditions, timeout, Context.NONE).getValue(); + return appendBlockFromUrlWithResponse(sourceURL, sourceRange, null, null, null, null, Context.NONE).getValue(); } /** @@ -237,7 +196,7 @@ public AppendBlobItem appendBlockFromUrl(URL sourceURL, BlobRange sourceRange, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} * * @param sourceURL The url to the blob that will be the source of the copy. A source blob in the same storage * account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java new file mode 100644 index 000000000000..e2bcd5812b85 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -0,0 +1,1174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.implementation.util.FluxUtil; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.BlobURLParts; +import com.azure.storage.blob.HTTPGetterInfo; +import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.blob.models.SourceModifiedAccessConditions; +import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.StorageException; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; +import com.azure.storage.common.Utility; +import com.azure.storage.common.credentials.SharedKeyCredential; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.file.FileAlreadyExistsException; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import static com.azure.core.implementation.util.FluxUtil.withContext; +import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse; + +/** + * This class provides a client that contains all operations that apply to any blob type. + * + *

    + * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please + * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. + */ +public class BlobAsyncClientBase { + + private static final int BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE = 4 * Constants.MB; + private static final int BLOB_MAX_DOWNLOAD_BLOCK_SIZE = 100 * Constants.MB; + + private final ClientLogger logger = new ClientLogger(BlobAsyncClientBase.class); + + protected final AzureBlobStorageImpl azureBlobStorage; + private final String snapshot; + private final CpkInfo customerProvidedKey; + + /** + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. + * + * @param azureBlobStorage the API client for blob storage + * @param snapshot Optional. The snapshot identifier for the snapshot blob. + * @param customerProvidedKey Optional. Customer provided key used during encryption of the blob's data on the + * server. + */ + protected BlobAsyncClientBase(AzureBlobStorageImpl azureBlobStorage, String snapshot, CpkInfo customerProvidedKey) { + this.azureBlobStorage = azureBlobStorage; + this.snapshot = snapshot; + this.customerProvidedKey = customerProvidedKey; + } + + /** + * Creates a new {@link BlobAsyncClientBase} linked to the {@code snapshot} of this blob resource. + * + * @param snapshot the identifier for a specific snapshot of this blob + * @return a {@link BlobAsyncClientBase} used to interact with the specific snapshot. + */ + public BlobAsyncClientBase getSnapshotClient(String snapshot) { + return new BlobAsyncClientBase(new AzureBlobStorageBuilder() + .url(getBlobUrl()) + .pipeline(azureBlobStorage.getHttpPipeline()) + .build(), snapshot, customerProvidedKey); + } + + /** + * Gets the URL of the blob represented by this client. + * + * @return the URL. + */ + public String getBlobUrl() { + if (!this.isSnapshot()) { + return azureBlobStorage.getUrl(); + } else { + if (azureBlobStorage.getUrl().contains("?")) { + return String.format("%s&snapshot=%s", azureBlobStorage.getUrl(), snapshot); + } else { + return String.format("%s?snapshot=%s", azureBlobStorage.getUrl(), snapshot); + } + } + } + + /** + * Get the container name. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getContainerName} + * + * @return The name of the container. + */ + public final String getContainerName() { + return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName(); + } + + /** + * Get the blob name. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getBlobName} + * + * @return The name of the blob. + */ + public final String getBlobName() { + return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobName(); + } + + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return azureBlobStorage.getHttpPipeline(); + } + + /** + * Gets the {@link CpkInfo} used to encrypt this blob's content on the server. + * + * @return the customer provided key used for encryption. + */ + public CpkInfo getCustomerProvidedKey() { + return customerProvidedKey; + } + + /** + * Gets the snapshotId for a blob resource + * + * @return A string that represents the snapshotId of the snapshot blob + */ + public String getSnapshotId() { + return this.snapshot; + } + + /** + * Determines if a blob is a snapshot + * + * @return A boolean that indicates if a blob is a snapshot + */ + public boolean isSnapshot() { + return this.snapshot != null; + } + + /** + * Determines if the blob this client represents exists in the cloud. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.exists} + * + * @return true if the blob exists, false if it doesn't + */ + public Mono exists() { + return existsWithResponse().flatMap(FluxUtil::toMono); + } + + /** + * Determines if the blob this client represents exists in the cloud. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.existsWithResponse} + * + * @return true if the blob exists, false if it doesn't + */ + public Mono> existsWithResponse() { + return withContext(this::existsWithResponse); + } + + Mono> existsWithResponse(Context context) { + return this.getPropertiesWithResponse(null, context) + .map(cp -> (Response) new SimpleResponse<>(cp, true)) + .onErrorResume(t -> t instanceof StorageException && ((StorageException) t).getStatusCode() == 404, t -> { + HttpResponse response = ((StorageException) t).getResponse(); + return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), false)); + }); + } + + /** + * Copies the data at the source URL to a blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#URL} + * + *

    For more information, see the + * Azure Docs

    + * + * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @return A reactive response containing the copy ID for the long running operation. + */ + public Mono startCopyFromURL(URL sourceURL) { + return startCopyFromURLWithResponse(sourceURL, null, null, null, null, null).flatMap(FluxUtil::toMono); + } + + /** + * Copies the data at the source URL to a blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @param metadata Metadata to associate with the destination blob. + * @param tier {@link AccessTier} for the destination blob. + * @param priority {@link RehydratePriority} for rehydrating the blob. + * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions + * related to when the blob was changed relative to the given request. The request will fail if the specified + * condition is not satisfied. + * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @return A reactive response containing the copy ID for the long running operation. + */ + public Mono> startCopyFromURLWithResponse(URL sourceURL, Map metadata, + AccessTier tier, RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions) { + return withContext(context -> startCopyFromURLWithResponse(sourceURL, metadata, tier, priority, + sourceModifiedAccessConditions, destAccessConditions, context)); + } + + Mono> startCopyFromURLWithResponse(URL sourceURL, Map metadata, AccessTier tier, + RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Context context) { + sourceModifiedAccessConditions = sourceModifiedAccessConditions == null + ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; + destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; + + // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. + SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() + .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) + .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) + .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) + .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); + + return postProcessResponse(this.azureBlobStorage.blobs().startCopyFromURLWithRestResponseAsync( + null, null, sourceURL, null, metadata, tier, priority, null, sourceConditions, + destAccessConditions.getModifiedAccessConditions(), destAccessConditions.getLeaseAccessConditions(), + context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); + } + + /** + * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copyId The id of the copy operation to abort. + * @return A reactive response signalling completion. + */ + public Mono abortCopyFromURL(String copyId) { + return abortCopyFromURLWithResponse(copyId, null).flatMap(FluxUtil::toMono); + } + + /** + * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copyId The id of the copy operation to abort. + * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does + * not match the active lease on the blob. + * @return A reactive response signalling completion. + */ + public Mono> abortCopyFromURLWithResponse(String copyId, + LeaseAccessConditions leaseAccessConditions) { + return withContext(context -> abortCopyFromURLWithResponse(copyId, leaseAccessConditions, context)); + } + + Mono> abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, + Context context) { + return postProcessResponse(this.azureBlobStorage.blobs().abortCopyFromURLWithRestResponseAsync( + null, null, copyId, null, null, leaseAccessConditions, context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#URL} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copySource The source URL to copy from. + * @return A reactive response containing the copy ID for the long running operation. + */ + public Mono copyFromURL(URL copySource) { + return copyFromURLWithResponse(copySource, null, null, null, null).flatMap(FluxUtil::toMono); + } + + /** + * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @param metadata Metadata to associate with the destination blob. + * @param tier {@link AccessTier} for the destination blob. + * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions + * related to when the blob was changed relative to the given request. The request will fail if the specified + * condition is not satisfied. + * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @return A reactive response containing the copy ID for the long running operation. + */ + public Mono> copyFromURLWithResponse(URL copySource, Map metadata, AccessTier tier, + ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions) { + return withContext(context -> copyFromURLWithResponse(copySource, metadata, tier, + sourceModifiedAccessConditions, destAccessConditions, context)); + } + + Mono> copyFromURLWithResponse(URL copySource, Map metadata, AccessTier tier, + ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, + Context context) { + sourceModifiedAccessConditions = sourceModifiedAccessConditions == null + ? new ModifiedAccessConditions() : sourceModifiedAccessConditions; + destAccessConditions = destAccessConditions == null ? new BlobAccessConditions() : destAccessConditions; + + // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. + SourceModifiedAccessConditions sourceConditions = new SourceModifiedAccessConditions() + .setSourceIfModifiedSince(sourceModifiedAccessConditions.getIfModifiedSince()) + .setSourceIfUnmodifiedSince(sourceModifiedAccessConditions.getIfUnmodifiedSince()) + .setSourceIfMatch(sourceModifiedAccessConditions.getIfMatch()) + .setSourceIfNoneMatch(sourceModifiedAccessConditions.getIfNoneMatch()); + + return postProcessResponse(this.azureBlobStorage.blobs().copyFromURLWithRestResponseAsync( + null, null, copySource, null, metadata, tier, null, sourceConditions, + destAccessConditions.getModifiedAccessConditions(), destAccessConditions.getLeaseAccessConditions(), + context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); + } + + /** + * Reads the entire blob. Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or + * {@link AppendBlobClient}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.download} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A reactive response containing the blob data. + */ + public Flux download() { + return downloadWithResponse(null, null, null, false) + .flatMapMany(Response::getValue); + } + + /** + * Reads a range of bytes from a blob. Uploading data must be done from the {@link BlockBlobClient}, {@link + * PageBlobClient}, or {@link AppendBlobClient}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadWithResponse#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean} + * + *

    For more information, see the + * Azure Docs

    + * + * @param range {@link BlobRange} + * @param options {@link ReliableDownloadOptions} + * @param accessConditions {@link BlobAccessConditions} + * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @return A reactive response containing the blob data. + */ + public Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { + return withContext(context -> downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, + context)); + } + + Mono>> downloadWithResponse(BlobRange range, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { + return download(range, accessConditions, rangeGetContentMD5, context) + .map(response -> new SimpleResponse<>( + response.getRawResponse(), + response.body(options).switchIfEmpty(Flux.just(ByteBuffer.wrap(new byte[0]))))); + } + + /** + * Reads a range of bytes from a blob. The response also includes the blob's properties and metadata. For more + * information, see the Azure Docs. + *

    + * Note that the response body has reliable download functionality built in, meaning that a failed download stream + * will be automatically retried. This behavior may be configured with {@link ReliableDownloadOptions}. + * + * @param range {@link BlobRange} + * @param accessConditions {@link BlobAccessConditions} + * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @return Emits the successful response. + */ + Mono download(BlobRange range, BlobAccessConditions accessConditions, + boolean rangeGetContentMD5) { + return withContext(context -> download(range, accessConditions, rangeGetContentMD5, context)); + } + + Mono download(BlobRange range, BlobAccessConditions accessConditions, + boolean rangeGetContentMD5, Context context) { + range = range == null ? new BlobRange(0) : range; + Boolean getMD5 = rangeGetContentMD5 ? rangeGetContentMD5 : null; + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + HTTPGetterInfo info = new HTTPGetterInfo() + .setOffset(range.getOffset()) + .setCount(range.getCount()) + .setETag(accessConditions.getModifiedAccessConditions().getIfMatch()); + + // TODO: range is BlobRange but expected as String + // TODO: figure out correct response + return postProcessResponse(this.azureBlobStorage.blobs().downloadWithRestResponseAsync( + null, null, snapshot, null, range.toHeaderValue(), getMD5, null, null, + accessConditions.getLeaseAccessConditions(), customerProvidedKey, + accessConditions.getModifiedAccessConditions(), context)) + // Convert the autorest response to a DownloadAsyncResponse, which enable reliable download. + .map(response -> { + // If there wasn't an etag originally specified, lock on the one returned. + info.setETag(response.getDeserializedHeaders().getETag()); + return new DownloadAsyncResponse(response, info, + // In the event of a stream failure, make a new request to pick up where we left off. + newInfo -> + this.download(new BlobRange(newInfo.getOffset(), newInfo.getCount()), + new BlobAccessConditions().setModifiedAccessConditions( + new ModifiedAccessConditions().setIfMatch(info.getETag())), false, context)); + }); + } + + + /** + * Downloads the entire blob into a file specified by the path. + * + *

    The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} + * will be thrown.

    + * + *

    Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link + * AppendBlobClient}.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFile#String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. + * @return An empty response + */ + public Mono downloadToFile(String filePath) { + return downloadToFileWithResponse(filePath, null, null, + null, null, false).flatMap(FluxUtil::toMono); + } + + /** + * Downloads the entire blob into a file specified by the path. + * + *

    The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} + * will be thrown.

    + * + *

    Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link + * AppendBlobClient}.

    + * + *

    This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra + * call, provide the {@link BlobRange} parameter.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean} + * + *

    For more information, see the + * Azure Docs

    + * + * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. + * @param range {@link BlobRange} + * @param parallelTransferOptions {@link ParallelTransferOptions} to use to download to file. Number of parallel + * transfers parameter is ignored. + * @param options {@link ReliableDownloadOptions} + * @param accessConditions {@link BlobAccessConditions} + * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @return An empty response + * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB. + * @throws UncheckedIOException If an I/O error occurs. + */ + public Mono> downloadToFileWithResponse(String filePath, BlobRange range, + ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { + return withContext(context -> downloadToFileWithResponse(filePath, range, parallelTransferOptions, options, + accessConditions, rangeGetContentMD5, context)); + } + + // TODO (gapra) : Investigate if this is can be parallelized, and include the parallelTransfers parameter. + Mono> downloadToFileWithResponse(String filePath, BlobRange range, + ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) { + final ParallelTransferOptions finalParallelTransferOptions = parallelTransferOptions == null + ? new ParallelTransferOptions() + : parallelTransferOptions; + + return Mono.using(() -> downloadToFileResourceSupplier(filePath), + channel -> getPropertiesWithResponse(accessConditions).flatMap(response -> processInRange(channel, response, + range, finalParallelTransferOptions.getBlockSize(), options, accessConditions, rangeGetContentMD5, + context)), this::downloadToFileCleanup); + + } + + private Mono> processInRange(AsynchronousFileChannel channel, + Response blobPropertiesResponse, BlobRange range, Integer blockSize, + ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, + Context context) { + return Mono.justOrEmpty(range).switchIfEmpty(Mono.just(new BlobRange(0, + blobPropertiesResponse.getValue().getBlobSize()))).flatMapMany(rg -> + Flux.fromIterable(sliceBlobRange(rg, blockSize))) + .flatMap(chunk -> this.download(chunk, accessConditions, rangeGetContentMD5, context) + .subscribeOn(Schedulers.elastic()) + .flatMap(dar -> FluxUtil.writeFile(dar.body(options), channel, + chunk.getOffset() - ((range == null) ? 0 : range.getOffset())) + )).then(Mono.just(blobPropertiesResponse)); + } + + private AsynchronousFileChannel downloadToFileResourceSupplier(String filePath) { + try { + return AsynchronousFileChannel.open(Paths.get(filePath), StandardOpenOption.READ, StandardOpenOption.WRITE, + StandardOpenOption.CREATE_NEW); + } catch (IOException e) { + throw logger.logExceptionAsError(new UncheckedIOException(e)); + } + } + + private void downloadToFileCleanup(AsynchronousFileChannel channel) { + try { + channel.close(); + } catch (IOException e) { + throw logger.logExceptionAsError(new UncheckedIOException(e)); + } + } + + private List sliceBlobRange(BlobRange blobRange, Integer blockSize) { + if (blockSize == null) { + blockSize = BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE; + } + long offset = blobRange.getOffset(); + long length = blobRange.getCount(); + List chunks = new ArrayList<>(); + for (long pos = offset; pos < offset + length; pos += blockSize) { + long count = blockSize; + if (pos + count > offset + length) { + count = offset + length - pos; + } + chunks.add(new BlobRange(pos, count)); + } + return chunks; + } + + /** + * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.delete} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A reactive response signalling completion. + */ + public Mono delete() { + return deleteWithResponse(null, null).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} + * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being + * deleted, you must pass null. + * @param accessConditions {@link BlobAccessConditions} + * @return A reactive response signalling completion. + */ + public Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, + BlobAccessConditions accessConditions) { + return withContext(context -> deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context)); + } + + Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, + BlobAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + + return postProcessResponse(this.azureBlobStorage.blobs().deleteWithRestResponseAsync( + null, null, snapshot, null, deleteBlobSnapshotOptions, + null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), + context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Returns the blob's metadata and properties. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getProperties} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A reactive response containing the blob properties and metadata. + */ + public Mono getProperties() { + return getPropertiesWithResponse(null).flatMap(FluxUtil::toMono); + } + + /** + * Returns the blob's metadata and properties. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param accessConditions {@link BlobAccessConditions} + * @return A reactive response containing the blob properties and metadata. + */ + public Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions) { + return withContext(context -> getPropertiesWithResponse(accessConditions, context)); + } + + Mono> getPropertiesWithResponse(BlobAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + + return postProcessResponse(this.azureBlobStorage.blobs().getPropertiesWithRestResponseAsync( + null, null, snapshot, null, null, accessConditions.getLeaseAccessConditions(), customerProvidedKey, + accessConditions.getModifiedAccessConditions(), context)) + .map(rb -> new SimpleResponse<>(rb, new BlobProperties(rb.getDeserializedHeaders()))); + } + + /** + * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHTTPHeaders} + * + *

    For more information, see the + * Azure Docs

    + * + * @param headers {@link BlobHTTPHeaders} + * @return A reactive response signalling completion. + */ + public Mono setHTTPHeaders(BlobHTTPHeaders headers) { + return setHTTPHeadersWithResponse(headers, null).flatMap(FluxUtil::toMono); + } + + /** + * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param headers {@link BlobHTTPHeaders} + * @param accessConditions {@link BlobAccessConditions} + * @return A reactive response signalling completion. + */ + public Mono> setHTTPHeadersWithResponse(BlobHTTPHeaders headers, + BlobAccessConditions accessConditions) { + return withContext(context -> setHTTPHeadersWithResponse(headers, accessConditions, context)); + } + + Mono> setHTTPHeadersWithResponse(BlobHTTPHeaders headers, BlobAccessConditions accessConditions, + Context context) { + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + + return postProcessResponse(this.azureBlobStorage.blobs().setHTTPHeadersWithRestResponseAsync( + null, null, null, null, headers, + accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values + * must be preserved, they must be downloaded and included in the call to this method. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadata#Map} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob. + * @return A reactive response signalling completion. + */ + public Mono setMetadata(Map metadata) { + return setMetadataWithResponse(metadata, null).flatMap(FluxUtil::toMono); + } + + /** + * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values + * must be preserved, they must be downloaded and included in the call to this method. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob. + * @param accessConditions {@link BlobAccessConditions} + * @return A reactive response signalling completion. + */ + public Mono> setMetadataWithResponse(Map metadata, + BlobAccessConditions accessConditions) { + return withContext(context -> setMetadataWithResponse(metadata, accessConditions, context)); + } + + Mono> setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions, + Context context) { + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + + return postProcessResponse(this.azureBlobStorage.blobs().setMetadataWithRestResponseAsync( + null, null, null, metadata, null, accessConditions.getLeaseAccessConditions(), customerProvidedKey, + accessConditions.getModifiedAccessConditions(), context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Creates a read-only snapshot of the blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshot} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A response containing a {@link BlobAsyncClientBase} which is used to interact with the created snapshot, + * use {@link #getSnapshotId()} to get the identifier for the snapshot. + */ + public Mono createSnapshot() { + return createSnapshotWithResponse(null, null).flatMap(FluxUtil::toMono); + } + + /** + * Creates a read-only snapshot of the blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob snapshot. + * @param accessConditions {@link BlobAccessConditions} + * @return A response containing a {@link BlobAsyncClientBase} which is used to interact with the created snapshot, + * use {@link #getSnapshotId()} to get the identifier for the snapshot. + */ + public Mono> createSnapshotWithResponse(Map metadata, + BlobAccessConditions accessConditions) { + return withContext(context -> createSnapshotWithResponse(metadata, accessConditions, context)); + } + + Mono> createSnapshotWithResponse(Map metadata, + BlobAccessConditions accessConditions, Context context) { + accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; + + return postProcessResponse(this.azureBlobStorage.blobs().createSnapshotWithRestResponseAsync( + null, null, null, metadata, null, customerProvidedKey, accessConditions.getModifiedAccessConditions(), + accessConditions.getLeaseAccessConditions(), context)) + .map(rb -> new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getSnapshot()))); + } + + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTier#AccessTier} + * + *

    For more information, see the + * Azure Docs

    + * + * @param tier The new tier for the blob. + * @return A reactive response signalling completion. + * @throws NullPointerException if {@code tier} is null. + */ + public Mono setAccessTier(AccessTier tier) { + return setAccessTierWithResponse(tier, null, null).flatMap(FluxUtil::toMono); + } + + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param tier The new tier for the blob. + * @param priority Optional priority to set for re-hydrating blobs. + * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does + * not match the active lease on the blob. + * @return A reactive response signalling completion. + * @throws NullPointerException if {@code tier} is null. + */ + public Mono> setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, + LeaseAccessConditions leaseAccessConditions) { + return withContext(context -> setTierWithResponse(tier, priority, leaseAccessConditions, context)); + } + + Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, + LeaseAccessConditions leaseAccessConditions, Context context) { + Utility.assertNotNull("tier", tier); + + return postProcessResponse(this.azureBlobStorage.blobs().setTierWithRestResponseAsync( + null, null, tier, null, priority, null, leaseAccessConditions, context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.undelete} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A reactive response signalling completion. + */ + public Mono undelete() { + return undeleteWithResponse().flatMap(FluxUtil::toMono); + } + + /** + * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.undeleteWithResponse} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A reactive response signalling completion. + */ + public Mono> undeleteWithResponse() { + return withContext(this::undeleteWithResponse); + } + + Mono> undeleteWithResponse(Context context) { + return postProcessResponse(this.azureBlobStorage.blobs().undeleteWithRestResponseAsync(null, + null, context)) + .map(response -> new SimpleResponse<>(response, null)); + } + + /** + * Returns the sku name and account kind for the account. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfo} + * + *

    For more information, see the + * Azure Docs

    + * + * @return a reactor response containing the sku name and account kind. + */ + public Mono getAccountInfo() { + return getAccountInfoWithResponse().flatMap(FluxUtil::toMono); + } + + /** + * Returns the sku name and account kind for the account. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfoWithResponse} + * + *

    For more information, see the + * Azure Docs

    + * + * @return a reactor response containing the sku name and account kind. + */ + public Mono> getAccountInfoWithResponse() { + return withContext(this::getAccountInfoWithResponse); + } + + Mono> getAccountInfoWithResponse(Context context) { + return postProcessResponse( + this.azureBlobStorage.blobs().getAccountInfoWithRestResponseAsync(null, null, context)) + .map(rb -> new SimpleResponse<>(rb, new StorageAccountInfo(rb.getDeserializedHeaders()))); + } + + /** + * Generates a user delegation SAS with the specified parameters + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime) { + return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, null /* + startTime */, null /* version */, null /*sasProtocol */, null /* ipRange */, null /* cacheControl */, null + /*contentDisposition */, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); + } + + /** + * Generates a user delegation SAS token with the specified parameters + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code ContainerSASPermissions} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange) { + return this.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, + version, sasProtocol, ipRange, null /* cacheControl */, null /* contentDisposition */, null /* + contentEncoding */, null /* contentLanguage */, null /* contentType */); + } + + /** + * Generates a user delegation SAS token with the specified parameters + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} + * + *

    For more information, see the + * Azure + * Docs

    + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @param cacheControl An optional {@code String} cache-control header for the SAS. + * @param contentDisposition An optional {@code String} content-disposition header for the SAS. + * @param contentEncoding An optional {@code String} content-encoding header for the SAS. + * @param contentLanguage An optional {@code String} content-language header for the SAS. + * @param contentType An optional {@code String} content-type header for the SAS. + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange, String cacheControl, String contentDisposition, + String contentEncoding, String contentLanguage, String contentType) { + + BlobServiceSasSignatureValues blobServiceSASSignatureValues = new BlobServiceSasSignatureValues(version, + sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, + null /* identifier*/, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + + BlobServiceSasSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, + accountName); + + BlobServiceSasQueryParameters blobServiceSasQueryParameters = + values.generateSASQueryParameters(userDelegationKey); + + return blobServiceSasQueryParameters.encode(); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null + */ + public String generateSAS(BlobSasPermission permissions, OffsetDateTime expiryTime) { + return this.generateSAS(null, permissions, expiryTime, null /* startTime */, /* identifier */ null /* + version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* contentLanguage*/, + null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null + */ + public String generateSAS(String identifier) { + return this.generateSAS(identifier, null /* permissions */, null /* expiryTime */, null /* startTime */, + null /* version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* + contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null + */ + public String generateSAS(String identifier, BlobSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { + return this.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null + /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, + null /* contentType */); + } + + /** + * Generates a SAS token with the specified parameters + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @param cacheControl An optional {@code String} cache-control header for the SAS. + * @param contentDisposition An optional {@code String} content-disposition header for the SAS. + * @param contentEncoding An optional {@code String} content-encoding header for the SAS. + * @param contentLanguage An optional {@code String} content-language header for the SAS. + * @param contentType An optional {@code String} content-type header for the SAS. + * @return A string that represents the SAS token + * @throws NullPointerException if {@code sharedKeyCredential} is null + */ + public String generateSAS(String identifier, BlobSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + + BlobServiceSasSignatureValues blobServiceSASSignatureValues = new BlobServiceSasSignatureValues(version, + sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, + identifier, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + + SharedKeyCredential sharedKeyCredential = + Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); + + Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); + + BlobServiceSasSignatureValues values = configureServiceSASSignatureValues(blobServiceSASSignatureValues, + sharedKeyCredential.getAccountName()); + + BlobServiceSasQueryParameters blobServiceSasQueryParameters = + values.generateSASQueryParameters(sharedKeyCredential); + + return blobServiceSasQueryParameters.encode(); + } + + /** + * Sets blobServiceSASSignatureValues parameters dependent on the current blob type + */ + private BlobServiceSasSignatureValues configureServiceSASSignatureValues( + BlobServiceSasSignatureValues blobServiceSASSignatureValues, String accountName) { + + // Set canonical name + blobServiceSASSignatureValues.setCanonicalName(this.azureBlobStorage.getUrl(), accountName); + + // Set snapshotId + blobServiceSASSignatureValues.setSnapshotId(getSnapshotId()); + + // Set resource + if (isSnapshot()) { + blobServiceSASSignatureValues.setResource(Constants.UrlConstants.SAS_BLOB_SNAPSHOT_CONSTANT); + } else { + blobServiceSASSignatureValues.setResource(Constants.UrlConstants.SAS_BLOB_CONSTANT); + } + + return blobServiceSASSignatureValues; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java new file mode 100644 index 000000000000..1af4ac625d7f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -0,0 +1,925 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.implementation.util.FluxUtil; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.StorageException; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; +import com.azure.storage.common.Utility; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.URL; +import java.nio.file.FileAlreadyExistsException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * This class provides a client that contains all operations that apply to any blob type. + * + *

    + * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please + * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. + */ +public class BlobClientBase { + private final ClientLogger logger = new ClientLogger(BlobClientBase.class); + + private final BlobAsyncClientBase client; + + /** + * Constructor used by {@link SpecializedBlobClientBuilder}. + * + * @param client the async blob client + */ + protected BlobClientBase(BlobAsyncClientBase client) { + this.client = client; + } + + /** + * Creates a new {@link BlobClientBase} linked to the {@code snapshot} of this blob resource. + * + * @param snapshot the identifier for a specific snapshot of this blob + * @return a {@link BlobClientBase} used to interact with the specific snapshot. + */ + public BlobClientBase getSnapshotClient(String snapshot) { + return new BlobClientBase(client.getSnapshotClient(snapshot)); + } + + /** + * Gets the URL of the blob represented by this client. + * + * @return the URL. + */ + public String getBlobUrl() { + return client.getBlobUrl(); + } + + /** + * Get the container name. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getContainerName} + * + * @return The name of the container. + */ + public final String getContainerName() { + return client.getContainerName(); + } + + /** + * Get the blob name. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getBlobName} + * + * @return The name of the blob. + */ + public final String getBlobName() { + return client.getBlobName(); + } + + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return client.getHttpPipeline(); + } + + /** + * Gets the {@link CpkInfo} used to encrypt this blob's content on the server. + * + * @return the customer provided key used for encryption. + */ + public CpkInfo getCustomerProvidedKey() { + return client.getCustomerProvidedKey(); + } + + /** + * Gets the snapshotId for a blob resource + * + * @return A string that represents the snapshotId of the snapshot blob + */ + public String getSnapshotId() { + return this.client.getSnapshotId(); + } + + /** + * Determines if a blob is a snapshot + * + * @return A boolean that indicates if a blob is a snapshot + */ + public boolean isSnapshot() { + return this.client.isSnapshot(); + } + + /** + * Opens a blob input stream to download the blob. + *

    + * + * @return An InputStream object that represents the stream to use for reading from the blob. + * @throws StorageException If a storage service error occurred. + */ + public final BlobInputStream openInputStream() { + return openInputStream(new BlobRange(0), null); + } + + /** + * Opens a blob input stream to download the specified range of the blob. + *

    + * + * @param range {@link BlobRange} + * @param accessConditions An {@link BlobAccessConditions} object that represents the access conditions for the + * blob. + * @return An InputStream object that represents the stream to use for reading from the blob. + * @throws StorageException If a storage service error occurred. + */ + public final BlobInputStream openInputStream(BlobRange range, BlobAccessConditions accessConditions) { + return new BlobInputStream(client, range.getOffset(), range.getCount(), accessConditions); + } + + /** + * Gets if the container this client represents exists in the cloud. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.exists} + * + * @return true if the container exists, false if it doesn't + */ + public Boolean exists() { + return existsWithResponse(null, Context.NONE).getValue(); + } + + /** + * Gets if the container this client represents exists in the cloud. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.existsWithResponse#Duration-Context} + * + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return true if the container exists, false if it doesn't + */ + public Response existsWithResponse(Duration timeout, Context context) { + Mono> response = client.existsWithResponse(context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Copies the data at the source URL to a blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#URL} + * + *

    For more information, see the + * Azure Docs

    + * + * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @return The copy ID for the long running operation. + */ + public String startCopyFromURL(URL sourceURL) { + return startCopyFromURLWithResponse(sourceURL, null, null, null, null, null, null, Context.NONE).getValue(); + } + + /** + * Copies the data at the source URL to a blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @param metadata Metadata to associate with the destination blob. + * @param tier {@link AccessTier} for the destination blob. + * @param priority {@link RehydratePriority} for rehydrating the blob. + * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions + * related to when the blob was changed relative to the given request. The request will fail if the specified + * condition is not satisfied. + * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The copy ID for the long running operation. + */ + public Response startCopyFromURLWithResponse(URL sourceURL, Map metadata, AccessTier tier, + RehydratePriority priority, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Duration timeout, Context context) { + Mono> response = client + .startCopyFromURLWithResponse(sourceURL, metadata, tier, priority, sourceModifiedAccessConditions, + destAccessConditions, context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copyId The id of the copy operation to abort. + */ + public void abortCopyFromURL(String copyId) { + abortCopyFromURLWithResponse(copyId, null, null, Context.NONE); + } + + /** + * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copyId The id of the copy operation to abort. + * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does + * not match the active lease on the blob. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response abortCopyFromURLWithResponse(String copyId, LeaseAccessConditions leaseAccessConditions, + Duration timeout, Context context) { + Mono> response = client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, + context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#URL} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copySource The source URL to copy from. + * @return The copy ID for the long running operation. + */ + public String copyFromURL(URL copySource) { + return copyFromURLWithResponse(copySource, null, null, null, null, null, Context.NONE).getValue(); + } + + /** + * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. + * @param metadata Metadata to associate with the destination blob. + * @param tier {@link AccessTier} for the destination blob. + * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access + * conditions related to the modification of data. ETag and LastModifiedTime are used to construct conditions + * related to when the blob was changed relative to the given request. The request will fail if the specified + * condition is not satisfied. + * @param destAccessConditions {@link BlobAccessConditions} against the destination. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The copy ID for the long running operation. + */ + public Response copyFromURLWithResponse(URL copySource, Map metadata, AccessTier tier, + ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, + Duration timeout, Context context) { + Mono> response = client + .copyFromURLWithResponse(copySource, metadata, tier, sourceModifiedAccessConditions, destAccessConditions, + context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Downloads the entire blob into an output stream. Uploading data must be done from the {@link BlockBlobClient}, + * {@link PageBlobClient}, or {@link AppendBlobClient}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.download#OutputStream} + * + *

    For more information, see the + * Azure Docs

    + * + * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. + * @throws UncheckedIOException If an I/O error occurs. + * @throws NullPointerException if {@code stream} is null + */ + public void download(OutputStream stream) { + downloadWithResponse(stream, null, null, null, false, null, Context.NONE); + } + + /** + * Downloads a range of bytes from a blob into an output stream. Uploading data must be done from the {@link + * BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient}. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.downloadWithResponse#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. + * @param range {@link BlobRange} + * @param options {@link ReliableDownloadOptions} + * @param accessConditions {@link BlobAccessConditions} + * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + * @throws UncheckedIOException If an I/O error occurs. + * @throws NullPointerException if {@code stream} is null + */ + public Response downloadWithResponse(OutputStream stream, BlobRange range, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { + Utility.assertNotNull("stream", stream); + Mono> download = client + .downloadWithResponse(range, options, accessConditions, rangeGetContentMD5, context) + .flatMapMany(res -> res.getValue() + .doOnNext(bf -> { + try { + stream.write(FluxUtil.byteBufferToArray(bf)); + } catch (IOException e) { + throw logger.logExceptionAsError(new UncheckedIOException(e)); + } + }).map(bf -> res)) + .last() + .map(response -> new SimpleResponse<>(response, null)); + + return Utility.blockWithOptionalTimeout(download, timeout); + } + + /** + * Downloads the entire blob into a file specified by the path. + * + *

    The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} + * will be thrown.

    + * + *

    Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link + * AppendBlobClient}.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.downloadToFile#String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. + * @return The properties of the download blob. + * @throws UncheckedIOException If an I/O error occurs + */ + public BlobProperties downloadToFile(String filePath) { + return downloadToFileWithResponse(filePath, null, null, null, null, + false, null, Context.NONE).getValue(); + } + + /** + * Downloads the entire blob into a file specified by the path. + * + *

    The file will be created and must not exist, if the file already exists a {@link FileAlreadyExistsException} + * will be thrown.

    + * + *

    Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link + * AppendBlobClient}.

    + * + *

    This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra + * call, provide the {@link BlobRange} parameter.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. + * @param range {@link BlobRange} + * @param parallelTransferOptions {@link ParallelTransferOptions} to use to download to file. Number of parallel + * transfers parameter is ignored. + * @param options {@link ReliableDownloadOptions} + * @param accessConditions {@link BlobAccessConditions} + * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The response of download blob properties. + * @throws UncheckedIOException If an I/O error occurs. + */ + public Response downloadToFileWithResponse(String filePath, BlobRange range, + ParallelTransferOptions parallelTransferOptions, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout, Context context) { + Mono> download = client.downloadToFileWithResponse(filePath, range, + parallelTransferOptions, options, accessConditions, rangeGetContentMD5, context); + return Utility.blockWithOptionalTimeout(download, timeout); + } + + /** + * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.delete} + * + *

    For more information, see the + * Azure Docs

    + */ + public void delete() { + deleteWithResponse(null, null, null, Context.NONE); + } + + /** + * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} + * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being + * deleted, you must pass null. + * @param accessConditions {@link BlobAccessConditions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, + BlobAccessConditions accessConditions, Duration timeout, Context context) { + Mono> response = client + .deleteWithResponse(deleteBlobSnapshotOptions, accessConditions, context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Returns the blob's metadata and properties. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getProperties} + * + *

    For more information, see the + * Azure Docs

    + * + * @return The blob properties and metadata. + */ + public BlobProperties getProperties() { + return getPropertiesWithResponse(null, null, Context.NONE).getValue(); + } + + /** + * Returns the blob's metadata and properties. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param accessConditions {@link BlobAccessConditions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The blob properties and metadata. + */ + public Response getPropertiesWithResponse(BlobAccessConditions accessConditions, Duration timeout, + Context context) { + Mono> response = client.getPropertiesWithResponse(accessConditions, context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHTTPHeaders} + * + *

    For more information, see the + * Azure Docs

    + * + * @param headers {@link BlobHTTPHeaders} + */ + public void setHTTPHeaders(BlobHTTPHeaders headers) { + setHTTPHeadersWithResponse(headers, null, null, Context.NONE); + } + + /** + * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param headers {@link BlobHTTPHeaders} + * @param accessConditions {@link BlobAccessConditions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response setHTTPHeadersWithResponse(BlobHTTPHeaders headers, BlobAccessConditions accessConditions, + Duration timeout, Context context) { + Mono> response = client + .setHTTPHeadersWithResponse(headers, accessConditions, context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values + * must be preserved, they must be downloaded and included in the call to this method. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setMetadata#Map} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob. + */ + public void setMetadata(Map metadata) { + setMetadataWithResponse(metadata, null, null, Context.NONE); + } + + /** + * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values + * must be preserved, they must be downloaded and included in the call to this method. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob. + * @param accessConditions {@link BlobAccessConditions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response setMetadataWithResponse(Map metadata, BlobAccessConditions accessConditions, + Duration timeout, Context context) { + Mono> response = client.setMetadataWithResponse(metadata, accessConditions, context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Creates a read-only snapshot of the blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.createSnapshot} + * + *

    For more information, see the + * Azure Docs

    + * + * @return A response containing a {@link BlobClient} which is used to interact with the created snapshot, use + * {@link BlobClient#getSnapshotId()} to get the identifier for the snapshot. + */ + public BlobClientBase createSnapshot() { + return createSnapshotWithResponse(null, null, null, Context.NONE).getValue(); + } + + + /** + * Creates a read-only snapshot of the blob. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param metadata Metadata to associate with the blob snapshot. + * @param accessConditions {@link BlobAccessConditions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing a {@link BlobClient} which is used to interact with the created snapshot, use + * {@link BlobClient#getSnapshotId()} to get the identifier for the snapshot. + */ + public Response createSnapshotWithResponse(Map metadata, + BlobAccessConditions accessConditions, Duration timeout, Context context) { + Mono> response = client + .createSnapshotWithResponse(metadata, accessConditions, context) + .map(rb -> new SimpleResponse<>(rb, new BlobClientBase(rb.getValue()))); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setAccessTier#AccessTier} + * + *

    For more information, see the + * Azure Docs

    + * + * @param tier The new tier for the blob. + */ + public void setAccessTier(AccessTier tier) { + setAccessTierWithResponse(tier, null, null, null, Context.NONE); + } + + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param tier The new tier for the blob. + * @param priority Optional priority to set for re-hydrating blobs. + * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does + * not match the active lease on the blob. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, + LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { + Mono> response = client.setTierWithResponse(tier, priority, leaseAccessConditions, + context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.undelete} + * + *

    For more information, see the + * Azure Docs

    + */ + public void undelete() { + undeleteWithResponse(null, Context.NONE); + } + + /** + * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.undeleteWithResponse#Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response undeleteWithResponse(Duration timeout, Context context) { + Mono> response = client.undeleteWithResponse(context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Returns the sku name and account kind for the account. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getAccountInfo} + * + *

    For more information, see the + * Azure Docs

    + * + * @return The sku name and account kind. + */ + public StorageAccountInfo getAccountInfo() { + return getAccountInfoWithResponse(null, Context.NONE).getValue(); + } + + /** + * Returns the sku name and account kind for the account. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getAccountInfoWithResponse#Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The sku name and account kind. + */ + public Response getAccountInfoWithResponse(Duration timeout, Context context) { + Mono> response = client.getAccountInfoWithResponse(context); + + return Utility.blockWithOptionalTimeout(response, timeout); + } + + /** + * Generates a user delegation SAS token with the specified parameters + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime) { + return this.client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime); + } + + /** + * Generates a user delegation SAS token with the specified parameters + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange) { + return this.client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, + startTime, version, sasProtocol, ipRange); + } + + /** + * Generates a user delegation SAS token with the specified parameters + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} + * + *

    For more information, see the + * Azure + * Docs

    + * + * @param userDelegationKey The {@code UserDelegationKey} user delegation key for the SAS + * @param accountName The {@code String} account name for the SAS + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @param cacheControl An optional {@code String} cache-control header for the SAS. + * @param contentDisposition An optional {@code String} content-disposition header for the SAS. + * @param contentEncoding An optional {@code String} content-encoding header for the SAS. + * @param contentLanguage An optional {@code String} content-language header for the SAS. + * @param contentType An optional {@code String} content-type header for the SAS. + * @return A string that represents the SAS token + */ + public String generateUserDelegationSAS(UserDelegationKey userDelegationKey, String accountName, + BlobSasPermission permissions, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, + SASProtocol sasProtocol, IpRange ipRange, String cacheControl, String contentDisposition, + String contentEncoding, String contentLanguage, String contentType) { + return this.client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, + startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, + contentLanguage, contentType); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @return A string that represents the SAS token + */ + public String generateSAS(OffsetDateTime expiryTime, BlobSasPermission permissions) { + return this.client.generateSAS(permissions, expiryTime); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @return A string that represents the SAS token + */ + public String generateSAS(String identifier) { + return this.client.generateSAS(identifier); + } + + /** + * Generates a SAS token with the specified parameters + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @return A string that represents the SAS token + */ + public String generateSAS(String identifier, BlobSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { + return this.client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, + ipRange); + } + + /** + * Generates a SAS token with the specified parameters + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} + * + *

    For more information, see the + * Azure Docs

    + * + * @param identifier The {@code String} name of the access policy on the container this SAS references if any + * @param permissions The {@code BlobSASPermission} permission for the SAS + * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS + * @param startTime An optional {@code OffsetDateTime} start time for the SAS + * @param version An optional {@code String} version for the SAS + * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS + * @param cacheControl An optional {@code String} cache-control header for the SAS. + * @param contentDisposition An optional {@code String} content-disposition header for the SAS. + * @param contentEncoding An optional {@code String} content-encoding header for the SAS. + * @param contentLanguage An optional {@code String} content-language header for the SAS. + * @param contentType An optional {@code String} content-type header for the SAS. + * @return A string that represents the SAS token + */ + public String generateSAS(String identifier, BlobSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + return this.client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, + ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobInputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java similarity index 94% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobInputStream.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java index 17407285b957..b0033ae94ac5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobInputStream.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobInputStream.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobProperties; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.StorageException; @@ -23,7 +24,7 @@ public final class BlobInputStream extends InputStream { /** * Holds the reference to the blob this stream is associated with. */ - private final BlobAsyncClient blobClient; + private final BlobAsyncClientBase blobClient; /** * A flag to determine if the stream is faulted, if so the last error will be thrown on next operation. @@ -88,12 +89,13 @@ public final class BlobInputStream extends InputStream { /** * Initializes a new instance of the BlobInputStream class. * - * @param blobClient A {@link BlobClient} object which represents the blob that this stream is associated with. + * @param blobClient A {@link BlobAsyncClientBase} object which represents the blob that this stream is associated + * with. * @param accessCondition An {@link BlobAccessConditions} object which represents the access conditions for the * blob. * @throws StorageException An exception representing any error which occurred during the operation. */ - BlobInputStream(final BlobAsyncClient blobClient, final BlobAccessConditions accessCondition) + BlobInputStream(final BlobAsyncClientBase blobClient, final BlobAccessConditions accessCondition) throws StorageException { this(blobClient, 0, null, accessCondition); } @@ -102,14 +104,15 @@ public final class BlobInputStream extends InputStream { * Initializes a new instance of the BlobInputStream class. Note that if {@code blobRangeOffset} is not {@code 0} or * {@code blobRangeLength} is not {@code null}, there will be no content MD5 verification. * - * @param blobClient A {@link BlobClient} object which represents the blob that this stream is associated with. + * @param blobClient A {@link BlobAsyncClientBase} object which represents the blob that this stream is associated + * with. * @param blobRangeOffset The offset of blob data to begin stream. * @param blobRangeLength How much data the stream should return after blobRangeOffset. * @param accessCondition An {@link BlobAccessConditions} object which represents the access conditions for the * blob. * @throws StorageException An exception representing any error which occurred during the operation. */ - BlobInputStream(final BlobAsyncClient blobClient, long blobRangeOffset, Long blobRangeLength, + BlobInputStream(final BlobAsyncClientBase blobClient, long blobRangeOffset, Long blobRangeLength, final BlobAccessConditions accessCondition) throws StorageException { @@ -139,10 +142,9 @@ public final class BlobInputStream extends InputStream { * * @return An int which represents an estimate of the number of bytes that can be read (or skipped * over) from this input stream without blocking, or 0 when it reaches the end of the input stream. - * @throws IOException If an I/O error occurs. */ @Override - public synchronized int available() throws IOException { + public synchronized int available() { return this.bufferSize - (int) (this.currentAbsoluteReadPosition - this.bufferStartOffset); } @@ -160,11 +162,9 @@ private synchronized void checkStreamState() throws IOException { /** * Closes this input stream and releases any system resources associated with the stream. - * - * @throws IOException If an I/O error occurs. */ @Override - public synchronized void close() throws IOException { + public synchronized void close() { this.currentBuffer = null; this.streamFaulted = true; this.lastError = new IOException(SR.STREAM_CLOSED); @@ -179,9 +179,9 @@ public synchronized void close() throws IOException { */ private synchronized void dispatchRead(final int readLength) throws IOException { try { - this.currentBuffer = this.blobClient.download(new BlobRange(this.currentAbsoluteReadPosition, - (long) readLength), this.accessCondition, false) - .flatMap(response -> FluxUtil.collectBytesInByteBufferStream(response.body(null)).map(ByteBuffer::wrap)) + this.currentBuffer = this.blobClient.downloadWithResponse(new BlobRange(this.currentAbsoluteReadPosition, + (long) readLength), null, this.accessCondition, false) + .flatMap(response -> FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(ByteBuffer::wrap)) .block(); this.bufferSize = readLength; @@ -347,7 +347,7 @@ private synchronized int readInternal(final byte[] b, final int off, int len) th len = Math.min(len, this.readSize); final int numberOfBytesRead; - if (currentBuffer.remaining() == 0) { + if (currentBuffer == null || currentBuffer.remaining() == 0) { numberOfBytesRead = -1; } else { numberOfBytesRead = Math.min(len, this.currentBuffer.remaining()); @@ -405,7 +405,7 @@ public synchronized void reset() throws IOException { * @param n A long which represents the number of bytes to skip. */ @Override - public synchronized long skip(final long n) throws IOException { + public synchronized long skip(final long n) { if (n == 0) { return 0; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java similarity index 93% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java index aa65162d6fbc..acf6d1e6d2a8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobOutputStream.java @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; +import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendPositionAccessConditions; import com.azure.storage.blob.models.BlobAccessConditions; @@ -118,11 +119,9 @@ public void flush() throws IOException { *

    * * @param data A byte array which represents the data to write. - * @throws IOException If an I/O error occurs. In particular, an IOException may be thrown if the output stream has - * been closed. */ @Override - public void write(@NonNull final byte[] data) throws IOException { + public void write(@NonNull final byte[] data) { this.write(data, 0, data.length); } @@ -133,11 +132,11 @@ public void write(@NonNull final byte[] data) throws IOException { * @param data A byte array which represents the data to write. * @param offset An int which represents the start offset in the data. * @param length An int which represents the number of bytes to write. - * @throws IOException If an I/O error occurs. In particular, an IOException may be thrown if the output stream has - * been closed. + * @throws IndexOutOfBoundsException If {@code offset} or {@code length} are less than {@code 0} or {@code offset} + * plus {@code length} is greater than the {@code data} length. */ @Override - public void write(@NonNull final byte[] data, final int offset, final int length) throws IOException { + public void write(@NonNull final byte[] data, final int offset, final int length) { if (offset < 0 || length < 0 || length > data.length - offset) { throw new IndexOutOfBoundsException(); } @@ -153,11 +152,9 @@ public void write(@NonNull final byte[] data, final int offset, final int length * true is acceptable for you. * * @param byteVal An int which represents the bye value to write. - * @throws IOException If an I/O error occurs. In particular, an IOException may be thrown if the output stream has - * been closed. */ @Override - public void write(final int byteVal) throws IOException { + public void write(final int byteVal) { this.write(new byte[]{(byte) (byteVal & 0xFF)}); } @@ -198,7 +195,7 @@ private static final class AppendBlobOutputStream extends BlobOutputStream { private AppendBlobOutputStream(final AppendBlobAsyncClient client, final AppendBlobAccessConditions appendBlobAccessConditions) { this.client = client; - this.writeThreshold = BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + this.writeThreshold = BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; this.appendBlobAccessConditions = appendBlobAccessConditions; if (appendBlobAccessConditions != null) { @@ -267,7 +264,7 @@ private BlockBlobOutputStream(final BlockBlobAsyncClient client, final BlobAcces this.accessConditions = accessConditions; this.blockIdPrefix = UUID.randomUUID().toString() + '-'; this.blockList = new ArrayList<>(); - this.writeThreshold = BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + this.writeThreshold = BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; } /** @@ -282,7 +279,7 @@ private String getCurrentBlockId() { } private Mono writeBlock(Flux blockData, String blockId, long writeLength) { - LeaseAccessConditions leaseAccessConditions = (accessConditions == null) + LeaseAccessConditions leaseAccessConditions = (accessConditions == null) ? null : accessConditions.getLeaseAccessConditions(); return client.stageBlockWithResponse(blockId, blockData, writeLength, leaseAccessConditions) @@ -324,7 +321,7 @@ private static final class PageBlobOutputStream extends BlobOutputStream { private PageBlobOutputStream(final PageBlobAsyncClient client, final long length, final BlobAccessConditions blobAccessConditions) { this.client = client; - this.writeThreshold = (int) Math.min(BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE, length); + this.writeThreshold = (int) Math.min(BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE, length); if (blobAccessConditions != null) { this.pageBlobAccessConditions = new PageBlobAccessConditions() diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java similarity index 92% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASQueryParameters.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java index 9443376cf6f6..7e4cdafa92cb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASQueryParameters.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.BaseSASQueryParameters; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.common.BaseSasQueryParameters; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; @@ -15,13 +16,13 @@ /** * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link BlobServiceSASSignatureValues} type. Once generated, it can be set on + * by the user; it is only generated by the {@link BlobServiceSasSignatureValues} type. Once generated, it can be set on * a {@link BlobClientBuilder} object to be constructed as part of a URL or it can be encoded into a {@code String} and * appended to a URL directly (though caution should be taken here in case there are existing query parameters, which * might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable * to ensure thread safety. */ -public final class BlobServiceSASQueryParameters extends BaseSASQueryParameters { +public final class BlobServiceSasQueryParameters extends BaseSasQueryParameters { private final String identifier; @@ -50,13 +51,13 @@ public final class BlobServiceSASQueryParameters extends BaseSASQueryParameters private final String contentType; /** - * Creates a new {@link BlobServiceSASQueryParameters} object. + * Creates a new {@link BlobServiceSasQueryParameters} object. * * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from * queryParamsMap */ - public BlobServiceSASQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { + public BlobServiceSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { super(queryParamsMap, removeSASParametersFromMap); this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, removeSASParametersFromMap); @@ -87,22 +88,22 @@ public BlobServiceSASQueryParameters(Map queryParamsMap, boole } /** - * Creates a new {@link BlobServiceSASQueryParameters} object. These objects are only created internally by + * Creates a new {@link BlobServiceSasQueryParameters} object. These objects are only created internally by * SASSignatureValues classes. * * @param version A {@code String} representing the storage version. * @param protocol A {@code String} representing the allowed HTTP protocol(s) or {@code null}. * @param startTime A {@code java.util.Date} representing the start time for this SAS token or {@code null}. * @param expiryTime A {@code java.util.Date} representing the expiry time for this SAS token. - * @param ipRange A {@link IPRange} representing the range of valid IP addresses for this SAS token or + * @param ipRange A {@link IpRange} representing the range of valid IP addresses for this SAS token or * {@code null}. * @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}. * @param resource A {@code String} representing the storage container or blob (only for Service SAS). * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. */ - BlobServiceSASQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, IPRange ipRange, String identifier, String resource, String permissions, + BlobServiceSasQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, IpRange ipRange, String identifier, String resource, String permissions, String signature, String cacheControl, String contentDisposition, String contentEncoding, String contentLanguage, String contentType, UserDelegationKey key) { super(version, protocol, startTime, expiryTime, ipRange, permissions, signature); @@ -133,7 +134,7 @@ public BlobServiceSASQueryParameters(Map queryParamsMap, boole } /** - * @return The signed identifier (only for {@link BlobServiceSASSignatureValues}) or {@code null}. Please see + * @return The signed identifier (only for {@link BlobServiceSasSignatureValues}) or {@code null}. Please see * here * for more information. */ @@ -142,7 +143,7 @@ public String getIdentifier() { } /** - * @return The storage container or blob (only for {@link BlobServiceSASSignatureValues}). + * @return The storage container or blob (only for {@link BlobServiceSasSignatureValues}). */ public String getResource() { return resource; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java similarity index 84% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASSignatureValues.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java index 9d7eee455780..2b94450513c7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceSASSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobContainerSasPermission; +import com.azure.storage.blob.BlobSasPermission; import com.azure.storage.blob.models.UserDelegationKey; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SharedKeyCredential; @@ -18,7 +20,7 @@ /** * BlobServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to blob urls. Note: that both this class and {@link BlobServiceSASQueryParameters} + * which can actually be applied to blob urls. Note: that both this class and {@link BlobServiceSasQueryParameters} * exist because the former is mutable and a logical representation while the latter is immutable and used to generate * actual REST requests. *

    @@ -32,9 +34,8 @@ * here * for additional samples.

    */ - -final class BlobServiceSASSignatureValues { - private final ClientLogger logger = new ClientLogger(BlobServiceSASSignatureValues.class); +public final class BlobServiceSasSignatureValues { + private final ClientLogger logger = new ClientLogger(BlobServiceSasSignatureValues.class); private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; @@ -46,7 +47,7 @@ final class BlobServiceSASSignatureValues { private String permissions; - private IPRange ipRange; + private IpRange ipRange; private String canonicalName; @@ -69,7 +70,7 @@ final class BlobServiceSASSignatureValues { /** * Creates an object with empty values for all fields. */ - BlobServiceSASSignatureValues() { + public BlobServiceSasSignatureValues() { } /** @@ -78,7 +79,7 @@ final class BlobServiceSASSignatureValues { * @param expiryTime Time the SAS becomes valid * @param permissions Permissions granted by the SAS */ - BlobServiceSASSignatureValues(OffsetDateTime expiryTime, String permissions) { + BlobServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { this.expiryTime = expiryTime; this.permissions = permissions; } @@ -88,13 +89,13 @@ final class BlobServiceSASSignatureValues { * * @param identifier Identifier for the SAS */ - BlobServiceSASSignatureValues(String identifier) { + BlobServiceSasSignatureValues(String identifier) { this.identifier = identifier; } - BlobServiceSASSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, IPRange ipRange, String identifier, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + public BlobServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, String permission, IpRange ipRange, String identifier, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { if (version != null) { this.version = version; } @@ -126,7 +127,7 @@ public String getVersion() { * @param version Version to target * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setVersion(String version) { + public BlobServiceSasSignatureValues setVersion(String version) { this.version = version; return this; } @@ -144,7 +145,7 @@ public SASProtocol getProtocol() { * @param protocol Protocol for the SAS * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setProtocol(SASProtocol protocol) { + public BlobServiceSasSignatureValues setProtocol(SASProtocol protocol) { this.protocol = protocol; return this; } @@ -162,7 +163,7 @@ public OffsetDateTime getStartTime() { * @param startTime When the SAS takes effect * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setStartTime(OffsetDateTime startTime) { + public BlobServiceSasSignatureValues setStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -180,45 +181,45 @@ public OffsetDateTime getExpiryTime() { * @param expiryTime When the SAS will no longer work * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setExpiryTime(OffsetDateTime expiryTime) { + public BlobServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) { this.expiryTime = expiryTime; return this; } /** - * @return the permissions string allowed by the SAS. Please refer to either {@link ContainerSASPermission} or - * {@link BlobSASPermission} depending on the resource being accessed for help determining the permissions allowed. + * @return the permissions string allowed by the SAS. Please refer to either {@link BlobContainerSasPermission} or + * {@link BlobSasPermission} depending on the resource being accessed for help determining the permissions allowed. */ public String getPermissions() { return permissions; } /** - * Sets the permissions string allowed by the SAS. Please refer to either {@link ContainerSASPermission} or {@link - * BlobSASPermission} depending on the resource being accessed for help constructing the permissions string. + * Sets the permissions string allowed by the SAS. Please refer to either {@link BlobContainerSasPermission} or + * {@link BlobSasPermission} depending on the resource being accessed for help constructing the permissions string. * * @param permissions Permissions string for the SAS * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setPermissions(String permissions) { + public BlobServiceSasSignatureValues setPermissions(String permissions) { this.permissions = permissions; return this; } /** - * @return the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * @return the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. */ - public IPRange getIpRange() { + public IpRange getIpRange() { return ipRange; } /** - * Sets the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * Sets the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. * * @param ipRange Allowed IP range to set * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setIpRange(IPRange ipRange) { + public BlobServiceSasSignatureValues setIpRange(IpRange ipRange) { this.ipRange = ipRange; return this; } @@ -236,7 +237,7 @@ public String getResource() { * @param resource Allowed resources string to set * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setResource(String resource) { + public BlobServiceSasSignatureValues setResource(String resource) { this.resource = resource; return this; } @@ -254,7 +255,7 @@ public String getCanonicalName() { * @param canonicalName Canonical name of the object the SAS grants access * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setCanonicalName(String canonicalName) { + public BlobServiceSasSignatureValues setCanonicalName(String canonicalName) { this.canonicalName = canonicalName; return this; } @@ -268,7 +269,7 @@ public BlobServiceSASSignatureValues setCanonicalName(String canonicalName) { * @return the updated BlobServiceSASSignatureValues object * @throws RuntimeException If {@code urlString} is a malformed URL. */ - public BlobServiceSASSignatureValues setCanonicalName(String urlString, String accountName) { + public BlobServiceSasSignatureValues setCanonicalName(String urlString, String accountName) { URL url; try { url = new URL(urlString); @@ -293,7 +294,7 @@ public String getSnapshotId() { * @param snapshotId Identifier of the snapshot * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setSnapshotId(String snapshotId) { + public BlobServiceSasSignatureValues setSnapshotId(String snapshotId) { this.snapshotId = snapshotId; return this; } @@ -315,7 +316,7 @@ public String getIdentifier() { * @param identifier Name of the access policy * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setIdentifier(String identifier) { + public BlobServiceSasSignatureValues setIdentifier(String identifier) { this.identifier = identifier; return this; } @@ -333,7 +334,7 @@ public String getCacheControl() { * @param cacheControl Cache-Control header value * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setCacheControl(String cacheControl) { + public BlobServiceSasSignatureValues setCacheControl(String cacheControl) { this.cacheControl = cacheControl; return this; } @@ -351,7 +352,7 @@ public String getContentDisposition() { * @param contentDisposition Content-Disposition header value * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setContentDisposition(String contentDisposition) { + public BlobServiceSasSignatureValues setContentDisposition(String contentDisposition) { this.contentDisposition = contentDisposition; return this; } @@ -369,7 +370,7 @@ public String getContentEncoding() { * @param contentEncoding Content-Encoding header value * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setContentEncoding(String contentEncoding) { + public BlobServiceSasSignatureValues setContentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } @@ -387,7 +388,7 @@ public String getContentLanguage() { * @param contentLanguage Content-Language header value * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setContentLanguage(String contentLanguage) { + public BlobServiceSasSignatureValues setContentLanguage(String contentLanguage) { this.contentLanguage = contentLanguage; return this; } @@ -405,7 +406,7 @@ public String getContentType() { * @param contentType Content-Type header value * @return the updated BlobServiceSASSignatureValues object */ - public BlobServiceSASSignatureValues setContentType(String contentType) { + public BlobServiceSasSignatureValues setContentType(String contentType) { this.contentType = contentType; return this; } @@ -415,18 +416,20 @@ public BlobServiceSASSignatureValues setContentType(String contentType) { * parameters. * * @param sharedKeyCredentials A {@link SharedKeyCredential} object used to sign the SAS values. - * @return {@link BlobServiceSASQueryParameters} + * @return {@link BlobServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. + * @throws NullPointerException if {@code sharedKeyCredentials} is null. Or if any of {@code version}, + * {@code canonicalName}, {@code resource} or {@code identifier} are null. */ - public BlobServiceSASQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { + public BlobServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); assertGenerateOK(false); // Signature is generated on the un-url-encoded values. String signature = sharedKeyCredentials.computeHmac256(stringToSign()); - return new BlobServiceSASQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, + return new BlobServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.ipRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, null /* delegate */); } @@ -435,18 +438,20 @@ public BlobServiceSASQueryParameters generateSASQueryParameters(SharedKeyCredent * Uses a user delegation key to sign these signature values to produce the proper SAS query parameters. * * @param delegationKey A {@link UserDelegationKey} object used to sign the SAS values. - * @return {@link BlobServiceSASQueryParameters} + * @return {@link BlobServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. + * @throws NullPointerException if {@code delegationKey} is null. Or if any of {@code version}, + * {@code canonicalName}, {@code resource}, {@code expiryTime} or {@code permissions} are null. */ - public BlobServiceSASQueryParameters generateSASQueryParameters(UserDelegationKey delegationKey) { + public BlobServiceSasQueryParameters generateSASQueryParameters(UserDelegationKey delegationKey) { Utility.assertNotNull("delegationKey", delegationKey); assertGenerateOK(true); // Signature is generated on the un-url-encoded values. String signature = Utility.computeHMac256(delegationKey.getValue(), stringToSign(delegationKey)); - return new BlobServiceSASQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, + return new BlobServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.ipRange, null /* identifier */, this.resource, this.permissions, signature, this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, delegationKey); } @@ -463,7 +468,7 @@ private void assertGenerateOK(boolean usingUserDelegation) { if (usingUserDelegation || identifier == null) { Utility.assertNotNull("expiryTime", this.expiryTime); Utility.assertNotNull("permissions", this.permissions); - } else if (!usingUserDelegation) { + } else { // Otherwise a SignedIdentifier must be used. Utility.assertNotNull("identifier", this.identifier); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 83f597fbc9fb..551f807bdd28 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; @@ -20,43 +20,23 @@ import com.azure.storage.blob.models.BlockLookupList; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.common.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import java.io.File; -import java.io.IOException; -import java.io.UncheckedIOException; import java.net.URL; import java.nio.ByteBuffer; -import java.nio.channels.AsynchronousFileChannel; -import java.nio.charset.StandardCharsets; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.Base64; import java.util.List; -import java.util.Objects; -import java.util.SortedMap; -import java.util.TreeMap; -import java.util.UUID; -import java.util.stream.Collectors; +import java.util.Map; import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.storage.blob.PostProcessor.postProcessResponse; -import static java.nio.charset.StandardCharsets.UTF_8; +import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse; /** - * Client to a block blob. It may only be instantiated through a {@link BlobClientBuilder}, via the method {@link - * BlobAsyncClient#asBlockBlobAsyncClient()}, or via the method - * {@link ContainerAsyncClient#getBlockBlobAsyncClient(String)}. This class does not hold any state about a particular - * blob, but is instead a convenient way of sending appropriate requests to the resource on the service. - * - *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link BlobServiceAsyncClient}. + * Client to a block blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method + * {@link BlobAsyncClient#getBlockBlobAsyncClient()}. This class does not hold any state about a particular blob, but is + * instead a convenient way of sending appropriate requests to the resource on the service. * *

    * Please refer to the Azure @@ -68,13 +48,8 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) -public final class BlockBlobAsyncClient extends BlobAsyncClient { - private final ClientLogger logger = new ClientLogger(BlockBlobAsyncClient.class); - - static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; - static final int BLOB_MAX_UPLOAD_BLOCK_SIZE = 100 * Constants.MB; - +@ServiceClient(builder = SpecializedBlobClientBuilder.class, isAsync = true) +public final class BlockBlobAsyncClient extends BlobAsyncClientBase { /** * Indicates the maximum number of bytes that can be sent in a call to upload. */ @@ -91,7 +66,7 @@ public final class BlockBlobAsyncClient extends BlobAsyncClient { public static final int MAX_BLOCKS = 50000; /** - * Package-private constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * * @param azureBlobStorage the API client for blob storage */ @@ -112,7 +87,7 @@ public final class BlockBlobAsyncClient extends BlobAsyncClient { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-long} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. @@ -138,293 +113,40 @@ public Mono upload(Flux data, long length) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions} * * @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled * (the default). In other words, the Flux must produce the same data each time it is subscribed to. * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobAccessConditions} * @return A reactive response containing the information of the uploaded block blob. */ public Mono> uploadWithResponse(Flux data, long length, BlobHTTPHeaders headers, - Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions) { + Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { return withContext(context -> uploadWithResponse(data, length, headers, metadata, tier, accessConditions, context)); } Mono> uploadWithResponse(Flux data, long length, BlobHTTPHeaders headers, - Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions, Context context) { - metadata = metadata == null ? new Metadata() : metadata; + Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Context context) { accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; return postProcessResponse(this.azureBlobStorage.blockBlobs().uploadWithRestResponseAsync(null, - null, data, length, null, metadata, tier, null, headers, accessConditions.getLeaseAccessConditions(), cpk, - accessConditions.getModifiedAccessConditions(), context)) + null, data, length, null, metadata, tier, null, headers, accessConditions.getLeaseAccessConditions(), + getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new BlockBlobItem(rb.getDeserializedHeaders()))); } - /** - * Creates a new block blob, or updates the content of an existing block blob. - *

    - * Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported - * with this method; the content of the existing blob is overwritten with the new content. To perform a partial - * update of a block blob's, use {@link BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and {@link - * BlockBlobAsyncClient#commitBlockList(List)}. For more information, see the - * Azure Docs for Put Block and the - * Azure Docs for Put Block List. - *

    - * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when - * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should - * support uploading any arbitrary data source, including network streams. This behavior is possible because this - * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while - * this method may offer additional convenience, it will not be as performant as other options, which should be - * preferred when possible. - *

    - * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the - * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The - * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs - * for a given scenario. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-int-int} - * - * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the - * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected - * to produce the same values across subscriptions. - * @param blockSize The size of each block that will be staged. This value also determines the size that each buffer - * used by this method will be and determines the number of requests that need to be made. The amount of memory - * consumed by this method may be up to blockSize * numBuffers. If block size is large, this method will make fewer - * network calls, but each individual call will send more data and will therefore take longer. - * @param numBuffers The maximum number of buffers this method should allocate. Must be at least two. Typically, the - * larger the number of buffers, the more parallel, and thus faster, the upload portion of this operation will be. - * The amount of memory consumed by this method may be up to blockSize * numBuffers. - * @return A reactive response containing the information of the uploaded block blob. - */ - public Mono upload(Flux data, int blockSize, int numBuffers) { - return this.uploadWithResponse(data, blockSize, numBuffers, null, null, null, null).flatMap(FluxUtil::toMono); - } - - /** - * Creates a new block blob, or updates the content of an existing block blob. Updating an existing block blob - * overwrites any existing metadata on the blob. Partial updates are not supported with this method; the content of - * the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use {@link - * BlockBlobAsyncClient#stageBlock(String, Flux, long) stageBlock} and - * {@link BlockBlobAsyncClient#commitBlockList(List)}, which this method uses internally. For more information, - * see the Azure Docs for Put Block and - * the Azure Docs for Put Block List. - *

    - * The data passed need not support multiple subscriptions/be replayable as is required in other upload methods when - * retries are enabled, and the length of the data need not be known in advance. Therefore, this method should - * support uploading any arbitrary data source, including network streams. This behavior is possible because this - * method will perform some internal buffering as configured by the blockSize and numBuffers parameters, so while - * this method may offer additional convenience, it will not be as performant as other options, which should be - * preferred when possible. - *

    - * Typically, the greater the number of buffers used, the greater the possible parallelism when transferring the - * data. Larger buffers means we will have to stage fewer blocks and therefore require fewer IO operations. The - * trade-offs between these values are context-dependent, so some experimentation may be required to optimize inputs - * for a given scenario. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-int-int-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions} - * - * @param data The data to write to the blob. Unlike other upload methods, this method does not require that the - * {@code Flux} be replayable. In other words, it does not have to support multiple subscribers and is not expected - * to produce the same values across subscriptions. - * @param blockSize The size of each block that will be staged. This value also determines the size that each buffer - * used by this method will be and determines the number of requests that need to be made. The amount of memory - * consumed by this method may be up to blockSize * numBuffers. If block size is large, this method will make fewer - * network calls, but each individual call will send more data and will therefore take longer. - * @param numBuffers The maximum number of buffers this method should allocate. Must be at least two. Typically, the - * larger the number of buffers, the more parallel, and thus faster, the upload portion of this operation will be. - * The amount of memory consumed by this method may be up to blockSize * numBuffers. - * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} - * @return A reactive response containing the information of the uploaded block blob. - */ - public Mono> uploadWithResponse(Flux data, int blockSize, int numBuffers, - BlobHTTPHeaders headers, Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions) { - // TODO: Parallelism parameter? Or let Reactor handle it? - // TODO: Sample/api reference - Objects.requireNonNull(data, "data must not be null"); - BlobAccessConditions accessConditionsFinal = accessConditions == null - ? new BlobAccessConditions() : accessConditions; - - // TODO: Progress reporting. - // See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong. - /*AtomicLong totalProgress = new AtomicLong(0); - Lock progressLock = new ReentrantLock();*/ - - // Validation done in the constructor. - UploadBufferPool pool = new UploadBufferPool(numBuffers, blockSize); - - /* - Break the source Flux into chunks that are <= chunk size. This makes filling the pooled buffers much easier - as we can guarantee we only need at most two buffers for any call to write (two in the case of one pool buffer - filling up with more data to write). We use flatMapSequential because we need to guarantee we preserve the - ordering of the buffers, but we don't really care if one is split before another. - */ - Flux chunkedSource = data.flatMapSequential(buffer -> { - if (buffer.remaining() <= blockSize) { - return Flux.just(buffer); - } - int numSplits = (int) Math.ceil(buffer.remaining() / (double) blockSize); - return Flux.range(0, numSplits) - .map(i -> { - ByteBuffer duplicate = buffer.duplicate().asReadOnlyBuffer(); - duplicate.position(i * blockSize); - duplicate.limit(Math.min(duplicate.limit(), (i + 1) * blockSize)); - return duplicate; - }); - }); - - /* - Write to the pool and upload the output. - */ - return chunkedSource.concatMap(pool::write) - .concatWith(Flux.defer(pool::flush)) - .flatMapSequential(buffer -> { - // Report progress as necessary. - /*Flux progressData = ProgressReporter.addParallelProgressReporting(Flux.just(buffer), - optionsReal.progressReceiver(), progressLock, totalProgress);*/ - - final String blockId = Base64.getEncoder().encodeToString( - UUID.randomUUID().toString().getBytes(UTF_8)); - - return this.stageBlockWithResponse(blockId, Flux.just(buffer), buffer.remaining(), - accessConditionsFinal.getLeaseAccessConditions()) - // We only care about the stageBlock insofar as it was successful, but we need to collect the ids. - .map(x -> { - pool.returnBuffer(buffer); - return blockId; - }).flux(); - - }) // TODO: parallelism? - .collect(Collectors.toList()) - .flatMap(ids -> - this.commitBlockListWithResponse(ids, headers, metadata, tier, accessConditions)); - - } - - /** - * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified - * file. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String} - * - * @param filePath Path to the upload file - * @return An empty response - */ - public Mono uploadFromFile(String filePath) { - return uploadFromFile(filePath, BLOB_DEFAULT_UPLOAD_BLOCK_SIZE, null, null, null, null); - } - - /** - * Creates a new block blob, or updates the content of an existing block blob, with the content of the specified - * file. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions} - * - * @param filePath Path to the upload file - * @param blockSize Size of the blocks to upload - * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the destination blob. - * @param accessConditions {@link BlobAccessConditions} - * @return An empty response - * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB - * @throws UncheckedIOException If an I/O error occurs - */ - public Mono uploadFromFile(String filePath, Integer blockSize, BlobHTTPHeaders headers, Metadata metadata, - AccessTier tier, BlobAccessConditions accessConditions) { - if (blockSize < 0 || blockSize > BLOB_MAX_UPLOAD_BLOCK_SIZE) { - throw logger.logExceptionAsError(new IllegalArgumentException("Block size should not exceed 100MB")); - } - - return Mono.using(() -> uploadFileResourceSupplier(filePath), - channel -> { - final SortedMap blockIds = new TreeMap<>(); - return Flux.fromIterable(sliceFile(filePath, blockSize)) - .doOnNext(chunk -> blockIds.put(chunk.getOffset(), getBlockID())) - .flatMap(chunk -> { - String blockId = blockIds.get(chunk.getOffset()); - return stageBlockWithResponse(blockId, FluxUtil.readFile(channel, chunk.getOffset(), - chunk.getCount()), chunk.getCount(), null); - }) - .then(Mono.defer(() -> commitBlockListWithResponse( - new ArrayList<>(blockIds.values()), headers, metadata, tier, accessConditions))) - .then() - .doOnTerminate(() -> { - try { - channel.close(); - } catch (IOException e) { - throw logger.logExceptionAsError(new UncheckedIOException(e)); - } - }); - }, this::uploadFileCleanup); - } - - - private AsynchronousFileChannel uploadFileResourceSupplier(String filePath) { - try { - return AsynchronousFileChannel.open(Paths.get(filePath), StandardOpenOption.READ); - } catch (IOException e) { - throw logger.logExceptionAsError(new UncheckedIOException(e)); - } - } - - private void uploadFileCleanup(AsynchronousFileChannel channel) { - try { - channel.close(); - } catch (IOException e) { - throw logger.logExceptionAsError(new UncheckedIOException(e)); - } - } - - private String getBlockID() { - return Base64.getEncoder().encodeToString(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8)); - } - - private List sliceFile(String path, Integer blockSize) { - if (blockSize == null) { - blockSize = BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; - } - File file = new File(path); - assert file.exists(); - List ranges = new ArrayList<>(); - for (long pos = 0; pos < file.length(); pos += blockSize) { - long count = blockSize; - if (pos + count > file.length()) { - count = file.length() - pos; - } - ranges.add(new BlobRange(pos, count)); - } - return ranges; - } - /** * Uploads the specified block to the block blob's "staging area" to be later committed by a call to * commitBlockList. For more information, see the * Azure Docs. *

    * Note that the 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 Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.stageBlock#String-Flux-long} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -433,6 +155,11 @@ private List sliceFile(String path, Integer blockSize) { * @param length The exact length of the data. It is important that this value match precisely the length of the * data emitted by the {@code Flux}. * @return A reactive response signalling completion. + * @code Flux} must produce the same data each time it is subscribed to. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlock#String-Flux-long} */ public Mono stageBlock(String base64BlockID, Flux data, long length) { return stageBlockWithResponse(base64BlockID, data, length, null).flatMap(FluxUtil::toMono); @@ -448,7 +175,7 @@ public Mono stageBlock(String base64BlockID, Flux data, long l * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -468,8 +195,9 @@ public Mono> stageBlockWithResponse(String base64BlockID, Flux> stageBlockWithResponse(String base64BlockID, Flux data, long length, LeaseAccessConditions leaseAccessConditions, Context context) { - return postProcessResponse(this.azureBlobStorage.blockBlobs().stageBlockWithRestResponseAsync(null, - null, base64BlockID, length, data, null, null, null, null, leaseAccessConditions, cpk, context)) + return postProcessResponse(this.azureBlobStorage.blockBlobs().stageBlockWithRestResponseAsync(null, null, + base64BlockID, length, data, null, null, null, null, leaseAccessConditions, getCustomerProvidedKey(), + context)) .map(response -> new SimpleResponse<>(response, null)); } @@ -480,7 +208,7 @@ Mono> stageBlockWithResponse(String base64BlockID, FluxCode Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -503,7 +231,7 @@ public Mono stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRan * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -534,7 +262,7 @@ Mono> stageBlockFromURLWithResponse(String base64BlockID, URL sou return postProcessResponse( this.azureBlobStorage.blockBlobs().stageBlockFromURLWithRestResponseAsync(null, null, base64BlockID, 0, sourceURL, sourceRange.toHeaderValue(), sourceContentMD5, null, null, - null, cpk, leaseAccessConditions, sourceModifiedAccessConditions, context)) + null, getCustomerProvidedKey(), leaseAccessConditions, sourceModifiedAccessConditions, context)) .map(response -> new SimpleResponse<>(response, null)); } @@ -545,7 +273,7 @@ Mono> stageBlockFromURLWithResponse(String base64BlockID, URL sou * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.listBlocks#BlockListType} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocks#BlockListType} * * @param listType Specifies which type of blocks to return. * @return A reactive response containing the list of blocks. @@ -561,7 +289,7 @@ public Mono listBlocks(BlockListType listType) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions} * * @param listType Specifies which type of blocks to return. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does @@ -578,7 +306,7 @@ Mono> listBlocksWithResponse(BlockListType listType, LeaseAccessConditions leaseAccessConditions, Context context) { return postProcessResponse(this.azureBlobStorage.blockBlobs().getBlockListWithRestResponseAsync(null, - null, listType, snapshot, null, null, leaseAccessConditions, context)) + null, listType, getSnapshotId(), null, null, leaseAccessConditions, context)) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -592,7 +320,7 @@ Mono> listBlocksWithResponse(BlockListType listType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList#List} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockList#List} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @return A reactive response containing the information of the block blob. @@ -611,31 +339,30 @@ public Mono commitBlockList(List base64BlockIDs) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobAccessConditions} * @return A reactive response containing the information of the block blob. */ public Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHTTPHeaders headers, Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions) { + BlobHTTPHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions) { return withContext(context -> commitBlockListWithResponse(base64BlockIDs, headers, metadata, tier, accessConditions, context)); } Mono> commitBlockListWithResponse(List base64BlockIDs, - BlobHTTPHeaders headers, Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHTTPHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Context context) { - metadata = metadata == null ? new Metadata() : metadata; accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; return postProcessResponse(this.azureBlobStorage.blockBlobs().commitBlockListWithRestResponseAsync( null, null, new BlockLookupList().setLatest(base64BlockIDs), null, null, null, metadata, tier, null, - headers, accessConditions.getLeaseAccessConditions(), cpk, accessConditions.getModifiedAccessConditions(), - context)) + headers, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), + accessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new BlockBlobItem(rb.getDeserializedHeaders()))); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java similarity index 79% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index fccaadd7b5d6..47cba85860b6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; +import com.azure.core.annotation.ServiceClient; import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; @@ -15,7 +18,6 @@ import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageException; import com.azure.storage.common.Utility; @@ -30,24 +32,22 @@ import java.nio.ByteBuffer; import java.time.Duration; import java.util.List; +import java.util.Map; import java.util.Objects; /** - * Client to a block blob. It may only be instantiated through a {@link BlobClientBuilder}, via the method {@link - * BlobClient#asBlockBlobClient()}, or via the method {@link ContainerClient#getBlockBlobClient(String)}. This class - * does not hold any state about a particular blob, but is instead a convenient way of sending appropriate requests to - * the resource on the service. - * - *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, and - * operations on the service are available on {@link BlobServiceClient}. + * Client to a block blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method + * {@link BlobClient#getBlockBlobClient()}. This class does not hold any state about a particular blob, but is instead a + * convenient way of sending appropriate requests to the resource on the service. * *

    * Please refer to the Azure * Docs for more information. */ -@ServiceClient(builder = BlobClientBuilder.class) -public final class BlockBlobClient extends BlobClient { +@ServiceClient(builder = SpecializedBlobClientBuilder.class) +public final class BlockBlobClient extends BlobClientBase { + private final ClientLogger logger = new ClientLogger(BlockBlobClient.class); + private final BlockBlobAsyncClient blockBlobAsyncClient; /** @@ -66,7 +66,7 @@ public final class BlockBlobClient extends BlobClient { public static final int MAX_BLOCKS = BlockBlobAsyncClient.MAX_BLOCKS; /** - * Package-private constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * * @param blockBlobAsyncClient the async block blob client */ @@ -108,7 +108,7 @@ public BlobOutputStream getBlobOutputStream(BlobAccessConditions accessCondition * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.upload#InputStream-long} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long} * * @param data The data to write to the blob. * @param length The exact length of the data. It is important that this value match precisely the length of the @@ -129,13 +129,13 @@ public BlockBlobItem upload(InputStream data, long length) throws IOException { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context} * * @param data The data to write to the blob. * @param length The exact length of the data. It is important that this value match precisely the length of the * data provided in the {@link InputStream}. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. @@ -143,14 +143,14 @@ public BlockBlobItem upload(InputStream data, long length) throws IOException { * @return The information of the uploaded block blob. * @throws UnexpectedLengthException when the length of data does not match the input {@code length}. * @throws NullPointerException if the input data is null. - * @throws IOException If an I/O error occurs + * @throws UncheckedIOException If an I/O error occurs */ public Response uploadWithResponse(InputStream data, long length, BlobHTTPHeaders headers, - Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout, - Context context) throws IOException { + Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout, + Context context) { Objects.requireNonNull(data); Flux fbb = Utility.convertStreamToByteBuffer(data, length, - BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); + BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); Mono> upload = blockBlobAsyncClient .uploadWithResponse(fbb.subscribeOn(Schedulers.elastic()), length, headers, metadata, tier, accessConditions, context); @@ -158,49 +158,7 @@ public Response uploadWithResponse(InputStream data, long length, try { return Utility.blockWithOptionalTimeout(upload, timeout); } catch (UncheckedIOException e) { - throw e.getCause(); - } - } - - /** - * Creates a new block blob, or updates the content of an existing block blob. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.uploadFromFile#String} - * - * @param filePath Path of the file to upload - * @throws IOException If an I/O error occurs - */ - public void uploadFromFile(String filePath) throws IOException { - uploadFromFile(filePath, BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE, null, null, null, null, null); - } - - /** - * Creates a new block blob, or updates the content of an existing block blob. - * - *

    Code Samples

    - * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration} - * - * @param filePath Path of the file to upload - * @param blockSize Size of the blocks to upload - * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} - * @param tier {@link AccessTier} for the uploaded blob - * @param accessConditions {@link BlobAccessConditions} - * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @throws IOException If an I/O error occurs - */ - public void uploadFromFile(String filePath, Integer blockSize, BlobHTTPHeaders headers, Metadata metadata, - AccessTier tier, BlobAccessConditions accessConditions, Duration timeout) throws IOException { - Mono upload = this.blockBlobAsyncClient.uploadFromFile( - filePath, blockSize, headers, metadata, tier, accessConditions); - - try { - Utility.blockWithOptionalTimeout(upload, timeout); - } catch (UncheckedIOException e) { - throw e.getCause(); + throw logger.logExceptionAsError(e); } } @@ -211,7 +169,7 @@ public void uploadFromFile(String filePath, Integer blockSize, BlobHTTPHeaders h * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.stageBlock#String-InputStream-long} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -230,7 +188,7 @@ public void stageBlock(String base64BlockID, InputStream data, long length) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -249,7 +207,7 @@ public Response stageBlockWithResponse(String base64BlockID, InputStream d LeaseAccessConditions leaseAccessConditions, Duration timeout, Context context) { Objects.requireNonNull(data); Flux fbb = Utility.convertStreamToByteBuffer(data, length, - BlockBlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); + BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE); Mono> response = blockBlobAsyncClient.stageBlockWithResponse(base64BlockID, fbb.subscribeOn(Schedulers.elastic()), length, leaseAccessConditions, context); @@ -263,7 +221,7 @@ public Response stageBlockWithResponse(String base64BlockID, InputStream d * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -284,7 +242,7 @@ public void stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRange sou * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context} * * @param base64BlockID A Base64 encoded {@code String} that specifies the ID for this block. Note that all block * ids for a given blob must be the same length. @@ -317,7 +275,7 @@ public Response stageBlockFromURLWithResponse(String base64BlockID, URL so * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.listBlocks#BlockListType} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.listBlocks#BlockListType} * * @param listType Specifies which type of blocks to return. * @return The list of blocks. @@ -333,7 +291,7 @@ public BlockList listBlocks(BlockListType listType) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context} * * @param listType Specifies which type of blocks to return. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does @@ -360,7 +318,7 @@ public Response listBlocksWithResponse(BlockListType listType, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.commitBlockList#List} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @return The information of the block blob. @@ -379,11 +337,11 @@ public BlockBlobItem commitBlockList(List base64BlockIDs) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context} * * @param base64BlockIDs A list of base64 encode {@code String}s that specifies the block IDs to be committed. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param tier {@link AccessTier} for the destination blob. * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. @@ -391,7 +349,7 @@ public BlockBlobItem commitBlockList(List base64BlockIDs) { * @return The information of the block blob. */ public Response commitBlockListWithResponse(List base64BlockIDs, - BlobHTTPHeaders headers, Metadata metadata, AccessTier tier, BlobAccessConditions accessConditions, + BlobHTTPHeaders headers, Map metadata, AccessTier tier, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = blockBlobAsyncClient.commitBlockListWithResponse( base64BlockIDs, headers, metadata, tier, accessConditions, context); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java similarity index 94% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java index 472ae3124b42..1eba60c444fe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.http.rest.ResponseBase; -import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.HTTPGetterInfo; import com.azure.storage.blob.models.BlobDownloadHeaders; -import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.common.Utility; import reactor.core.publisher.Flux; @@ -18,8 +17,7 @@ import java.util.function.Function; /** - * {@code DownloadAsyncResponse} wraps the protocol-layer response from {@link BlobAsyncClient#download(BlobRange, - * BlobAccessConditions, boolean)} to automatically retry failed reads from the body as appropriate. If the download is + * {@code DownloadAsyncResponse} automatically retries failed reads from the body as appropriate. If the download is * interrupted, the {@code DownloadAsyncResponse} will make a request to resume the download from where it left off, * allowing the user to consume the data as one continuous stream, for any interruptions are hidden. The retry behavior * is defined by the options passed to the {@link #body(ReliableDownloadOptions)}. The download will also lock on the diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java index 9f5efeca2cb6..9bc8e655eee5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseAsyncClient.java @@ -13,7 +13,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; -import com.azure.storage.blob.ContainerAsyncClient; +import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.models.ModifiedAccessConditions; @@ -22,13 +22,12 @@ import com.azure.storage.common.Utility; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; import java.net.URL; import static com.azure.core.implementation.util.FluxUtil.withContext; /** - * This class provides a client that contains all the leasing operations for {@link ContainerAsyncClient containers} + * This class provides a client that contains all the leasing operations for {@link BlobContainerAsyncClient containers} * and {@link BlobAsyncClient blobs}. This client acts as a supplement to those clients and only handles leasing * operations. * @@ -54,12 +53,12 @@ public final class LeaseAsyncClient { private final String leaseId; private final AzureBlobStorageImpl client; - LeaseAsyncClient(HttpPipeline pipeline, URL url, String leaseId, boolean isBlob) { + LeaseAsyncClient(HttpPipeline pipeline, String url, String leaseId, boolean isBlob) { this.isBlob = isBlob; this.leaseId = leaseId; this.client = new AzureBlobStorageBuilder() .pipeline(pipeline) - .url(url.toString()) + .url(url) .build(); } @@ -70,12 +69,8 @@ public final class LeaseAsyncClient { * * @return URL of the lease client. */ - public URL getLeaseUrl() { - try { - return new URL(this.client.getUrl()); - } catch (MalformedURLException ex) { - throw logger.logExceptionAsError(new RuntimeException("Unable to parse URL")); - } + public String getResourceUrl() { + return this.client.getUrl(); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java index cc73f3e3a009..80ecbba519c5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClient.java @@ -9,7 +9,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClient; -import com.azure.storage.blob.ContainerClient; +import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.common.Utility; @@ -17,7 +17,7 @@ import java.time.Duration; /** - * This class provides a client that contains all the leasing operations for {@link ContainerClient containers} and + * This class provides a client that contains all the leasing operations for {@link BlobContainerClient containers} and * {@link BlobClient blobs}. This client acts as a supplement to those clients and only handles leasing operations. * *

    Instantiating a LeaseClient

    @@ -49,8 +49,8 @@ public final class LeaseClient { * * @return URL of the lease client. */ - public URL getLeaseUrl() { - return client.getLeaseUrl(); + public String getResourceUrl() { + return client.getResourceUrl(); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java index ff5a3a3e63ab..e49eacfc9a0f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/LeaseClientBuilder.java @@ -7,8 +7,8 @@ import com.azure.core.http.HttpPipeline; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobClient; -import com.azure.storage.blob.ContainerAsyncClient; -import com.azure.storage.blob.ContainerClient; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClient; import java.net.URL; import java.util.Objects; @@ -42,7 +42,7 @@ @ServiceClientBuilder(serviceClients = { LeaseClient.class, LeaseAsyncClient.class }) public final class LeaseClientBuilder { private HttpPipeline pipeline; - private URL url; + private String url; private String leaseId; private boolean isBlob; @@ -72,7 +72,7 @@ public LeaseAsyncClient buildAsyncClient() { * @return the updated LeaseClientBuilder object * @throws NullPointerException If {@code blobClient} is {@code null}. */ - public LeaseClientBuilder blobClient(BlobClient blobClient) { + public LeaseClientBuilder blobClient(BlobClientBase blobClient) { Objects.requireNonNull(blobClient); this.pipeline = blobClient.getHttpPipeline(); this.url = blobClient.getBlobUrl(); @@ -88,7 +88,7 @@ public LeaseClientBuilder blobClient(BlobClient blobClient) { * @return the updated LeaseClientBuilder object * @throws NullPointerException If {@code blobAsyncClient} is {@code null}. */ - public LeaseClientBuilder blobAsyncClient(BlobAsyncClient blobAsyncClient) { + public LeaseClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { Objects.requireNonNull(blobAsyncClient); this.pipeline = blobAsyncClient.getHttpPipeline(); this.url = blobAsyncClient.getBlobUrl(); @@ -97,33 +97,33 @@ public LeaseClientBuilder blobAsyncClient(BlobAsyncClient blobAsyncClient) { } /** - * Configures the builder based on the passed {@link ContainerClient}. This will set the {@link HttpPipeline} and - * {@link URL} that are used to interact with the service. + * Configures the builder based on the passed {@link BlobContainerClient}. This will set the {@link HttpPipeline} + * and {@link URL} that are used to interact with the service. * - * @param containerClient ContainerClient used to configure the builder. + * @param blobContainerClient ContainerClient used to configure the builder. * @return the updated LeaseClientBuilder object * @throws NullPointerException If {@code containerClient} is {@code null}. */ - public LeaseClientBuilder containerClient(ContainerClient containerClient) { - Objects.requireNonNull(containerClient); - this.pipeline = containerClient.getHttpPipeline(); - this.url = containerClient.getContainerUrl(); + public LeaseClientBuilder containerClient(BlobContainerClient blobContainerClient) { + Objects.requireNonNull(blobContainerClient); + this.pipeline = blobContainerClient.getHttpPipeline(); + this.url = blobContainerClient.getBlobContainerUrl(); this.isBlob = false; return this; } /** - * Configures the builder based on the passed {@link ContainerAsyncClient}. This will set the {@link HttpPipeline} - * and {@link URL} that are used to interact with the service. + * Configures the builder based on the passed {@link BlobContainerAsyncClient}. This will set the {@link + * HttpPipeline} and {@link URL} that are used to interact with the service. * - * @param containerAsyncClient ContainerAsyncClient used to configure the builder. + * @param blobContainerAsyncClient ContainerAsyncClient used to configure the builder. * @return the updated LeaseClientBuilder object * @throws NullPointerException If {@code containerAsyncClient} is {@code null}. */ - public LeaseClientBuilder containerAsyncClient(ContainerAsyncClient containerAsyncClient) { - Objects.requireNonNull(containerAsyncClient); - this.pipeline = containerAsyncClient.getHttpPipeline(); - this.url = containerAsyncClient.getContainerUrl(); + public LeaseClientBuilder containerAsyncClient(BlobContainerAsyncClient blobContainerAsyncClient) { + Objects.requireNonNull(blobContainerAsyncClient); + this.pipeline = blobContainerAsyncClient.getHttpPipeline(); + this.url = blobContainerAsyncClient.getBlobContainerUrl(); this.isBlob = false; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java similarity index 89% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 789355358817..d0fe10128c96 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.UrlBuilder; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; @@ -31,19 +31,15 @@ import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; +import java.util.Map; import static com.azure.core.implementation.util.FluxUtil.withContext; -import static com.azure.storage.blob.PostProcessor.postProcessResponse; +import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse; /** - * Client to a page blob. It may only be instantiated through a {@link BlobClientBuilder}, via the method {@link - * BlobAsyncClient#asPageBlobAsyncClient()}, or via the method - * {@link ContainerAsyncClient#getPageBlobAsyncClient(String)}. This class does not hold any state about a particular - * blob, but is instead a convenient way of sending appropriate requests to the resource on the service. - * - *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link BlobServiceAsyncClient}. + * Client to a page blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method + * {@link BlobAsyncClient#getPageBlobAsyncClient()}. This class does not hold any state about a particular blob, but is + * instead a convenient way of sending appropriate requests to the resource on the service. * *

    * Please refer to the Azure @@ -55,8 +51,8 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) -public final class PageBlobAsyncClient extends BlobAsyncClient { +@ServiceClient(builder = SpecializedBlobClientBuilder.class, isAsync = true) +public final class PageBlobAsyncClient extends BlobAsyncClientBase { /** * Indicates the number of bytes in a page. */ @@ -70,7 +66,7 @@ public final class PageBlobAsyncClient extends BlobAsyncClient { private final ClientLogger logger = new ClientLogger(PageBlobAsyncClient.class); /** - * Package-private constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * * @param azureBlobStorage the API client for blob storage */ @@ -85,13 +81,13 @@ public final class PageBlobAsyncClient extends BlobAsyncClient { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.setCreate#long} + * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.create#long} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. * @return A reactive response containing the information of the created page blob. */ - public Mono setCreate(long size) { + public Mono create(long size) { return createWithResponse(size, null, null, null, null).flatMap(FluxUtil::toMono); } @@ -102,27 +98,27 @@ public Mono setCreate(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. * @param sequenceNumber A user-controlled value that you can use to track requests. The value of the sequence * number must be between 0 and 2^63 - 1.The default value is 0. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param accessConditions {@link BlobAccessConditions} * @return A reactive response containing the information of the created page blob. * @throws IllegalArgumentException If {@code size} isn't a multiple of {@link PageBlobAsyncClient#PAGE_BYTES} or * {@code sequenceNumber} isn't null and is less than 0. */ public Mono> createWithResponse(long size, Long sequenceNumber, BlobHTTPHeaders headers, - Metadata metadata, BlobAccessConditions accessConditions) { + Map metadata, BlobAccessConditions accessConditions) { return withContext(context -> createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context)); } Mono> createWithResponse(long size, Long sequenceNumber, BlobHTTPHeaders headers, - Metadata metadata, BlobAccessConditions accessConditions, Context context) { + Map metadata, BlobAccessConditions accessConditions, Context context) { accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; if (size % PAGE_BYTES != 0) { @@ -137,11 +133,10 @@ Mono> createWithResponse(long size, Long sequenceNumber, throw logger.logExceptionAsError( new IllegalArgumentException("SequenceNumber must be greater than or equal to 0.")); } - metadata = metadata == null ? new Metadata() : metadata; - return postProcessResponse(this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, - null, 0, size, null, metadata, sequenceNumber, null, headers, accessConditions.getLeaseAccessConditions(), - cpk, accessConditions.getModifiedAccessConditions(), context)) + return postProcessResponse(this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, null, 0, size, + null, null, metadata, sequenceNumber, null, headers, accessConditions.getLeaseAccessConditions(), + getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); } @@ -155,7 +150,7 @@ Mono> createWithResponse(long size, Long sequenceNumber, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.uploadPages#PageRange-Flux} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPages#PageRange-Flux} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -178,7 +173,7 @@ public Mono uploadPages(PageRange pageRange, Flux body * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -209,7 +204,7 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); @@ -222,7 +217,7 @@ Mono> uploadPagesWithResponse(PageRange pageRange, FluxCode Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long} * * @param range A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -247,7 +242,7 @@ public Mono uploadPagesFromURL(PageRange range, URL sourceURL, Lon * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -292,8 +287,8 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, URL destAccessConditions = destAccessConditions == null ? new PageBlobAccessConditions() : destAccessConditions; - return postProcessResponse(this.azureBlobStorage.pageBlobs().uploadPagesFromURLWithRestResponseAsync( - null, null, sourceURL, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, null, cpk, + return postProcessResponse(this.azureBlobStorage.pageBlobs().uploadPagesFromURLWithRestResponseAsync(null, null, + sourceURL, sourceRangeString, 0, rangeString, sourceContentMD5, null, null, null, getCustomerProvidedKey(), destAccessConditions.getLeaseAccessConditions(), destAccessConditions.getSequenceNumberAccessConditions(), destAccessConditions.getModifiedAccessConditions(), sourceAccessConditions, context)) .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); @@ -305,7 +300,7 @@ Mono> uploadPagesFromURLWithResponse(PageRange range, URL * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.clearPages#PageRange} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPages#PageRange} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -322,7 +317,7 @@ public Mono clearPages(PageRange pageRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -350,7 +345,7 @@ Mono> clearPagesWithResponse(PageRange pageRange, return postProcessResponse(this.azureBlobStorage.pageBlobs().clearPagesWithRestResponseAsync(null, null, 0, null, pageRangeStr, null, - pageBlobAccessConditions.getLeaseAccessConditions(), cpk, + pageBlobAccessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), pageBlobAccessConditions.getSequenceNumberAccessConditions(), pageBlobAccessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); @@ -362,7 +357,7 @@ Mono> clearPagesWithResponse(PageRange pageRange, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.getPageRanges#BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRanges#BlobRange} * * @param blobRange {@link BlobRange} * @return A reactive response containing the information of the cleared pages. @@ -377,7 +372,7 @@ public Mono getPageRanges(BlobRange blobRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions} * * @param blobRange {@link BlobRange} * @param accessConditions {@link BlobAccessConditions} @@ -394,7 +389,7 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobAcce accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; return postProcessResponse(this.azureBlobStorage.pageBlobs().getPageRangesWithRestResponseAsync( - null, null, snapshot, null, blobRange.toHeaderValue(), + null, null, getSnapshotId(), null, blobRange.toHeaderValue(), null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context)).map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -406,7 +401,7 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobAcce * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and @@ -425,7 +420,7 @@ public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and @@ -451,7 +446,7 @@ Mono> getPageRangesDiffWithResponse(BlobRange blobRange, Stri } return postProcessResponse(this.azureBlobStorage.pageBlobs().getPageRangesDiffWithRestResponseAsync( - null, null, snapshot, null, prevSnapshot, + null, null, getSnapshotId(), null, prevSnapshot, blobRange.toHeaderValue(), null, accessConditions.getLeaseAccessConditions(), accessConditions.getModifiedAccessConditions(), context)) .map(response -> new SimpleResponse<>(response, response.getValue())); @@ -463,7 +458,7 @@ Mono> getPageRangesDiffWithResponse(BlobRange blobRange, Stri * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.resize#long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.resize#long} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. @@ -479,7 +474,7 @@ public Mono resize(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. @@ -501,7 +496,7 @@ Mono> resizeWithResponse(long size, BlobAccessConditions accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions; return postProcessResponse(this.azureBlobStorage.pageBlobs().resizeWithRestResponseAsync(null, - null, size, null, null, accessConditions.getLeaseAccessConditions(), cpk, + null, size, null, null, accessConditions.getLeaseAccessConditions(), getCustomerProvidedKey(), accessConditions.getModifiedAccessConditions(), context)) .map(rb -> new SimpleResponse<>(rb, new PageBlobItem(rb.getDeserializedHeaders()))); } @@ -512,7 +507,7 @@ Mono> resizeWithResponse(long size, BlobAccessConditions * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can @@ -529,7 +524,7 @@ public Mono updateSequenceNumber(SequenceNumberActionType action, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can @@ -572,7 +567,7 @@ Mono> updateSequenceNumberWithResponse(SequenceNumberActi * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.copyIncremental#URL-String} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncremental#URL-String} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. @@ -592,7 +587,7 @@ public Mono copyIncremental(URL source, String snapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. @@ -600,7 +595,7 @@ public Mono copyIncremental(URL source, String snapshot) { * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @return A reactive response emitting the copy status. - * @throws Error If {@code source} and {@code snapshot} form a malformed URL. + * @throws IllegalStateException If {@code source} and {@code snapshot} form a malformed URL. */ public Mono> copyIncrementalWithResponse(URL source, String snapshot, ModifiedAccessConditions modifiedAccessConditions) { @@ -615,7 +610,7 @@ Mono> copyIncrementalWithResponse(URL source, String sn source = builder.toURL(); } catch (MalformedURLException e) { // We are parsing a valid url and adding a query parameter. If this fails, we can't recover. - throw new Error(e); + throw logger.logExceptionAsError(new IllegalStateException(e)); } return postProcessResponse(this.azureBlobStorage.pageBlobs().copyIncrementalWithRestResponseAsync( null, null, source, null, null, modifiedAccessConditions, context)) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java similarity index 89% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 9bb0f8f14a53..d66238be568a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; +import com.azure.core.annotation.ServiceClient; import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; +import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.CopyStatusType; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; @@ -29,24 +29,20 @@ import java.net.URL; import java.nio.ByteBuffer; import java.time.Duration; +import java.util.Map; import java.util.Objects; /** - * Client to a page blob. It may only be instantiated through a {@link BlobClientBuilder}, via the method {@link - * BlobClient#asPageBlobClient()}, or via the method {@link ContainerClient#getPageBlobClient(String)}. This class does - * not hold any state about a particular blob, but is instead a convenient way of sending appropriate requests to the - * resource on the service. - * - *

    - * This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, and - * operations on the service are available on {@link BlobServiceClient}. + * Client to a page blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method + * {@link BlobClient#getPageBlobClient()}. This class does not hold any state about a particular blob, but is instead a + * convenient way of sending appropriate requests to the resource on the service. * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.setCreate#long} + * {@codesnippet com.azure.storage.blob.PageBlobClient.create#long} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. * @return The information of the created page blob. */ - public PageBlobItem setCreate(long size) { + public PageBlobItem create(long size) { return createWithResponse(size, null, null, null, null, null, Context.NONE).getValue(); } @@ -122,21 +118,21 @@ public PageBlobItem setCreate(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context} * * @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a * 512-byte boundary. * @param sequenceNumber A user-controlled value that you can use to track requests. The value of the sequence * number must be between 0 and 2^63 - 1.The default value is 0. * @param headers {@link BlobHTTPHeaders} - * @param metadata {@link Metadata} + * @param metadata Metadata to associate with the blob. * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The information of the created page blob. */ public Response createWithResponse(long size, Long sequenceNumber, BlobHTTPHeaders headers, - Metadata metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { + Map metadata, BlobAccessConditions accessConditions, Duration timeout, Context context) { Mono> response = pageBlobAsyncClient.createWithResponse(size, sequenceNumber, headers, metadata, accessConditions, context); return Utility.blockWithOptionalTimeout(response, timeout); @@ -152,7 +148,7 @@ public Response createWithResponse(long size, Long sequenceNumber, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.uploadPages#PageRange-InputStream} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPages#PageRange-InputStream} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -174,7 +170,7 @@ public PageBlobItem uploadPages(PageRange pageRange, InputStream body) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -206,7 +202,7 @@ public Response uploadPagesWithResponse(PageRange pageRange, Input * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long} * * @param range A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -231,7 +227,7 @@ public PageBlobItem uploadPagesFromURL(PageRange range, URL sourceURL, Long sour * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context} * * @param range The destination {@link PageRange} range. Given that pages must be aligned with 512-byte boundaries, * the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte @@ -264,7 +260,7 @@ public Response uploadPagesFromURLWithResponse(PageRange range, UR * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.clearPages#PageRange} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.clearPages#PageRange} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -281,7 +277,7 @@ public PageBlobItem clearPages(PageRange pageRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context} * * @param pageRange A {@link PageRange} object. Given that pages must be aligned with 512-byte boundaries, the start * offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges @@ -305,7 +301,7 @@ public Response clearPagesWithResponse(PageRange pageRange, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.getPageRanges#BlobRange} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRanges#BlobRange} * * @param blobRange {@link BlobRange} * @return The information of the cleared pages. @@ -320,7 +316,7 @@ public PageList getPageRanges(BlobRange blobRange) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context} * * @param blobRange {@link BlobRange} * @param accessConditions {@link BlobAccessConditions} @@ -341,7 +337,7 @@ public Response getPageRangesWithResponse(BlobRange blobRange, BlobAcc * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.getPageRangesDiff#BlobRange-String} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiff#BlobRange-String} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and @@ -360,7 +356,7 @@ public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context} * * @param blobRange {@link BlobRange} * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and @@ -383,7 +379,7 @@ public Response getPageRangesDiffWithResponse(BlobRange blobRange, Str * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.resize#long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.resize#long} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. @@ -399,7 +395,7 @@ public PageBlobItem resize(long size) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context} * * @param size Resizes a page blob to the specified size. If the specified value is less than the current size of * the blob, then all pages above the specified value are cleared. @@ -420,7 +416,7 @@ public Response resizeWithResponse(long size, BlobAccessConditions * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can @@ -438,7 +434,7 @@ public PageBlobItem updateSequenceNumber(SequenceNumberActionType action, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context} * * @param action Indicates how the service should modify the blob's sequence number. * @param sequenceNumber The blob's sequence number. The sequence number is a user-controlled property that you can @@ -465,7 +461,7 @@ public Response updateSequenceNumberWithResponse(SequenceNumberAct * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.copyIncremental#URL-String} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.copyIncremental#URL-String} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. @@ -485,7 +481,7 @@ public CopyStatusType copyIncremental(URL source, String snapshot) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context} * * @param source The source page blob. * @param snapshot The snapshot on the copy source. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java new file mode 100644 index 000000000000..8b22ed6791ed --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BaseBlobClientBuilder; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobURLParts; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.PageRange; +import com.azure.storage.common.credentials.SASTokenCredential; +import reactor.core.publisher.Flux; + +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; +import java.util.Objects; + +/** + * This class provides a fluent builder API to help aid the configuration and instantiation of specialized Storage Blob + * clients, {@link AppendBlobClient}, {@link AppendBlobAsyncClient}, {@link BlockBlobClient}, + * {@link BlockBlobAsyncClient}, {@link PageBlobClient}, and {@link PageBlobAsyncClient}. These clients are used to + * perform operations that are specific to the blob type. + * + * @see AppendBlobClient + * @see AppendBlobAsyncClient + * @see BlockBlobClient + * @see BlockBlobAsyncClient + * @see PageBlobClient + * @see PageBlobAsyncClient + */ +@ServiceClientBuilder(serviceClients = { + AppendBlobClient.class, AppendBlobAsyncClient.class, + BlockBlobClient.class, BlockBlobAsyncClient.class, + PageBlobClient.class, PageBlobAsyncClient.class +}) +public final class SpecializedBlobClientBuilder extends BaseBlobClientBuilder { + private final ClientLogger logger = new ClientLogger(SpecializedBlobClientBuilder.class); + + private String containerName; + private String blobName; + private String snapshot; + + /** + * Creates a {@link AppendBlobClient} based on options set in the Builder. AppendBlobClients are used to perform + * append blob specific operations such as {@link AppendBlobClient#appendBlock(InputStream, long) append block}, + * only use this when the blob is known to be an append blob. + * + * @return a {@link AppendBlobClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public AppendBlobClient buildAppendBlobClient() { + return new AppendBlobClient(buildAppendBlobAsyncClient()); + } + + /** + * Creates a {@link AppendBlobAsyncClient} based on options set in the Builder. AppendBlobAsyncClients are used to + * perform append blob specific operations such as {@link AppendBlobAsyncClient#appendBlock(Flux, long) append + * blob}, only use this when the blob is known to be an append blob. + * + * @return a {@link AppendBlobAsyncClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public AppendBlobAsyncClient buildAppendBlobAsyncClient() { + return new AppendBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey); + } + + /** + * Creates a {@link BlockBlobClient} based on options set in the Builder. BlockBlobClients are used to perform + * generic upload operations such as {@link BlockBlobClient#upload(InputStream, long) upload from file} and block + * blob specific operations such as {@link BlockBlobClient#stageBlock(String, InputStream, long) stage block} and + * {@link BlockBlobClient#commitBlockList(List)}, only use this when the blob is known to be a block blob. + * + * @return a {@link BlockBlobClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public BlockBlobClient buildBlockBlobClient() { + return new BlockBlobClient(buildBlockBlobAsyncClient()); + } + + /** + * Creates a {@link BlockBlobAsyncClient} based on options set in the Builder. BlockBlobAsyncClients are used to + * perform generic upload operations such as {@link BlockBlobAsyncClient#upload(Flux, long) upload from file} + * and block blob specific operations such as {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, + * LeaseAccessConditions) stage block} and {@link BlockBlobAsyncClient#commitBlockList(List) commit block list}, + * only use this when the blob is known to be a block blob. + * + * @return a {@link BlockBlobAsyncClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public BlockBlobAsyncClient buildBlockBlobAsyncClient() { + return new BlockBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey); + } + + /** + * Creates a {@link PageBlobClient} based on options set in the Builder. PageBlobClients are used to perform page + * blob specific operations such as {@link PageBlobClient#uploadPages(PageRange, InputStream) upload pages} and + * {@link PageBlobClient#clearPages(PageRange) clear pages}, only use this when the blob is known to be a page + * blob. + * + * @return a {@link PageBlobClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public PageBlobClient buildPageBlobClient() { + return new PageBlobClient(buildPageBlobAsyncClient()); + } + + /** + * Creates a {@link PageBlobAsyncClient} based on options set in the Builder. PageBlobAsyncClients are used to + * perform page blob specific operations such as {@link PageBlobAsyncClient#uploadPages(PageRange, Flux) upload + * pages} and {@link PageBlobAsyncClient#clearPages(PageRange) clear pages}, only use this when the blob is known to + * be a page blob. + * + * @return a {@link PageBlobAsyncClient} created from the configurations in this builder. + * @throws NullPointerException If {@code endpoint}, {@code containerName}, or {@code blobName} is {@code null}. + */ + public PageBlobAsyncClient buildPageBlobAsyncClient() { + return new PageBlobAsyncClient(constructImpl(), snapshot, customerProvidedKey); + } + + private AzureBlobStorageImpl constructImpl() { + return new AzureBlobStorageBuilder() + .pipeline(getPipeline()) + .url(String.format("%s/%s/%s", endpoint, containerName, blobName)) + .build(); + } + + /** + * Configures the builder based on the {@link BlobClientBase}. + * + * @param blobClient The {@code BlobClientBase} used to configure this builder. + * @return the updated SpecializedBlobClientBuilder object. + */ + public SpecializedBlobClientBuilder blobClient(BlobClientBase blobClient) { + pipeline(blobClient.getHttpPipeline()); + endpoint(blobClient.getBlobUrl()); + this.snapshot = blobClient.getSnapshotId(); + this.customerProvidedKey = blobClient.getCustomerProvidedKey(); + return this; + } + + /** + * Configures the builder based on the {@link BlobAsyncClientBase}. + * + * @param blobAsyncClient The {@code BlobAsyncClientBase} used to configure this builder. + * @return the updated SpecializedBlobClientBuilder object. + */ + public SpecializedBlobClientBuilder blobAsyncClient(BlobAsyncClientBase blobAsyncClient) { + pipeline(blobAsyncClient.getHttpPipeline()); + endpoint(blobAsyncClient.getBlobUrl()); + this.snapshot = blobAsyncClient.getSnapshotId(); + this.customerProvidedKey = blobAsyncClient.getCustomerProvidedKey(); + return this; + } + + /** + * Configures the builder based on the {@link BlobContainerClient} and appends the blob name to the container's URL. + * + * @param blobContainerClient The {@code ContainerClient} used to configure this builder. + * @param blobName Name of the blob. + * @return the updated SpecializedBlobClientBuilder object. + */ + public SpecializedBlobClientBuilder containerClient(BlobContainerClient blobContainerClient, String blobName) { + pipeline(blobContainerClient.getHttpPipeline()); + endpoint(blobContainerClient.getBlobContainerUrl()); + blobName(blobName); + this.customerProvidedKey = blobContainerClient.getCustomerProvidedKey(); + return this; + } + + /** + * Configures the builder based on the {@link BlobContainerAsyncClient} and appends the blob name to the container's + * URL. + * + * @param blobContainerAsyncClient The {@code ContainerAsyncClient} used to configure this builder. + * @param blobName Name of the blob. + * @return the updated SpecializedBlobClientBuilder object. + */ + public SpecializedBlobClientBuilder containerAsyncClient(BlobContainerAsyncClient blobContainerAsyncClient, + String blobName) { + pipeline(blobContainerAsyncClient.getHttpPipeline()); + endpoint(blobContainerAsyncClient.getBlobContainerUrl()); + blobName(blobName); + this.customerProvidedKey = blobContainerAsyncClient.getCustomerProvidedKey(); + return this; + } + + /** + * Sets the service endpoint, additionally parses it for information (SAS token, container name, blob name) + * + * @param endpoint URL of the service + * @return the updated BlobClientBuilder object + * @throws IllegalArgumentException If {@code endpoint} is {@code null} or is a malformed URL. + */ + @Override + public SpecializedBlobClientBuilder endpoint(String endpoint) { + try { + URL url = new URL(endpoint); + BlobURLParts parts = BlobURLParts.parse(url); + + this.endpoint = parts.getScheme() + "://" + parts.getHost(); + this.containerName = parts.getBlobContainerName(); + this.blobName = parts.getBlobName(); + this.snapshot = parts.getSnapshot(); + + SASTokenCredential sasTokenCredential = + SASTokenCredential.fromSASTokenString(parts.getSasQueryParameters().encode()); + if (sasTokenCredential != null) { + super.credential(sasTokenCredential); + } + } catch (MalformedURLException ex) { + throw logger.logExceptionAsError( + new IllegalArgumentException("The Azure Storage Blob endpoint url is malformed.")); + } + return this; + } + + /** + * Sets the name of the container this client is connecting to. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.Builder.containerName#String} + * + * @param containerName the name of the container + * @return the updated BlobClientBuilder object + * @throws NullPointerException If {@code containerName} is {@code null} + */ + public SpecializedBlobClientBuilder containerName(String containerName) { + this.containerName = Objects.requireNonNull(containerName); + return this; + } + + /** + * Sets the name of the blob this client is connecting to. + * + * @param blobName the name of the blob + * @return the updated BlobClientBuilder object + * @throws NullPointerException If {@code blobName} is {@code null} + */ + public SpecializedBlobClientBuilder blobName(String blobName) { + this.blobName = Objects.requireNonNull(blobName); + return this; + } + + /** + * Sets the snapshot of the blob this client is connecting to. + * + * @param snapshot the snapshot identifier for the blob + * @return the updated BlobClientBuilder object + */ + public SpecializedBlobClientBuilder snapshot(String snapshot) { + this.snapshot = snapshot; + return this; + } + + @Override + protected Class getClazz() { + return SpecializedBlobClientBuilder.class; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index 84cfc1b4fe0b..757fe8783408 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -8,6 +8,7 @@ exports com.azure.storage.blob; exports com.azure.storage.blob.models; + exports com.azure.storage.blob.specialized; opens com.azure.storage.blob.models to com.fasterxml.jackson.databind, @@ -15,4 +16,7 @@ opens com.azure.storage.blob.implementation to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.storage.blob.implementation.models to + com.fasterxml.jackson.databind, + com.azure.core; } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java index 5c4478f45971..6b73c553ef78 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AsyncBufferedUploadExample.java @@ -3,6 +3,8 @@ package com.azure.storage.blob; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.credentials.SharedKeyCredential; import reactor.core.publisher.Flux; @@ -38,11 +40,11 @@ public static void main(String[] args) throws IOException { BlobServiceAsyncClient storageClient = new BlobServiceClientBuilder().endpoint(endpoint).credential(credential) .buildAsyncClient(); - ContainerAsyncClient containerClient = storageClient.getContainerAsyncClient(containerName); + BlobContainerAsyncClient containerClient = storageClient.getBlobContainerAsyncClient(containerName); containerClient.create().block(); uploadSourceBlob(endpoint, credential, containerName); - BlockBlobAsyncClient blobClient = containerClient.getBlockBlobAsyncClient("HelloWorld.txt"); + BlobAsyncClient blobClient = containerClient.getBlobAsyncClient("HelloWorld.txt"); /* @@ -54,7 +56,6 @@ public static void main(String[] args) throws IOException { argument list. */ Flux sourceData = getSourceBlobClient(endpoint, credential, containerName).download() - .flatMapMany(flux -> flux) // Perform some unpredicatable transformation. .map(AsyncBufferedUploadExample::randomTransformation); @@ -66,7 +67,10 @@ public static void main(String[] args) throws IOException { */ int blockSize = 10 * 1024; int numBuffers = 5; - blobClient.upload(sourceData, blockSize, numBuffers).block(); + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setNumBuffers(numBuffers) + .setBlockSize(blockSize); + blobClient.upload(sourceData, parallelTransferOptions).block(); } @SuppressWarnings("cast") @@ -86,6 +90,6 @@ private static void uploadSourceBlob(String endpoint, SharedKeyCredential creden private static BlockBlobAsyncClient getSourceBlobClient(String endpoint, SharedKeyCredential credential, String containerName) { return new BlobServiceClientBuilder().endpoint(endpoint).credential(credential).buildAsyncClient() - .getContainerAsyncClient(containerName).getBlockBlobAsyncClient("sourceBlob"); + .getBlobContainerAsyncClient(containerName).getBlobAsyncClient("sourceBlob").getBlockBlobAsyncClient(); } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java index 3283c0e51512..0a6c76349186 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java @@ -3,6 +3,7 @@ package com.azure.storage.blob; +import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.credentials.SharedKeyCredential; import java.io.ByteArrayInputStream; @@ -20,6 +21,7 @@ public class BasicExample { /** * Entry point into the basic examples for Storage blobs. + * * @param args Unused. Arguments to the program. * @throws IOException If an I/O error occurs * @throws RuntimeException If the downloaded data doesn't match the uploaded data @@ -57,19 +59,19 @@ public static void main(String[] args) throws IOException { * ContainerClient object that wraps the container's endpoint, credential and a request pipeline (inherited from storageClient). * Note that container names require lowercase. */ - ContainerClient containerClient = storageClient.getContainerClient("myjavacontainerbasic" + System.currentTimeMillis()); + BlobContainerClient blobContainerClient = storageClient.getBlobContainerClient("myjavacontainerbasic" + System.currentTimeMillis()); /* * Create a container in Storage blob account. */ - containerClient.create(); + blobContainerClient.create(); /* * Create a client that references a to-be-created blob in your Azure Storage account's container. * This returns a BlockBlobClient object that wraps the blob's endpoint, credential and a request pipeline * (inherited from containerClient). Note that blob names can be mixed case. */ - BlockBlobClient blobClient = containerClient.getBlockBlobClient("HelloWorld.txt"); + BlockBlobClient blobClient = blobContainerClient.getBlobClient("HelloWorld.txt").getBlockBlobClient(); String data = "Hello world!"; InputStream dataStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8)); @@ -102,15 +104,15 @@ public static void main(String[] args) throws IOException { for (int i = 0; i < 3; i++) { String sampleData = "Samples"; InputStream dataInBlobs = new ByteArrayInputStream(sampleData.getBytes(Charset.defaultCharset())); - containerClient.getBlockBlobClient("myblobsforlisting" + System.currentTimeMillis()) - .upload(dataInBlobs, sampleData.length()); + blobContainerClient.getBlobClient("myblobsforlisting" + System.currentTimeMillis()).getBlockBlobClient() + .upload(dataInBlobs, sampleData.length()); dataInBlobs.close(); } /* * List the blob(s) in our container. */ - containerClient.listBlobsFlat() + blobContainerClient.listBlobsFlat() .forEach(blobItem -> System.out.println("Blob name: " + blobItem.getName() + ", Snapshot: " + blobItem.getSnapshot())); /* @@ -121,6 +123,6 @@ public static void main(String[] args) throws IOException { /* * Delete the container we created earlier. */ - containerClient.delete(); + blobContainerClient.delete(); } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index e890b6a60df1..34da7ccad6d2 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -9,32 +9,43 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.specialized.BlobAsyncClientBase; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; +import reactor.core.publisher.Flux; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UncheckedIOException; import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Base64; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link BlobAsyncClient} */ @SuppressWarnings("unused") public class BlobAsyncClientJavaDocCodeSnippets { + private BlobAsyncClient client = JavaDocCodeSnippetsHelpers.getBlobAsyncClient("blobName"); + private Flux data = Flux.just(ByteBuffer.wrap("data".getBytes(StandardCharsets.UTF_8))); private String leaseId = "leaseId"; private String copyId = "copyId"; private URL url = JavaDocCodeSnippetsHelpers.generateURL("https://sample.com"); private String file = "file"; + private int blockSize = 50; + private int numBuffers = 2; + private String filePath = "filePath"; /** * Code snippet for {@link BlobAsyncClient#exists()} @@ -80,18 +91,24 @@ public void copyFromURLCodeSnippet() { */ public void downloadCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.download - client.download().subscribe(response -> { - ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); - response.subscribe(piece -> { - try { - downloadData.write(piece.array()); - } catch (IOException ex) { - throw new UncheckedIOException(ex); - } - }); + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + client.download().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } }); // END: com.azure.storage.blob.BlobAsyncClient.download + } + /** + * Code snippets for {@link BlobAsyncClient#downloadWithResponse(BlobRange, ReliableDownloadOptions, + * BlobAccessConditions, boolean)} + * + * @throws UncheckedIOException If an I/O error occurs + */ + public void downloadWithResponseCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean BlobRange range = new BlobRange(1024, 2048L); ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); @@ -110,21 +127,21 @@ public void downloadCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#downloadToFile(String)} and {@link BlobAsyncClient#downloadToFile(String, - * BlobRange, Integer, ReliableDownloadOptions, BlobAccessConditions, boolean)} + * Code snippets for {@link BlobAsyncClient#downloadToFile(String)} and {@link BlobAsyncClient#downloadToFileWithResponse( + * String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean)} */ public void downloadToFileCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String client.downloadToFile(file).subscribe(response -> System.out.println("Completed download to file")); // END: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String - // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean + // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean BlobRange range = new BlobRange(1024, 2048L); ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); - client.downloadToFile(file, range, null, options, null, false) + client.downloadToFileWithResponse(file, range, null, options, null, false) .subscribe(response -> System.out.println("Completed download to file")); - // END: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean + // END: com.azure.storage.blob.BlobAsyncClient.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean } /** @@ -158,11 +175,11 @@ public void setHTTPHeadersCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#setMetadata(Metadata)} + * Code snippets for {@link BlobAsyncClient#setMetadata(Map)} */ public void setMetadataCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata - client.setMetadata(new Metadata(Collections.singletonMap("metadata", "value"))); + client.setMetadata(Collections.singletonMap("metadata", "value")); // END: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata } @@ -178,11 +195,11 @@ public void createSnapshotCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#setTier(AccessTier)} + * Code snippets for {@link BlobAsyncClientBase#setAccessTier(AccessTier)} */ public void setTierCodeSnippet() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier - client.setTier(AccessTier.HOT); + client.setAccessTier(AccessTier.HOT); // END: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier } @@ -215,13 +232,13 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobAsyncClient#startCopyFromURLWithResponse(URL, Metadata, AccessTier, + * Code snippets for {@link BlobAsyncClient#startCopyFromURLWithResponse(URL, Map, AccessTier, * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions)} */ public void startCopyFromURLWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.startCopyFromURLWithResponse#URL-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions() @@ -241,18 +258,19 @@ public void abortCopyFromURLWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions) - .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); + .subscribe( + response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURLWithResponse#String-LeaseAccessConditions } /** - * Code snippets for {@link BlobAsyncClient#copyFromURLWithResponse(URL, Metadata, AccessTier, + * Code snippets for {@link BlobAsyncClient#copyFromURLWithResponse(URL, Map, AccessTier, * ModifiedAccessConditions, BlobAccessConditions)} */ public void copyFromURLWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURLWithResponse#URL-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions() @@ -332,25 +350,26 @@ public void setHTTPHeadersWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#setMetadataWithResponse(Metadata, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#setMetadataWithResponse(Map, BlobAccessConditions)} */ public void setMetadataWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse#Metadata-BlobAccessConditions BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); - client.setMetadataWithResponse(new Metadata(Collections.singletonMap("metadata", "value")), accessConditions) - .subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); + client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions) + .subscribe( + response -> System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); // END: com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse#Metadata-BlobAccessConditions } /** - * Code snippets for {@link BlobAsyncClient#createSnapshotWithResponse(Metadata, BlobAccessConditions)} + * Code snippets for {@link BlobAsyncClient#createSnapshotWithResponse(Map, BlobAccessConditions)} */ public void createSnapshotWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse#Metadata-BlobAccessConditions - Metadata snapshotMetadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map snapshotMetadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); @@ -360,14 +379,13 @@ public void createSnapshotWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClient#setTierWithResponse(AccessTier, RehydratePriority, - * LeaseAccessConditions)} + * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions)} */ public void setTierWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - client.setTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions) + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions) .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", response.getStatusCode())); // END: com.azure.storage.blob.BlobAsyncClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions @@ -394,20 +412,20 @@ public void getAccountInfoWithResponseCodeSnippets() { } /** - * Code snippet for {@link BlobAsyncClient#generateUserDelegationSAS(UserDelegationKey, String, BlobSASPermission, - * OffsetDateTime, OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Code snippet for {@link BlobAsyncClient#generateUserDelegationSAS(UserDelegationKey, String, BlobSasPermission, + * OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateUserDelegationSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - BlobSASPermission permissions = new BlobSASPermission() + // BEGIN: com.azure.storage.blob.BlobAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -423,24 +441,24 @@ public void generateUserDelegationSASCodeSnippets() { String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.BlobAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** - * Code snippet for {@link BlobAsyncClient#generateSAS(String, BlobSASPermission, OffsetDateTime, OffsetDateTime, - * String, SASProtocol, IPRange, String, String, String, String, String)} + * Code snippet for {@link BlobAsyncClient#generateSAS(String, BlobSasPermission, OffsetDateTime, OffsetDateTime, + * String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - BlobSASPermission permissions = new BlobSASPermission() + // BEGIN: com.azure.storage.blob.BlobAsyncClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -455,26 +473,102 @@ public void generateSASCodeSnippets() { // Note either "identifier", or "expiryTime and permissions" are required to be set String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.BlobAsyncClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobAsyncClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** * Generates a code sample for using {@link BlobAsyncClient#getContainerName()} */ public void getContainerName() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.getContainerName + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getContainerName String containerName = client.getContainerName(); System.out.println("The name of the container is " + containerName); - // END: com.azure.storage.blob.BlobAsyncClient.getContainerName + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getContainerName } /** * Generates a code sample for using {@link BlobAsyncClient#getBlobName()} */ public void getBlobName() { - // BEGIN: com.azure.storage.blob.BlobAsyncClient.getBlobName + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getBlobName String blobName = client.getBlobName(); System.out.println("The name of the blob is " + blobName); - // END: com.azure.storage.blob.BlobAsyncClient.getBlobName + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getBlobName + } + + /** + * Code snippet for {@link BlobAsyncClient#upload(Flux, ParallelTransferOptions)} + */ + public void upload3() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(blockSize) + .setNumBuffers(numBuffers); + client.upload(data, parallelTransferOptions).subscribe(response -> + System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(response.getContentMD5()))); + // END: com.azure.storage.blob.BlobAsyncClient.upload#Flux-ParallelTransferOptions } + + /** + * Code snippet for {@link BlobAsyncClient#uploadWithResponse(Flux, ParallelTransferOptions, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions)} + */ + public void upload4() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions + BlobHTTPHeaders headers = new BlobHTTPHeaders() + .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) + .setBlobContentLanguage("en-US") + .setBlobContentType("binary"); + + Map metadata = Collections.singletonMap("metadata", "value"); + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(blockSize) + .setNumBuffers(numBuffers); + + client.uploadWithResponse(data, parallelTransferOptions, headers, metadata, AccessTier.HOT, accessConditions) + .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", + Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); + // END: com.azure.storage.blob.BlobAsyncClient.uploadWithResponse#Flux-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions + } + + /** + * Code snippet for {@link BlobAsyncClient#uploadFromFile(String)} + */ + public void uploadFromFile() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String + client.uploadFromFile(filePath) + .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) + .subscribe(completion -> System.out.println("Upload from file succeeded")); + // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String + } + + /** + * Code snippet for {@link BlobAsyncClient#uploadFromFile(String, ParallelTransferOptions, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions)} + */ + public void uploadFromFile2() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions + BlobHTTPHeaders headers = new BlobHTTPHeaders() + .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) + .setBlobContentLanguage("en-US") + .setBlobContentType("binary"); + + Map metadata = Collections.singletonMap("metadata", "value"); + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + + client.uploadFromFile(filePath, + new ParallelTransferOptions().setBlockSize(BlobAsyncClient.BLOB_MAX_UPLOAD_BLOCK_SIZE), + headers, metadata, AccessTier.HOT, accessConditions) + .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) + .subscribe(completion -> System.out.println("Upload from file succeeded")); + // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions + } + } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java index 93f08404f089..48b4a5e78728 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientBuilderJavaDocCodeSnippets.java @@ -31,48 +31,48 @@ public class BlobClientBuilderJavaDocCodeSnippets { .build(); /** - * Code snippet for {@link BlobClientBuilder#buildBlobClient()} using connection string + * Code snippet for {@link BlobClientBuilder#buildClient()} using connection string */ public void blobClientConnectionString() { - // BEGIN: com.azure.storage.blob.BlobClientBuilder.buildBlobClient + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.Builder.buildClient BlobClient client = new BlobClientBuilder() .connectionString(connectionString) - .buildBlobClient(); - // END: com.azure.storage.blob.BlobClientBuilder.buildBlobClient + .buildClient(); + // END: com.azure.storage.blob.specialized.BlobClientBase.Builder.buildClient } /** - * Code snippet for {@link BlobClientBuilder#buildBlobAsyncClient()} using connection string + * Code snippet for {@link BlobClientBuilder#buildAsyncClient()} using connection string */ public void blobAsyncClientConnectionString() { - // BEGIN: com.azure.storage.blob.BlobClientBuilder.buildBlobAsyncClient + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.Builder.buildAsyncClient BlobAsyncClient client = new BlobClientBuilder() .connectionString(connectionString) - .buildBlobAsyncClient(); - // END: com.azure.storage.blob.BlobClientBuilder.buildBlobAsyncClient + .buildAsyncClient(); + // END: com.azure.storage.blob.specialized.BlobClientBase.Builder.buildAsyncClient } /** * Code snippet for {@link BlobClientBuilder#endpoint(String)} using credential and endpoint */ public void blobClientCredentialAndEndpoint() { - // BEGIN: com.azure.storage.blob.BlobClientBuilder.endpoint#String + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.Builder.endpoint#String BlobClient client = new BlobClientBuilder() .endpoint(endpoint) .credential(sharedKeyCredential) - .buildBlobClient(); - // END: com.azure.storage.blob.BlobClientBuilder.endpoint#String + .buildClient(); + // END: com.azure.storage.blob.specialized.BlobClientBase.Builder.endpoint#String } /** * Code snippet for {@link BlobClientBuilder#containerName(String)} using HttpPipeline */ public void blobClientHttpPipeline() { - // BEGIN: com.azure.storage.blob.BlobClientBuilder.containerName#String + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.Builder.containerName#String BlobClient client = new BlobClientBuilder() .endpoint(endpoint) .containerName(containerName) - .buildBlobClient(); - // END: com.azure.storage.blob.BlobClientBuilder.containerName#String + .buildClient(); + // END: com.azure.storage.blob.specialized.BlobClientBase.Builder.containerName#String } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 7b95c5d89a3d..2f2b9b403ef0 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -10,23 +10,27 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.ReliableDownloadOptions; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.specialized.BlobClientBase; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.OutputStream; import java.io.UncheckedIOException; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link BlobClient} @@ -43,6 +47,7 @@ public class BlobClientJavaDocCodeSnippets { private String key2 = "key2"; private String value1 = "val1"; private String value2 = "val2"; + private String filePath = "filePath"; /** * Code snippets for {@link BlobClient#exists()} @@ -93,8 +98,7 @@ public void download() { /** * Code snippets for {@link BlobClient#downloadToFile(String)} and - * {@link BlobClient#downloadToFile(String, BlobRange, Integer, ReliableDownloadOptions, BlobAccessConditions, - * boolean, Duration, Context)} + * {@link BlobClient#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean, Duration, Context)} */ public void downloadToFile() { // BEGIN: com.azure.storage.blob.BlobClient.downloadToFile#String @@ -102,13 +106,14 @@ public void downloadToFile() { System.out.println("Completed download to file"); // END: com.azure.storage.blob.BlobClient.downloadToFile#String - // BEGIN: com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + // BEGIN: com.azure.storage.blob.BlobClient.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context BlobRange range = new BlobRange(1024, 2048L); ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); - client.downloadToFile(file, range, 4 * Constants.MB, options, null, false, timeout, new Context(key2, value2)); + client.downloadToFileWithResponse(file, range, new ParallelTransferOptions().setBlockSize(4 * Constants.MB), + options, null, false, timeout, new Context(key2, value2)); System.out.println("Completed download to file"); - // END: com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + // END: com.azure.storage.blob.BlobClient.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context } /** @@ -144,11 +149,11 @@ public void setHTTPHeaders() { } /** - * Code snippets for {@link BlobClient#setMetadata(Metadata)} + * Code snippets for {@link BlobClient#setMetadata(Map)} */ public void setMetadata() { // BEGIN: com.azure.storage.blob.BlobClient.setMetadata#Metadata - client.setMetadata(new Metadata(Collections.singletonMap("metadata", "value"))); + client.setMetadata(Collections.singletonMap("metadata", "value")); System.out.println("Set metadata completed"); // END: com.azure.storage.blob.BlobClient.setMetadata#Metadata } @@ -163,13 +168,13 @@ public void createSnapshot() { } /** - * Code snippets for {@link BlobClient#setTier(AccessTier)} and - * {@link BlobClient#setTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} and + * {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} */ public void setTier() { // BEGIN: com.azure.storage.blob.BlobClient.setTier#AccessTier System.out.printf("Set tier completed with status code %d%n", - client.setTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode()); + client.setAccessTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode()); // END: com.azure.storage.blob.BlobClient.setTier#AccessTier @@ -205,13 +210,13 @@ public void existsWithResponseCodeSnippet() { } /** - * Code snippets for {@link BlobClient#startCopyFromURLWithResponse(URL, Metadata, AccessTier, RehydratePriority, + * Code snippets for {@link BlobClient#startCopyFromURLWithResponse(URL, Map, AccessTier, RehydratePriority, * ModifiedAccessConditions, BlobAccessConditions, Duration, Context)} */ public void startCopyFromURLWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.startCopyFromURLWithResponse#URL-Metadata-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( @@ -238,13 +243,13 @@ public void abortCopyFromURLWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#copyFromURLWithResponse(URL, Metadata, AccessTier, ModifiedAccessConditions, + * Code snippets for {@link BlobClient#copyFromURLWithResponse(URL, Map, AccessTier, ModifiedAccessConditions, * BlobAccessConditions, Duration, Context)} */ public void copyFromURLWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.copyFromURLWithResponse#URL-Metadata-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( @@ -320,7 +325,7 @@ public void setHTTPHeadersWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#setMetadataWithResponse(Metadata, BlobAccessConditions, Duration, Context)} + * Code snippets for {@link BlobClient#setMetadataWithResponse(Map, BlobAccessConditions, Duration, Context)} */ public void setMetadataWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.setMetadataWithResponse#Metadata-BlobAccessConditions-Duration-Context @@ -328,20 +333,19 @@ public void setMetadataWithResponseCodeSnippets() { new LeaseAccessConditions().setLeaseId(leaseId)); System.out.printf("Set metadata completed with status %d%n", - client.setMetadataWithResponse( - new Metadata(Collections.singletonMap("metadata", "value")), accessConditions, timeout, + client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions, timeout, new Context(key1, value1)).getStatusCode()); // END: com.azure.storage.blob.BlobClient.setMetadataWithResponse#Metadata-BlobAccessConditions-Duration-Context } /** - * Code snippets for {@link BlobClient#createSnapshotWithResponse(Metadata, BlobAccessConditions, Duration, + * Code snippets for {@link BlobClient#createSnapshotWithResponse(Map, BlobAccessConditions, Duration, * Context)} */ public void createSnapshotWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.createSnapshotWithResponse#Metadata-BlobAccessConditions-Duration-Context - Metadata snapshotMetadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map snapshotMetadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); @@ -352,15 +356,14 @@ public void createSnapshotWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClient#setTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, - * Duration, Context)} + * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} */ public void setTierWithResponseCodeSnippets() { // BEGIN: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); System.out.printf("Set tier completed with status code %d%n", - client.setTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions, timeout, + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions, timeout, new Context(key2, value2)).getStatusCode()); // END: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context } @@ -386,20 +389,20 @@ public void getAccountInfoWithResponseCodeSnippets() { } /** - * Code snippet for {@link BlobClient#generateUserDelegationSAS(UserDelegationKey, String, BlobSASPermission, - * OffsetDateTime, OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Code snippet for {@link BlobClient#generateUserDelegationSAS(UserDelegationKey, String, BlobSasPermission, + * OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateUserDelegationSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - BlobSASPermission permissions = new BlobSASPermission() + // BEGIN: com.azure.storage.blob.BlobClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -415,24 +418,24 @@ public void generateUserDelegationSASCodeSnippets() { String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.BlobClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobClient.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** - * Code snippet for {@link BlobClient#generateSAS(String, BlobSASPermission, OffsetDateTime, OffsetDateTime, String, - * SASProtocol, IPRange, String, String, String, String, String)} + * Code snippet for {@link BlobClient#generateSAS(String, BlobSasPermission, OffsetDateTime, OffsetDateTime, String, + * SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.BlobClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - BlobSASPermission permissions = new BlobSASPermission() + // BEGIN: com.azure.storage.blob.BlobClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -447,26 +450,72 @@ public void generateSASCodeSnippets() { // Note either "identifier", or "expiryTime and permissions" are required to be set String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.BlobClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobClient.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** * Generates a code sample for using {@link BlobClient#getContainerName()} */ public void getContainerName() { - // BEGIN: com.azure.storage.blob.BlobClient.getContainerName + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getContainerName String containerName = client.getContainerName(); System.out.println("The name of the blob is " + containerName); - // END: com.azure.storage.blob.BlobClient.getContainerName + // END: com.azure.storage.blob.specialized.BlobClientBase.getContainerName } /** * Generates a code sample for using {@link BlobClient#getBlobName()} */ public void getBlobName() { - // BEGIN: com.azure.storage.blob.BlobClient.getBlobName + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getBlobName String blobName = client.getBlobName(); System.out.println("The name of the blob is " + blobName); - // END: com.azure.storage.blob.BlobClient.getBlobName + // END: com.azure.storage.blob.specialized.BlobClientBase.getBlobName + } + + /** + * Code snippet for {@link BlobClient#uploadFromFile(String)} + * + * @throws IOException If an I/O error occurs + */ + public void uploadFromFile() throws IOException { + // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String + try { + client.uploadFromFile(filePath); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.blob.BlobClient.uploadFromFile#String + } + + /** + * Code snippet for {@link BlobClient#uploadFromFile(String, ParallelTransferOptions, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions, Duration)} + * + * @throws IOException If an I/O error occurs + */ + public void uploadFromFile2() throws IOException { + // BEGIN: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration + BlobHTTPHeaders headers = new BlobHTTPHeaders() + .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) + .setBlobContentLanguage("en-US") + .setBlobContentType("binary"); + + Map metadata = Collections.singletonMap("metadata", "value"); + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + Integer blockSize = 100 * 1024 * 1024; // 100 MB; + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions().setBlockSize(blockSize); + + try { + client.uploadFromFile(filePath, parallelTransferOptions, headers, metadata, + AccessTier.HOT, accessConditions, timeout); + System.out.println("Upload from file succeeded"); + } catch (UncheckedIOException ex) { + System.err.printf("Failed to upload from file %s%n", ex.getMessage()); + } + // END: com.azure.storage.blob.BlobClient.uploadFromFile#String-ParallelTransferOptions-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java new file mode 100644 index 000000000000..79b7b0aa6773 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob; + +import com.azure.core.util.Context; +import com.azure.storage.blob.models.AccessPolicy; +import com.azure.storage.blob.models.BlobContainerAccessConditions; +import com.azure.storage.blob.models.BlobListDetails; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.ListBlobsOptions; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.PublicAccessType; +import com.azure.storage.blob.models.SignedIdentifier; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; + +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +/** + * Code snippets for {@link BlobContainerAsyncClient} + */ +@SuppressWarnings({"unused"}) +public class BlobContainerAsyncClientJavaDocCodeSnippets { + + private BlobContainerAsyncClient client = JavaDocCodeSnippetsHelpers.getContainerAsyncClient(); + private String blobName = "blobName"; + private String snapshot = "snapshot"; + private String leaseId = "leaseId"; + private String proposedId = "proposedId"; + private int leaseDuration = (int) Duration.ofSeconds(30).getSeconds(); + + /** + * Code snippet for {@link BlobContainerAsyncClient#generateUserDelegationSAS(UserDelegationKey, String, + * BlobContainerSasPermission, OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, + * String, String)} + */ + public void generateUserDelegationSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobContainerSasPermission permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + String accountName = "accountName"; + UserDelegationKey userDelegationKey = new UserDelegationKey(); + + String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, + startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, + contentLanguage, contentType); + // END: com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#generateSAS(String, BlobContainerSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} + */ + public void generateSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobContainerSasPermission permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String identifier = "identifier"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + + // Note either "identifier", or "expiryTime and permissions" are required to be set + String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, + cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + // END: com.azure.storage.blob.BlobContainerAsyncClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getBlobAsyncClient(String)} + */ + public void getBlobAsyncClient() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String + BlobAsyncClient blobAsyncClient = client.getBlobAsyncClient(blobName); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getBlobAsyncClient(String, String)} + */ + public void getSnapshotBlobAsyncClient() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String-String + BlobAsyncClient blobAsyncClient = client.getBlobAsyncClient(blobName, snapshot); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getBlobAsyncClient#String-String + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#exists()} + */ + public void exists() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.exists + client.exists().subscribe(response -> System.out.printf("Exists? %b%n", response)); + // END: com.azure.storage.blob.BlobContainerAsyncClient.exists + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#existsWithResponse()} + */ + public void existsWithResponse() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.existsWithResponse + client.existsWithResponse().subscribe(response -> System.out.printf("Exists? %b%n", response.getValue())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.existsWithResponse + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#existsWithResponse(Context)} + */ + public void existsWithResponse2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.existsWithResponse-Context + Context context = new Context("key", "value"); + client.existsWithResponse(context).subscribe(response -> System.out.printf("Exists? %b%n", response.getValue())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.existsWithResponse-Context + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#create()} + */ + public void setCreate() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.create + client.create().subscribe( + response -> System.out.printf("Create completed%n"), + error -> System.out.printf("Error while creating container %s%n", error)); + // END: com.azure.storage.blob.BlobContainerAsyncClient.create + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#createWithResponse(Map, PublicAccessType)} + */ + public void create2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.createWithResponse#Map-PublicAccessType + Map metadata = Collections.singletonMap("metadata", "value"); + client.createWithResponse(metadata, PublicAccessType.CONTAINER).subscribe(response -> + System.out.printf("Create completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.createWithResponse#Map-PublicAccessType + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#delete()} + */ + public void setDelete() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.delete + client.delete().subscribe( + response -> System.out.printf("Delete completed%n"), + error -> System.out.printf("Delete failed: %s%n", error)); + // END: com.azure.storage.blob.BlobContainerAsyncClient.delete + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#deleteWithResponse(BlobContainerAccessConditions)} + */ + public void delete2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + + client.deleteWithResponse(accessConditions).subscribe(response -> + System.out.printf("Delete completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.deleteWithResponse#BlobContainerAccessConditions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getProperties()} + */ + public void getProperties() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getProperties + client.getProperties().subscribe(response -> + System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", + response.getBlobPublicAccess(), + response.hasLegalHold(), + response.hasImmutabilityPolicy())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getProperties + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getPropertiesWithResponse(LeaseAccessConditions)} + */ + public void getProperties2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions + LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + + client.getPropertiesWithResponse(accessConditions).subscribe(response -> + System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", + response.getValue().getBlobPublicAccess(), + response.getValue().hasLegalHold(), + response.getValue().hasImmutabilityPolicy())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#setMetadata(Map)} + */ + public void setMetadata() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setMetadata#Map + Map metadata = Collections.singletonMap("metadata", "value"); + client.setMetadata(metadata).subscribe( + response -> System.out.printf("Set metadata completed%n"), + error -> System.out.printf("Set metadata failed: %s%n", error)); + // END: com.azure.storage.blob.BlobContainerAsyncClient.setMetadata#Map + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#setMetadataWithResponse(Map, BlobContainerAccessConditions)} + */ + public void setMetadata2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions + Map metadata = Collections.singletonMap("metadata", "value"); + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + + client.setMetadataWithResponse(metadata, accessConditions).subscribe(response -> + System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.setMetadataWithResponse#Map-BlobContainerAccessConditions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getAccessPolicy()} + */ + public void getAccessPolicy() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicy + client.getAccessPolicy().subscribe(response -> { + System.out.printf("Blob Access Type: %s%n", response.getBlobAccessType()); + + for (SignedIdentifier identifier : response.getIdentifiers()) { + System.out.printf("Identifier Name: %s, Permissions %s%n", + identifier.getId(), + identifier.getAccessPolicy().getPermission()); + } + }); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicy + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getAccessPolicyWithResponse(LeaseAccessConditions)} + */ + public void getAccessPolicy2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions + LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + + client.getAccessPolicyWithResponse(accessConditions).subscribe(response -> { + System.out.printf("Blob Access Type: %s%n", response.getValue().getBlobAccessType()); + + for (SignedIdentifier identifier : response.getValue().getIdentifiers()) { + System.out.printf("Identifier Name: %s, Permissions %s%n", + identifier.getId(), + identifier.getAccessPolicy().getPermission()); + } + }); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#setAccessPolicy(PublicAccessType, List)} + */ + public void setAccessPolicy() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicy#PublicAccessType-List + SignedIdentifier identifier = new SignedIdentifier() + .setId("name") + .setAccessPolicy(new AccessPolicy() + .setStart(OffsetDateTime.now()) + .setExpiry(OffsetDateTime.now().plusDays(7)) + .setPermission("permissionString")); + + client.setAccessPolicy(PublicAccessType.CONTAINER, Collections.singletonList(identifier)).subscribe( + response -> System.out.printf("Set access policy completed%n"), + error -> System.out.printf("Set access policy failed: %s%n", error)); + // END: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicy#PublicAccessType-List + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#setAccessPolicyWithResponse(PublicAccessType, List, BlobContainerAccessConditions)} + */ + public void setAccessPolicy2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions + SignedIdentifier identifier = new SignedIdentifier() + .setId("name") + .setAccessPolicy(new AccessPolicy() + .setStart(OffsetDateTime.now()) + .setExpiry(OffsetDateTime.now().plusDays(7)) + .setPermission("permissionString")); + + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) + .setModifiedAccessConditions(new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); + + client.setAccessPolicyWithResponse(PublicAccessType.CONTAINER, Collections.singletonList(identifier), accessConditions) + .subscribe(response -> + System.out.printf("Set access policy completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#listBlobsFlat()} + */ + public void listBlobsFlat() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat + client.listBlobsFlat().subscribe(blob -> + System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#listBlobsFlat(ListBlobsOptions)} + */ + public void listBlobsFlat2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions + ListBlobsOptions options = new ListBlobsOptions() + .setPrefix("prefixToMatch") + .setDetails(new BlobListDetails() + .setRetrieveDeletedBlobs(true) + .setRetrieveSnapshots(true)); + + client.listBlobsFlat(options).subscribe(blob -> + System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", + blob.getName(), + blob.isPrefix(), + blob.isDeleted(), + blob.getSnapshot())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsFlat#ListBlobsOptions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#listBlobsHierarchy(String)} + */ + public void listBlobsHierarchy() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String + client.listBlobsHierarchy("directoryName").subscribe(blob -> + System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isDeleted())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#listBlobsHierarchy(String, ListBlobsOptions)} + */ + public void listBlobsHierarchy2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions + ListBlobsOptions options = new ListBlobsOptions() + .setPrefix("directoryName") + .setDetails(new BlobListDetails() + .setRetrieveDeletedBlobs(true) + .setRetrieveSnapshots(true)); + + client.listBlobsHierarchy("/", options).subscribe(blob -> + System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", + blob.getName(), + blob.isPrefix(), + blob.isDeleted(), + blob.getSnapshot())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getAccountInfo()} + */ + public void getAccountInfo() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfo + client.getAccountInfo().subscribe(response -> + System.out.printf("Account Kind: %s, SKU: %s%n", + response.getAccountKind(), + response.getSkuName())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfo + } + + /** + * Code snippet for {@link BlobContainerAsyncClient#getAccountInfoWithResponse()} + */ + public void getAccountInfo2() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfoWithResponse + client.getAccountInfoWithResponse().subscribe(response -> + System.out.printf("Account Kind: %s, SKU: %s%n", + response.getValue().getAccountKind(), + response.getValue().getSkuName())); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getAccountInfoWithResponse + } + + /** + * Generates a code sample for using {@link BlobContainerAsyncClient#getBlobContainerName()} + */ + public void getContainerName() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.getBlobContainerName + String containerName = client.getBlobContainerName(); + System.out.println("The name of the blob is " + containerName); + // END: com.azure.storage.blob.BlobContainerAsyncClient.getBlobContainerName + } +} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java similarity index 57% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientBuilderJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java index 576584ffb66e..ea2d2721becc 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientBuilderJavaDocCodeSnippets.java @@ -14,10 +14,10 @@ import com.azure.storage.common.policy.SharedKeyCredentialPolicy; /** - * Code snippets for {@link ContainerClientBuilder} + * Code snippets for {@link BlobContainerClientBuilder} */ @SuppressWarnings({"unused"}) -public class ContainerClientBuilderJavaDocCodeSnippets { +public class BlobContainerClientBuilderJavaDocCodeSnippets { private String connectionString = "AccountName=name;AccountKey=key;DefaultEndpointProtocol=protocol;EndpointSuffix=suffix"; private String endpoint = "endpointURL"; private String containerName = "container Name"; @@ -31,48 +31,48 @@ public class ContainerClientBuilderJavaDocCodeSnippets { .build(); /** - * Code snippet for {@link ContainerClientBuilder#buildClient()} using connection string + * Code snippet for {@link BlobContainerClientBuilder#buildClient()} using connection string */ public void containerClientConnectionString() { - // BEGIN: com.azure.storage.blob.ContainerClientBuilder.buildClient - ContainerClient client = new ContainerClientBuilder() + // BEGIN: com.azure.storage.blob.BlobContainerClientBuilder.buildClient + BlobContainerClient client = new BlobContainerClientBuilder() .connectionString(connectionString) .buildClient(); - // END: com.azure.storage.blob.ContainerClientBuilder.buildClient + // END: com.azure.storage.blob.BlobContainerClientBuilder.buildClient } /** - * Code snippet for {@link ContainerClientBuilder#buildAsyncClient()} using connection string + * Code snippet for {@link BlobContainerClientBuilder#buildAsyncClient()} using connection string */ public void containerAsyncClientConnectionString() { - // BEGIN: com.azure.storage.blob.ContainerClientBuilder.buildAsyncClient - ContainerAsyncClient client = new ContainerClientBuilder() + // BEGIN: com.azure.storage.blob.BlobContainerClientBuilder.buildAsyncClient + BlobContainerAsyncClient client = new BlobContainerClientBuilder() .connectionString(connectionString) .buildAsyncClient(); - // END: com.azure.storage.blob.ContainerClientBuilder.buildAsyncClient + // END: com.azure.storage.blob.BlobContainerClientBuilder.buildAsyncClient } /** - * Code snippet for {@link ContainerClientBuilder#buildClient()} using credential and endpoint + * Code snippet for {@link BlobContainerClientBuilder#buildClient()} using credential and endpoint */ public void containerClientCredentialAndEndpoint() { - // BEGIN: com.azure.storage.blob.ContainerClientBuilder.endpoint#String - ContainerClient client = new ContainerClientBuilder() + // BEGIN: com.azure.storage.blob.BlobContainerClientBuilder.endpoint#String + BlobContainerClient client = new BlobContainerClientBuilder() .endpoint(endpoint) .credential(sharedKeyCredential) .buildClient(); - // END: com.azure.storage.blob.ContainerClientBuilder.endpoint#String + // END: com.azure.storage.blob.BlobContainerClientBuilder.endpoint#String } /** - * Code snippet for {@link ContainerClientBuilder#buildClient()} using Container Name + * Code snippet for {@link BlobContainerClientBuilder#buildClient()} using Container Name */ public void containerClientContainerName() { - // BEGIN: com.azure.storage.blob.ContainerClientBuilder.containerName#String - ContainerClient client = new ContainerClientBuilder() + // BEGIN: com.azure.storage.blob.BlobContainerClientBuilder.containerName#String + BlobContainerClient client = new BlobContainerClientBuilder() .endpoint(endpoint) .containerName(containerName) .buildClient(); - // END: com.azure.storage.blob.ContainerClientBuilder.containerName#String + // END: com.azure.storage.blob.BlobContainerClientBuilder.containerName#String } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java index d36c5dccebf0..a26cdc9c76cc 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java @@ -5,12 +5,11 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessPolicy; +import com.azure.storage.blob.models.BlobContainerAccessConditions; import com.azure.storage.blob.models.BlobListDetails; -import com.azure.storage.blob.models.ContainerAccessConditions; -import com.azure.storage.blob.models.ContainerAccessPolicies; +import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.LeaseAccessConditions; import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.SignedIdentifier; @@ -19,18 +18,19 @@ import com.azure.storage.blob.models.StorageException; import com.azure.storage.blob.models.UserDelegationKey; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; +import java.util.Map; @SuppressWarnings({"unused"}) -public class ContainerClientJavaDocCodeSnippets { +public class BlobContainerClientJavaDocCodeSnippets { - private ContainerClient client = JavaDocCodeSnippetsHelpers.getContainerClient(); + private BlobContainerClient client = JavaDocCodeSnippetsHelpers.getContainerClient(); private String blobName = "blobName"; private String snapshot = "snapshot"; private String leaseId = "leaseId"; @@ -39,22 +39,22 @@ public class ContainerClientJavaDocCodeSnippets { private Duration timeout = Duration.ofSeconds(30); /** - * Code snippet for {@link ContainerClient#generateUserDelegationSAS(UserDelegationKey, String, - * ContainerSASPermission, OffsetDateTime, OffsetDateTime, String, SASProtocol, IPRange, String, String, String, + * Code snippet for {@link BlobContainerClient#generateUserDelegationSAS(UserDelegationKey, String, + * BlobContainerSasPermission, OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, * String, String)} */ public void generateUserDelegationSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.ContainerClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true); + // BEGIN: com.azure.storage.blob.BlobContainerClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobContainerSasPermission permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -70,25 +70,25 @@ public void generateUserDelegationSASCodeSnippets() { String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.ContainerClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobContainerClient.generateUserDelegationSAS#UserDelegationKey-String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** - * Code snippet for {@link ContainerClient#generateSAS(String, ContainerSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Code snippet for {@link BlobContainerClient#generateSAS(String, BlobContainerSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.ContainerClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true); + // BEGIN: com.azure.storage.blob.BlobContainerClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobContainerSasPermission permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -103,101 +103,47 @@ public void generateSASCodeSnippets() { // Note either "identifier", or "expiryTime and permissions" are required to be set String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.ContainerClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.blob.BlobContainerClient.generateSAS#String-BlobContainerSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** - * Code snippet for {@link ContainerClient#getBlobClient(String)} + * Code snippet for {@link BlobContainerClient#getBlobClient(String)} */ public void getBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getBlobClient#String + // BEGIN: com.azure.storage.blob.BlobContainerClient.getBlobClient#String BlobClient blobClient = client.getBlobClient(blobName); - // END: com.azure.storage.blob.ContainerClient.getBlobClient#String + // END: com.azure.storage.blob.BlobContainerClient.getBlobClient#String } /** - * Code snippet for {@link ContainerClient#getBlobClient(String, String)} + * Code snippet for {@link BlobContainerClient#getBlobClient(String, String)} */ public void getSnapshotBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getBlobClient#String-String + // BEGIN: com.azure.storage.blob.BlobContainerClient.getBlobClient#String-String BlobClient blobClient = client.getBlobClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerClient.getBlobClient#String-String + // END: com.azure.storage.blob.BlobContainerClient.getBlobClient#String-String } /** - * Code snippet for {@link ContainerClient#getAppendBlobClient(String)} - */ - public void getAppendBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAppendBlobClient#String - AppendBlobClient appendBlobClient = client.getAppendBlobClient(blobName); - // END: com.azure.storage.blob.ContainerClient.getAppendBlobClient#String - } - - /** - * Code snippet for {@link ContainerClient#getAppendBlobClient(String, String)} - */ - public void getSnapshotAppendBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAppendBlobClient#String-String - AppendBlobClient appendBlobClient = client.getAppendBlobClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerClient.getAppendBlobClient#String-String - } - - /** - * Code snippet for {@link ContainerClient#getBlockBlobClient(String)} - */ - public void getBlockBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getBlockBlobClient#String - BlockBlobClient blockBlobClient = client.getBlockBlobClient(blobName); - // END: com.azure.storage.blob.ContainerClient.getBlockBlobClient#String - } - - /** - * Code snippet for {@link ContainerClient#getBlockBlobClient(String, String)} - */ - public void getSnapshotBlockBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getBlockBlobClient#String-String - BlockBlobClient blockBlobClient = client.getBlockBlobClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerClient.getBlockBlobClient#String-String - } - - /** - * Code snippet for {@link ContainerClient#getPageBlobClient(String)} - */ - public void getPageBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getPageBlobClient#String - PageBlobClient pageBlobClient = client.getPageBlobClient(blobName); - // END: com.azure.storage.blob.ContainerClient.getPageBlobClient#String - } - - /** - * Code snippet for {@link ContainerClient#getPageBlobClient(String, String)} - */ - public void getSnapshotPageBlobClient() { - // BEGIN: com.azure.storage.blob.ContainerClient.getPageBlobClient#String-String - PageBlobClient pageBlobClient = client.getPageBlobClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerClient.getPageBlobClient#String-String - } - - /** - * Code snippets for {@link ContainerClient#exists()} and {@link ContainerClient#existsWithResponse(Duration, + * Code snippets for {@link BlobContainerClient#exists()} and {@link BlobContainerClient#existsWithResponse(Duration, * Context)} */ public void exists() { - // BEGIN: com.azure.storage.blob.ContainerClient.exists + // BEGIN: com.azure.storage.blob.BlobContainerClient.exists System.out.printf("Exists? %b%n", client.exists()); - // END: com.azure.storage.blob.ContainerClient.exists + // END: com.azure.storage.blob.BlobContainerClient.exists - // BEGIN: com.azure.storage.blob.ContainerClient.existsWithResponse#Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.existsWithResponse#Duration-Context Context context = new Context("Key", "Value"); System.out.printf("Exists? %b%n", client.existsWithResponse(timeout, context).getValue()); - // END: com.azure.storage.blob.ContainerClient.existsWithResponse#Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.existsWithResponse#Duration-Context } /** - * Code snippet for {@link ContainerClient#create()} + * Code snippet for {@link BlobContainerClient#create()} */ public void setCreate() { - // BEGIN: com.azure.storage.blob.ContainerClient.create + // BEGIN: com.azure.storage.blob.BlobContainerClient.create try { client.create(); System.out.printf("Create completed%n"); @@ -206,27 +152,27 @@ public void setCreate() { System.out.printf("Can't create container. It already exists %n"); } } - // END: com.azure.storage.blob.ContainerClient.create + // END: com.azure.storage.blob.BlobContainerClient.create } /** - * Code snippet for {@link ContainerClient#createWithResponse(Metadata, PublicAccessType, Duration, Context)} + * Code snippet for {@link BlobContainerClient#createWithResponse(Map, PublicAccessType, Duration, Context)} */ public void create2() { - // BEGIN: com.azure.storage.blob.ContainerClient.createWithResponse#Metadata-PublicAccessType-Duration-Context - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + // BEGIN: com.azure.storage.blob.BlobContainerClient.createWithResponse#Map-PublicAccessType-Duration-Context + Map metadata = Collections.singletonMap("metadata", "value"); Context context = new Context("Key", "Value"); System.out.printf("Create completed with status %d%n", client.createWithResponse(metadata, PublicAccessType.CONTAINER, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.ContainerClient.createWithResponse#Metadata-PublicAccessType-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.createWithResponse#Map-PublicAccessType-Duration-Context } /** - * Code snippet for {@link ContainerClient#delete()} + * Code snippet for {@link BlobContainerClient#delete()} */ public void setDelete() { - // BEGIN: com.azure.storage.blob.ContainerClient.delete + // BEGIN: com.azure.storage.blob.BlobContainerClient.delete try { client.delete(); System.out.printf("Delete completed%n"); @@ -235,15 +181,15 @@ public void setDelete() { System.out.printf("Delete failed. Container was not found %n"); } } - // END: com.azure.storage.blob.ContainerClient.delete + // END: com.azure.storage.blob.BlobContainerClient.delete } /** - * Code snippet for {@link ContainerClient#deleteWithResponse(ContainerAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#deleteWithResponse(BlobContainerAccessConditions, Duration, Context)} */ public void delete2() { - // BEGIN: com.azure.storage.blob.ContainerClient.deleteWithResponse#ContainerAccessConditions-Duration-Context - ContainerAccessConditions accessConditions = new ContainerAccessConditions() + // BEGIN: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); @@ -251,63 +197,62 @@ public void delete2() { System.out.printf("Delete completed with status %d%n", client.deleteWithResponse( accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.ContainerClient.deleteWithResponse#ContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.deleteWithResponse#BlobContainerAccessConditions-Duration-Context } /** - * Code snippet for {@link ContainerClient#getProperties()} + * Code snippet for {@link BlobContainerClient#getProperties()} */ public void getProperties() { - // BEGIN: com.azure.storage.blob.ContainerClient.getProperties - ContainerProperties properties = client.getProperties(); + // BEGIN: com.azure.storage.blob.BlobContainerClient.getProperties + BlobContainerProperties properties = client.getProperties(); System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", properties.getBlobPublicAccess(), properties.hasLegalHold(), properties.hasImmutabilityPolicy()); - // END: com.azure.storage.blob.ContainerClient.getProperties + // END: com.azure.storage.blob.BlobContainerClient.getProperties } /** - * Code snippet for {@link ContainerClient#getPropertiesWithResponse(LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#getPropertiesWithResponse(LeaseAccessConditions, Duration, Context)} */ public void getProperties2() { - // BEGIN: com.azure.storage.blob.ContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); Context context = new Context("Key", "Value"); - ContainerProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, context) + BlobContainerProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, context) .getValue(); System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", properties.getBlobPublicAccess(), properties.hasLegalHold(), properties.hasImmutabilityPolicy()); - // END: com.azure.storage.blob.ContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.getPropertiesWithResponse#LeaseAccessConditions-Duration-Context } /** - * Code snippet for {@link ContainerClient#setMetadata(Metadata)} + * Code snippet for {@link BlobContainerClient#setMetadata(Map)} */ public void setMetadata() { - // BEGIN: com.azure.storage.blob.ContainerClient.setMetadata#Metadata - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - + // BEGIN: com.azure.storage.blob.BlobContainerClient.setMetadata#Map + Map metadata = Collections.singletonMap("metadata", "value"); try { client.setMetadata(metadata); System.out.printf("Set metadata completed with status %n"); } catch (UnsupportedOperationException error) { System.out.printf("Fail while setting metadata %n"); } - // END: com.azure.storage.blob.ContainerClient.setMetadata#Metadata + // END: com.azure.storage.blob.BlobContainerClient.setMetadata#Map } /** - * Code snippet for {@link ContainerClient#setMetadataWithResponse(Metadata, ContainerAccessConditions, Duration, + * Code snippet for {@link BlobContainerClient#setMetadataWithResponse(Map, BlobContainerAccessConditions, Duration, * Context)} */ public void setMetadata2() { - // BEGIN: com.azure.storage.blob.ContainerClient.setMetadataWithResponse#Metadata-ContainerAccessConditions-Duration-Context - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - ContainerAccessConditions accessConditions = new ContainerAccessConditions() + // BEGIN: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context + Map metadata = Collections.singletonMap("metadata", "value"); + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); @@ -315,15 +260,15 @@ public void setMetadata2() { System.out.printf("Set metadata completed with status %d%n", client.setMetadataWithResponse(metadata, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.ContainerClient.setMetadataWithResponse#Metadata-ContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.setMetadataWithResponse#Map-BlobContainerAccessConditions-Duration-Context } /** - * Code snippet for {@link ContainerClient#getAccessPolicy()} + * Code snippet for {@link BlobContainerClient#getAccessPolicy()} */ public void getAccessPolicy() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAccessPolicy - ContainerAccessPolicies accessPolicies = client.getAccessPolicy(); + // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccessPolicy + BlobContainerAccessPolicies accessPolicies = client.getAccessPolicy(); System.out.printf("Blob Access Type: %s%n", accessPolicies.getBlobAccessType()); for (SignedIdentifier identifier : accessPolicies.getIdentifiers()) { @@ -331,17 +276,17 @@ public void getAccessPolicy() { identifier.getId(), identifier.getAccessPolicy().getPermission()); } - // END: com.azure.storage.blob.ContainerClient.getAccessPolicy + // END: com.azure.storage.blob.BlobContainerClient.getAccessPolicy } /** - * Code snippet for {@link ContainerClient#getAccessPolicyWithResponse(LeaseAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#getAccessPolicyWithResponse(LeaseAccessConditions, Duration, Context)} */ public void getAccessPolicy2() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); Context context = new Context("Key", "Value"); - ContainerAccessPolicies accessPolicies = client.getAccessPolicyWithResponse(accessConditions, timeout, context) + BlobContainerAccessPolicies accessPolicies = client.getAccessPolicyWithResponse(accessConditions, timeout, context) .getValue(); System.out.printf("Blob Access Type: %s%n", accessPolicies.getBlobAccessType()); @@ -350,14 +295,14 @@ public void getAccessPolicy2() { identifier.getId(), identifier.getAccessPolicy().getPermission()); } - // END: com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.getAccessPolicyWithResponse#LeaseAccessConditions-Duration-Context } /** - * Code snippet for {@link ContainerClient#setAccessPolicy(PublicAccessType, List)} + * Code snippet for {@link BlobContainerClient#setAccessPolicy(PublicAccessType, List)} */ public void setAccessPolicy() { - // BEGIN: com.azure.storage.blob.ContainerClient.setAccessPolicy#PublicAccessType-List + // BEGIN: com.azure.storage.blob.BlobContainerClient.setAccessPolicy#PublicAccessType-List SignedIdentifier identifier = new SignedIdentifier() .setId("name") .setAccessPolicy(new AccessPolicy() @@ -371,15 +316,15 @@ public void setAccessPolicy() { } catch (UnsupportedOperationException error) { System.out.printf("Set Access Policy completed %s%n", error); } - // END: com.azure.storage.blob.ContainerClient.setAccessPolicy#PublicAccessType-List + // END: com.azure.storage.blob.BlobContainerClient.setAccessPolicy#PublicAccessType-List } /** - * Code snippet for {@link ContainerClient#setAccessPolicyWithResponse(PublicAccessType, List, - * ContainerAccessConditions, Duration, Context)} + * Code snippet for {@link BlobContainerClient#setAccessPolicyWithResponse(PublicAccessType, List, + * BlobContainerAccessConditions, Duration, Context)} */ public void setAccessPolicy2() { - // BEGIN: com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context SignedIdentifier identifier = new SignedIdentifier() .setId("name") .setAccessPolicy(new AccessPolicy() @@ -387,7 +332,7 @@ public void setAccessPolicy2() { .setExpiry(OffsetDateTime.now().plusDays(7)) .setPermission("permissionString")); - ContainerAccessConditions accessConditions = new ContainerAccessConditions() + BlobContainerAccessConditions accessConditions = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); @@ -400,29 +345,29 @@ public void setAccessPolicy2() { accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions-Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.setAccessPolicyWithResponse#PublicAccessType-List-BlobContainerAccessConditions-Duration-Context } /** - * Code snippet for {@link ContainerClient#listBlobsFlat()} + * Code snippet for {@link BlobContainerClient#listBlobsFlat()} */ public void listBlobsFlat() { - // BEGIN: com.azure.storage.blob.ContainerClient.listBlobsFlat + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsFlat client.listBlobsFlat().forEach(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.ContainerClient.listBlobsFlat + // END: com.azure.storage.blob.BlobContainerClient.listBlobsFlat } /** - * Code snippet for {@link ContainerClient#listBlobsFlat(ListBlobsOptions, Duration)} + * Code snippet for {@link BlobContainerClient#listBlobsFlat(ListBlobsOptions, Duration)} */ public void listBlobsFlat2() { - // BEGIN: com.azure.storage.blob.ContainerClient.listBlobsFlat#ListBlobsOptions-Duration + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration ListBlobsOptions options = new ListBlobsOptions() .setPrefix("prefixToMatch") .setDetails(new BlobListDetails() - .setDeletedBlobs(true) - .setSnapshots(true)); + .setRetrieveDeletedBlobs(true) + .setRetrieveSnapshots(true)); client.listBlobsFlat(options, timeout).forEach(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", @@ -430,29 +375,29 @@ public void listBlobsFlat2() { blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.ContainerClient.listBlobsFlat#ListBlobsOptions-Duration + // END: com.azure.storage.blob.BlobContainerClient.listBlobsFlat#ListBlobsOptions-Duration } /** - * Code snippet for {@link ContainerClient#listBlobsHierarchy(String)} + * Code snippet for {@link BlobContainerClient#listBlobsHierarchy(String)} */ public void listBlobsHierarchy() { - // BEGIN: com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String client.listBlobsHierarchy("directoryName").forEach(blob -> System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String + // END: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String } /** - * Code snippet for {@link ContainerClient#listBlobsHierarchy(String, ListBlobsOptions, Duration)} + * Code snippet for {@link BlobContainerClient#listBlobsHierarchy(String, ListBlobsOptions, Duration)} */ public void listBlobsHierarchy2() { - // BEGIN: com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration + // BEGIN: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration ListBlobsOptions options = new ListBlobsOptions() .setPrefix("directoryName") .setDetails(new BlobListDetails() - .setDeletedBlobs(true) - .setSnapshots(true)); + .setRetrieveDeletedBlobs(true) + .setRetrieveSnapshots(true)); client.listBlobsHierarchy("/", options, timeout).forEach(blob -> System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", @@ -460,37 +405,37 @@ public void listBlobsHierarchy2() { blob.isPrefix(), blob.isDeleted(), blob.getSnapshot())); - // END: com.azure.storage.blob.ContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration + // END: com.azure.storage.blob.BlobContainerClient.listBlobsHierarchy#String-ListBlobsOptions-Duration } /** - * Code snippet for {@link ContainerClient#getAccountInfo(Duration)} + * Code snippet for {@link BlobContainerClient#getAccountInfo(Duration)} */ public void getAccountInfo() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAccountInfo#Duration + // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccountInfo#Duration StorageAccountInfo accountInfo = client.getAccountInfo(timeout); System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.getAccountKind(), accountInfo.getSkuName()); - // END: com.azure.storage.blob.ContainerClient.getAccountInfo#Duration + // END: com.azure.storage.blob.BlobContainerClient.getAccountInfo#Duration } /** - * Code snippet for {@link ContainerClient#getAccountInfoWithResponse(Duration, Context)} + * Code snippet for {@link BlobContainerClient#getAccountInfoWithResponse(Duration, Context)} */ public void getAccountInfo2() { - // BEGIN: com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse#Duration-Context + // BEGIN: com.azure.storage.blob.BlobContainerClient.getAccountInfoWithResponse#Duration-Context Context context = new Context("Key", "Value"); StorageAccountInfo accountInfo = client.getAccountInfoWithResponse(timeout, context).getValue(); System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.getAccountKind(), accountInfo.getSkuName()); - // END: com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse#Duration-Context + // END: com.azure.storage.blob.BlobContainerClient.getAccountInfoWithResponse#Duration-Context } /** - * Generates a code sample for using {@link ContainerClient#getContainerName()} + * Generates a code sample for using {@link BlobContainerClient#getBlobContainerName()} */ public void getContainerName() { - // BEGIN: com.azure.storage.blob.ContainerClient.getContainerName - String containerName = client.getContainerName(); + // BEGIN: com.azure.storage.blob.BlobContainerClient.getBlobContainerName + String containerName = client.getBlobContainerName(); System.out.println("The name of the blob is " + containerName); - // END: com.azure.storage.blob.ContainerClient.getContainerName + // END: com.azure.storage.blob.BlobContainerClient.getBlobContainerName } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java index a08654e37e65..1473724a4806 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java @@ -4,24 +4,22 @@ package com.azure.storage.blob; import com.azure.core.util.Context; - -import com.azure.storage.common.AccountSASPermission; -import com.azure.storage.common.AccountSASResourceType; -import com.azure.storage.common.AccountSASService; -import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; -import com.azure.storage.common.SASProtocol; -import com.azure.storage.blob.models.ContainerListDetails; -import com.azure.storage.blob.models.ListContainersOptions; +import com.azure.storage.blob.models.BlobContainerListDetails; +import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.Logging; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.Metrics; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.RetentionPolicy; import com.azure.storage.blob.models.StorageServiceProperties; - -import java.util.Collections; +import com.azure.storage.common.AccountSASPermission; +import com.azure.storage.common.AccountSASResourceType; +import com.azure.storage.common.AccountSASService; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link BlobServiceAsyncClient} @@ -33,10 +31,10 @@ public class BlobServiceAsyncClientJavaDocCodeSnippets { /** * Generates a code sample for using {@link BlobServiceAsyncClient#generateAccountSAS(AccountSASService, - * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IPRange, SASProtocol)} + * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IpRange, SASProtocol)} */ public void generateAccountSAS() { - // BEGIN: com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // BEGIN: com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol AccountSASService service = new AccountSASService() .setBlob(true) .setFile(true) @@ -57,7 +55,7 @@ public void generateAccountSAS() { .setUpdatePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -65,78 +63,77 @@ public void generateAccountSAS() { String sas = client.generateAccountSAS(service, resourceType, permission, expiryTime, startTime, version, ipRange, sasProtocol); - // END: com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // END: com.azure.storage.blob.blobServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol } /** - * Code snippet for {@link BlobServiceAsyncClient#getContainerAsyncClient(String)} + * Code snippet for {@link BlobServiceAsyncClient#getBlobContainerAsyncClient(String)} */ public void getContainerClient() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.getContainerAsyncClient#String - ContainerAsyncClient containerAsyncClient = client.getContainerAsyncClient("containerName"); - // END: com.azure.storage.blob.BlobServiceAsyncClient.getContainerAsyncClient#String + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.getBlobContainerAsyncClient#String + BlobContainerAsyncClient blobContainerAsyncClient = client.getBlobContainerAsyncClient("containerName"); + // END: com.azure.storage.blob.BlobServiceAsyncClient.getBlobContainerAsyncClient#String } /** - * Code snippet for {@link BlobServiceAsyncClient#createContainer(String)} + * Code snippet for {@link BlobServiceAsyncClient#createBlobContainer(String)} */ public void createContainer() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.createContainer#String - ContainerAsyncClient containerAsyncClient = - client.createContainer("containerName").block(); - // END: com.azure.storage.blob.BlobServiceAsyncClient.createContainer#String + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainer#String + BlobContainerAsyncClient blobContainerAsyncClient = + client.createBlobContainer("containerName").block(); + // END: com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainer#String } /** - * Code snippet for {@link BlobServiceAsyncClient#createContainerWithResponse(String, Metadata, PublicAccessType)} + * Code snippet for {@link BlobServiceAsyncClient#createBlobContainerWithResponse(String, Map, PublicAccessType)} */ public void createContainerWithResponse() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.createContainerWithResponse#String-Metadata-PublicAccessType - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - - ContainerAsyncClient containerClient = - client.createContainerWithResponse("containerName", metadata, PublicAccessType.CONTAINER).block().getValue(); - // END: com.azure.storage.blob.BlobServiceAsyncClient.createContainerWithResponse#String-Metadata-PublicAccessType + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainerWithResponse#String-Map-PublicAccessType + Map metadata = Collections.singletonMap("metadata", "value"); + BlobContainerAsyncClient containerClient = + client.createBlobContainerWithResponse("containerName", metadata, PublicAccessType.CONTAINER).block().getValue(); + // END: com.azure.storage.blob.BlobServiceAsyncClient.createBlobContainerWithResponse#String-Map-PublicAccessType } /** - * Code snippet for {@link BlobServiceAsyncClient#deleteContainer(String)} + * Code snippet for {@link BlobServiceAsyncClient#deleteBlobContainer(String)} */ public void deleteContainer() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.deleteContainer#String - client.deleteContainer("containerName").subscribe( + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainer#String + client.deleteBlobContainer("containerName").subscribe( response -> System.out.printf("Delete container completed%n"), error -> System.out.printf("Delete container failed: %s%n", error)); - // END: com.azure.storage.blob.BlobServiceAsyncClient.deleteContainer#String + // END: com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainer#String } /** - * Code snippet for {@link BlobServiceAsyncClient#deleteContainerWithResponse(String, Context)} + * Code snippet for {@link BlobServiceAsyncClient#deleteBlobContainerWithResponse(String, Context)} */ public void deleteContainerWithResponse() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.deleteContainerWithResponse#String-Context + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainerWithResponse#String-Context Context context = new Context("Key", "Value"); - client.deleteContainerWithResponse("containerName").subscribe(response -> + client.deleteBlobContainerWithResponse("containerName").subscribe(response -> System.out.printf("Delete container completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlobServiceAsyncClient.deleteContainerWithResponse#String-Context + // END: com.azure.storage.blob.BlobServiceAsyncClient.deleteBlobContainerWithResponse#String-Context } /** - * Code snippets for {@link BlobServiceAsyncClient#listContainers()} and - * {@link BlobServiceAsyncClient#listContainers(ListContainersOptions)} + * Code snippets for {@link BlobServiceAsyncClient#listBlobContainers()} and + * {@link BlobServiceAsyncClient#listBlobContainers(ListBlobContainersOptions)} */ public void listContainers() { - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.listContainers - client.listContainers().subscribe(container -> System.out.printf("Name: %s%n", container.getName())); - // END: com.azure.storage.blob.BlobServiceAsyncClient.listContainers + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers + client.listBlobContainers().subscribe(container -> System.out.printf("Name: %s%n", container.getName())); + // END: com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers - // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.listContainers#ListContainersOptions - ListContainersOptions options = new ListContainersOptions() + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers#ListBlobContainersOptions + ListBlobContainersOptions options = new ListBlobContainersOptions() .setPrefix("containerNamePrefixToMatch") - .setDetails(new ContainerListDetails().setMetadata(true)); + .setDetails(new BlobContainerListDetails().setRetrieveMetadata(true)); - client.listContainers(options).subscribe(container -> System.out.printf("Name: %s%n", container.getName())); - // END: com.azure.storage.blob.BlobServiceAsyncClient.listContainers#ListContainersOptions + client.listBlobContainers(options).subscribe(container -> System.out.printf("Name: %s%n", container.getName())); + // END: com.azure.storage.blob.BlobServiceAsyncClient.listBlobContainers#ListBlobContainersOptions } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java index ef43c52a084c..8ee24a5b5b23 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java @@ -4,27 +4,24 @@ package com.azure.storage.blob; import com.azure.core.util.Context; - -import com.azure.storage.common.AccountSASPermission; -import com.azure.storage.common.AccountSASResourceType; -import com.azure.storage.common.AccountSASService; -import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; -import com.azure.storage.common.SASProtocol; - -import com.azure.storage.blob.models.ContainerListDetails; -import com.azure.storage.blob.models.ListContainersOptions; +import com.azure.storage.blob.models.BlobContainerListDetails; +import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.Logging; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.Metrics; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.RetentionPolicy; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.StorageServiceProperties; - +import com.azure.storage.common.AccountSASPermission; +import com.azure.storage.common.AccountSASResourceType; +import com.azure.storage.common.AccountSASService; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link BlobServiceClient} @@ -36,10 +33,10 @@ public class BlobServiceClientJavaDocCodeSnippets { /** * Generates a code sample for using {@link BlobServiceClient#generateAccountSAS(AccountSASService, - * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IPRange, SASProtocol)} + * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IpRange, SASProtocol)} */ public void generateAccountSAS() { - // BEGIN: com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // BEGIN: com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol AccountSASService service = new AccountSASService() .setBlob(true) .setFile(true) @@ -60,7 +57,7 @@ public void generateAccountSAS() { .setUpdatePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -68,84 +65,84 @@ public void generateAccountSAS() { String sas = client.generateAccountSAS(service, resourceType, permission, expiryTime, startTime, version, ipRange, sasProtocol); - // END: com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // END: com.azure.storage.blob.blobServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol } /** - * Code snippet for {@link BlobServiceClient#getContainerClient(String)} + * Code snippet for {@link BlobServiceClient#getBlobContainerClient(String)} */ public void getContainerClient() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.getContainerClient#String - ContainerClient containerClient = client.getContainerClient("containerName"); - // END: com.azure.storage.blob.BlobServiceClient.getContainerClient#String + // BEGIN: com.azure.storage.blob.BlobServiceClient.getBlobContainerClient#String + BlobContainerClient blobContainerClient = client.getBlobContainerClient("containerName"); + // END: com.azure.storage.blob.BlobServiceClient.getBlobContainerClient#String } /** - * Code snippet for {@link BlobServiceClient#createContainer(String)} + * Code snippet for {@link BlobServiceClient#createBlobContainer(String)} */ public void createContainer() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.createContainer#String - ContainerClient containerClient = client.createContainer("containerName"); - // END: com.azure.storage.blob.BlobServiceClient.createContainer#String + // BEGIN: com.azure.storage.blob.BlobServiceClient.createBlobContainer#String + BlobContainerClient blobContainerClient = client.createBlobContainer("containerName"); + // END: com.azure.storage.blob.BlobServiceClient.createBlobContainer#String } /** - * Code snippet for {@link BlobServiceClient#createContainerWithResponse(String, Metadata, PublicAccessType, Context)} + * Code snippet for {@link BlobServiceClient#createBlobContainerWithResponse(String, Map, PublicAccessType, Context)} */ public void createContainerWithResponse() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.createContainerWithResponse#String-Metadata-PublicAccessType-Context - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + // BEGIN: com.azure.storage.blob.BlobServiceClient.createBlobContainerWithResponse#String-Map-PublicAccessType-Context + Map metadata = Collections.singletonMap("metadata", "value"); Context context = new Context("Key", "Value"); - ContainerClient containerClient = client.createContainerWithResponse( + BlobContainerClient blobContainerClient = client.createBlobContainerWithResponse( "containerName", metadata, PublicAccessType.CONTAINER, context).getValue(); - // END: com.azure.storage.blob.BlobServiceClient.createContainerWithResponse#String-Metadata-PublicAccessType-Context + // END: com.azure.storage.blob.BlobServiceClient.createBlobContainerWithResponse#String-Map-PublicAccessType-Context } /** - * Code snippet for {@link BlobServiceClient#deleteContainer(String)} + * Code snippet for {@link BlobServiceClient#deleteBlobContainer(String)} */ public void deleteContainer() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.deleteContainer#String + // BEGIN: com.azure.storage.blob.BlobServiceClient.deleteBlobContainer#String try { - client.deleteContainer("container Name"); + client.deleteBlobContainer("container Name"); System.out.printf("Delete container completed with status %n"); } catch (UnsupportedOperationException error) { System.out.printf("Delete container failed: %s%n", error); } - // END: com.azure.storage.blob.BlobServiceClient.deleteContainer#String + // END: com.azure.storage.blob.BlobServiceClient.deleteBlobContainer#String } /** - * Code snippet for {@link BlobServiceClient#deleteContainerWithResponse(String, Context)} + * Code snippet for {@link BlobServiceClient#deleteBlobContainerWithResponse(String, Context)} */ public void deleteContainerWithResponse() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.deleteContainerWithResponse#String-Context + // BEGIN: com.azure.storage.blob.BlobServiceClient.deleteBlobContainerWithResponse#String-Context Context context = new Context("Key", "Value"); System.out.printf("Delete container completed with status %d%n", - client.deleteContainerWithResponse("containerName", context).getStatusCode()); - // END: com.azure.storage.blob.BlobServiceClient.deleteContainerWithResponse#String-Context + client.deleteBlobContainerWithResponse("containerName", context).getStatusCode()); + // END: com.azure.storage.blob.BlobServiceClient.deleteBlobContainerWithResponse#String-Context } /** - * Code snippets for {@link BlobServiceClient#listContainers()} and - * {@link BlobServiceClient#listContainers(ListContainersOptions, Duration)} + * Code snippets for {@link BlobServiceClient#listBlobContainers()} and + * {@link BlobServiceClient#listBlobContainers(ListBlobContainersOptions, Duration)} */ public void listContainers() { - // BEGIN: com.azure.storage.blob.BlobServiceClient.listContainers - client.listContainers().forEach(container -> System.out.printf("Name: %s%n", container.getName())); - // END: com.azure.storage.blob.BlobServiceClient.listContainers + // BEGIN: com.azure.storage.blob.BlobServiceClient.listBlobContainers + client.listBlobContainers().forEach(container -> System.out.printf("Name: %s%n", container.getName())); + // END: com.azure.storage.blob.BlobServiceClient.listBlobContainers - // BEGIN: com.azure.storage.blob.BlobServiceClient.listContainers#ListContainersOptions-Duration - ListContainersOptions options = new ListContainersOptions() + // BEGIN: com.azure.storage.blob.BlobServiceClient.listBlobContainers#ListBlobContainersOptions-Duration + ListBlobContainersOptions options = new ListBlobContainersOptions() .setPrefix("containerNamePrefixToMatch") - .setDetails(new ContainerListDetails().setMetadata(true)); + .setDetails(new BlobContainerListDetails().setRetrieveMetadata(true)); - client.listContainers(options, timeout).forEach(container -> System.out.printf("Name: %s%n", container.getName())); - // END: com.azure.storage.blob.BlobServiceClient.listContainers#ListContainersOptions-Duration + client.listBlobContainers(options, timeout).forEach(container -> System.out.printf("Name: %s%n", container.getName())); + // END: com.azure.storage.blob.BlobServiceClient.listBlobContainers#ListBlobContainersOptions-Duration } /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerAsyncClientJavaDocCodeSnippets.java deleted file mode 100644 index 41a8dfb46113..000000000000 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ContainerAsyncClientJavaDocCodeSnippets.java +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob; - -import com.azure.core.util.Context; -import com.azure.storage.blob.models.AccessPolicy; -import com.azure.storage.blob.models.BlobListDetails; -import com.azure.storage.blob.models.ContainerAccessConditions; -import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.ListBlobsOptions; -import com.azure.storage.blob.models.Metadata; -import com.azure.storage.blob.models.ModifiedAccessConditions; -import com.azure.storage.blob.models.PublicAccessType; -import com.azure.storage.blob.models.SignedIdentifier; -import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; -import com.azure.storage.common.SASProtocol; - -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -/** - * Code snippets for {@link ContainerAsyncClient} - */ -@SuppressWarnings({"unused"}) -public class ContainerAsyncClientJavaDocCodeSnippets { - - private ContainerAsyncClient client = JavaDocCodeSnippetsHelpers.getContainerAsyncClient(); - private String blobName = "blobName"; - private String snapshot = "snapshot"; - private String leaseId = "leaseId"; - private String proposedId = "proposedId"; - private int leaseDuration = (int) Duration.ofSeconds(30).getSeconds(); - - /** - * Code snippet for {@link ContainerAsyncClient#generateUserDelegationSAS(UserDelegationKey, String, - * ContainerSASPermission, OffsetDateTime, OffsetDateTime, String, SASProtocol, IPRange, String, String, String, - * String, String)} - */ - public void generateUserDelegationSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true); - OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); - OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255"); - SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; - String cacheControl = "cache"; - String contentDisposition = "disposition"; - String contentEncoding = "encoding"; - String contentLanguage = "language"; - String contentType = "type"; - String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; - String accountName = "accountName"; - UserDelegationKey userDelegationKey = new UserDelegationKey(); - - String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, - startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, - contentLanguage, contentType); - // END: com.azure.storage.blob.ContainerAsyncClient.generateUserDelegationSAS#UserDelegationKey-String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#generateSAS(String, ContainerSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} - */ - public void generateSASCodeSnippets() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true); - OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); - OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255"); - SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; - String cacheControl = "cache"; - String contentDisposition = "disposition"; - String contentEncoding = "encoding"; - String contentLanguage = "language"; - String contentType = "type"; - String identifier = "identifier"; - String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; - - // Note either "identifier", or "expiryTime and permissions" are required to be set - String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, - cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.blob.ContainerAsyncClient.generateSAS#String-ContainerSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getBlobAsyncClient(String)} - */ - public void getBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String - BlobAsyncClient blobAsyncClient = client.getBlobAsyncClient(blobName); - // END: com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getBlobAsyncClient(String, String)} - */ - public void getSnapshotBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String-String - BlobAsyncClient blobAsyncClient = client.getBlobAsyncClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerAsyncClient.getBlobAsyncClient#String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAppendBlobAsyncClient(String)} - */ - public void getAppendBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String - AppendBlobAsyncClient appendBlobAsyncClient = client.getAppendBlobAsyncClient(blobName); - // END: com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAppendBlobAsyncClient(String, String)} - */ - public void getSnapshotAppendBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String-String - AppendBlobAsyncClient appendBlobAsyncClient = client.getAppendBlobAsyncClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerAsyncClient.getAppendBlobAsyncClient#String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getBlockBlobAsyncClient(String)} - */ - public void getBlockBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getBlockBlobAsyncClient#String - BlockBlobAsyncClient blockBlobAsyncClient = client.getBlockBlobAsyncClient(blobName); - // END: com.azure.storage.blob.ContainerAsyncClient.getBlockBlobAsyncClient#String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getBlockBlobAsyncClient(String, String)} - */ - public void getSnapshotBlockBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getBlockBlobAsyncClient#String-String - BlockBlobAsyncClient blockBlobAsyncClient = client.getBlockBlobAsyncClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerAsyncClient.getBlockBlobAsyncClient#String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getPageBlobAsyncClient(String)} - */ - public void getPageBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String - PageBlobAsyncClient pageBlobAsyncClient = client.getPageBlobAsyncClient(blobName); - // END: com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String - } - - /** - * Code snippet for {@link ContainerAsyncClient#getPageBlobAsyncClient(String, String)} - */ - public void getSnapshotPageBlobAsyncClient() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String-String - PageBlobAsyncClient pageBlobAsyncClient = client.getPageBlobAsyncClient(blobName, snapshot); - // END: com.azure.storage.blob.ContainerAsyncClient.getPageBlobAsyncClient#String-String - } - - /** - * Code snippet for {@link ContainerAsyncClient#exists()} - */ - public void exists() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.exists - client.exists().subscribe(response -> System.out.printf("Exists? %b%n", response)); - // END: com.azure.storage.blob.ContainerAsyncClient.exists - } - - /** - * Code snippet for {@link ContainerAsyncClient#existsWithResponse()} - */ - public void existsWithResponse() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.existsWithResponse - client.existsWithResponse().subscribe(response -> System.out.printf("Exists? %b%n", response.getValue())); - // END: com.azure.storage.blob.ContainerAsyncClient.existsWithResponse - } - - /** - * Code snippet for {@link ContainerAsyncClient#existsWithResponse(Context)} - */ - public void existsWithResponse2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.existsWithResponse-Context - Context context = new Context("key", "value"); - client.existsWithResponse(context).subscribe(response -> System.out.printf("Exists? %b%n", response.getValue())); - // END: com.azure.storage.blob.ContainerAsyncClient.existsWithResponse-Context - } - - /** - * Code snippet for {@link ContainerAsyncClient#create()} - */ - public void setCreate() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.create - client.create().subscribe( - response -> System.out.printf("Create completed%n"), - error -> System.out.printf("Error while creating container %s%n", error)); - // END: com.azure.storage.blob.ContainerAsyncClient.create - } - - /** - * Code snippet for {@link ContainerAsyncClient#createWithResponse(Metadata, PublicAccessType)} - */ - public void create2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.createWithResponse#Metadata-PublicAccessType - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - - client.createWithResponse(metadata, PublicAccessType.CONTAINER).subscribe(response -> - System.out.printf("Create completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.ContainerAsyncClient.createWithResponse#Metadata-PublicAccessType - } - - /** - * Code snippet for {@link ContainerAsyncClient#delete()} - */ - public void setDelete() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.delete - client.delete().subscribe( - response -> System.out.printf("Delete completed%n"), - error -> System.out.printf("Delete failed: %s%n", error)); - // END: com.azure.storage.blob.ContainerAsyncClient.delete - } - - /** - * Code snippet for {@link ContainerAsyncClient#deleteWithResponse(ContainerAccessConditions)} - */ - public void delete2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse#ContainerAccessConditions - ContainerAccessConditions accessConditions = new ContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - client.deleteWithResponse(accessConditions).subscribe(response -> - System.out.printf("Delete completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse#ContainerAccessConditions - } - - /** - * Code snippet for {@link ContainerAsyncClient#getProperties()} - */ - public void getProperties() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getProperties - client.getProperties().subscribe(response -> - System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", - response.getBlobPublicAccess(), - response.hasLegalHold(), - response.hasImmutabilityPolicy())); - // END: com.azure.storage.blob.ContainerAsyncClient.getProperties - } - - /** - * Code snippet for {@link ContainerAsyncClient#getPropertiesWithResponse(LeaseAccessConditions)} - */ - public void getProperties2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.getPropertiesWithResponse(accessConditions).subscribe(response -> - System.out.printf("Public Access Type: %s, Legal Hold? %b, Immutable? %b%n", - response.getValue().getBlobPublicAccess(), - response.getValue().hasLegalHold(), - response.getValue().hasImmutabilityPolicy())); - // END: com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse#LeaseAccessConditions - } - - /** - * Code snippet for {@link ContainerAsyncClient#setMetadata(Metadata)} - */ - public void setMetadata() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.setMetadata#Metadata - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - - client.setMetadata(metadata).subscribe( - response -> System.out.printf("Set metadata completed%n"), - error -> System.out.printf("Set metadata failed: %s%n", error)); - // END: com.azure.storage.blob.ContainerAsyncClient.setMetadata#Metadata - } - - /** - * Code snippet for {@link ContainerAsyncClient#setMetadataWithResponse(Metadata, ContainerAccessConditions)} - */ - public void setMetadata2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse#Metadata-ContainerAccessConditions - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - ContainerAccessConditions accessConditions = new ContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - client.setMetadataWithResponse(metadata, accessConditions).subscribe(response -> - System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse#Metadata-ContainerAccessConditions - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAccessPolicy()} - */ - public void getAccessPolicy() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy - client.getAccessPolicy().subscribe(response -> { - System.out.printf("Blob Access Type: %s%n", response.getBlobAccessType()); - - for (SignedIdentifier identifier : response.getIdentifiers()) { - System.out.printf("Identifier Name: %s, Permissions %s%n", - identifier.getId(), - identifier.getAccessPolicy().getPermission()); - } - }); - // END: com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAccessPolicyWithResponse(LeaseAccessConditions)} - */ - public void getAccessPolicy2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions - LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); - - client.getAccessPolicyWithResponse(accessConditions).subscribe(response -> { - System.out.printf("Blob Access Type: %s%n", response.getValue().getBlobAccessType()); - - for (SignedIdentifier identifier : response.getValue().getIdentifiers()) { - System.out.printf("Identifier Name: %s, Permissions %s%n", - identifier.getId(), - identifier.getAccessPolicy().getPermission()); - } - }); - // END: com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse#LeaseAccessConditions - } - - /** - * Code snippet for {@link ContainerAsyncClient#setAccessPolicy(PublicAccessType, List)} - */ - public void setAccessPolicy() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy#PublicAccessType-List - SignedIdentifier identifier = new SignedIdentifier() - .setId("name") - .setAccessPolicy(new AccessPolicy() - .setStart(OffsetDateTime.now()) - .setExpiry(OffsetDateTime.now().plusDays(7)) - .setPermission("permissionString")); - - client.setAccessPolicy(PublicAccessType.CONTAINER, Collections.singletonList(identifier)).subscribe( - response -> System.out.printf("Set access policy completed%n"), - error -> System.out.printf("Set access policy failed: %s%n", error)); - // END: com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy#PublicAccessType-List - } - - /** - * Code snippet for {@link ContainerAsyncClient#setAccessPolicyWithResponse(PublicAccessType, List, ContainerAccessConditions)} - */ - public void setAccessPolicy2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions - SignedIdentifier identifier = new SignedIdentifier() - .setId("name") - .setAccessPolicy(new AccessPolicy() - .setStart(OffsetDateTime.now()) - .setExpiry(OffsetDateTime.now().plusDays(7)) - .setPermission("permissionString")); - - ContainerAccessConditions accessConditions = new ContainerAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - client.setAccessPolicyWithResponse(PublicAccessType.CONTAINER, Collections.singletonList(identifier), accessConditions) - .subscribe(response -> - System.out.printf("Set access policy completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-ContainerAccessConditions - } - - /** - * Code snippet for {@link ContainerAsyncClient#listBlobsFlat()} - */ - public void listBlobsFlat() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat - client.listBlobsFlat().subscribe(blob -> - System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isPrefix())); - // END: com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat - } - - /** - * Code snippet for {@link ContainerAsyncClient#listBlobsFlat(ListBlobsOptions)} - */ - public void listBlobsFlat2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat#ListBlobsOptions - ListBlobsOptions options = new ListBlobsOptions() - .setPrefix("prefixToMatch") - .setDetails(new BlobListDetails() - .setDeletedBlobs(true) - .setSnapshots(true)); - - client.listBlobsFlat(options).subscribe(blob -> - System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", - blob.getName(), - blob.isPrefix(), - blob.isDeleted(), - blob.getSnapshot())); - // END: com.azure.storage.blob.ContainerAsyncClient.listBlobsFlat#ListBlobsOptions - } - - /** - * Code snippet for {@link ContainerAsyncClient#listBlobsHierarchy(String)} - */ - public void listBlobsHierarchy() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String - client.listBlobsHierarchy("directoryName").subscribe(blob -> - System.out.printf("Name: %s, Directory? %b%n", blob.getName(), blob.isDeleted())); - // END: com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String - } - - /** - * Code snippet for {@link ContainerAsyncClient#listBlobsHierarchy(String, ListBlobsOptions)} - */ - public void listBlobsHierarchy2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions - ListBlobsOptions options = new ListBlobsOptions() - .setPrefix("directoryName") - .setDetails(new BlobListDetails() - .setDeletedBlobs(true) - .setSnapshots(true)); - - client.listBlobsHierarchy("/", options).subscribe(blob -> - System.out.printf("Name: %s, Directory? %b, Deleted? %b, Snapshot ID: %s%n", - blob.getName(), - blob.isPrefix(), - blob.isDeleted(), - blob.getSnapshot())); - // END: com.azure.storage.blob.ContainerAsyncClient.listBlobsHierarchy#String-ListBlobsOptions - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAccountInfo()} - */ - public void getAccountInfo() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAccountInfo - client.getAccountInfo().subscribe(response -> - System.out.printf("Account Kind: %s, SKU: %s%n", - response.getAccountKind(), - response.getSkuName())); - // END: com.azure.storage.blob.ContainerAsyncClient.getAccountInfo - } - - /** - * Code snippet for {@link ContainerAsyncClient#getAccountInfoWithResponse()} - */ - public void getAccountInfo2() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse - client.getAccountInfoWithResponse().subscribe(response -> - System.out.printf("Account Kind: %s, SKU: %s%n", - response.getValue().getAccountKind(), - response.getValue().getSkuName())); - // END: com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse - } - - /** - * Generates a code sample for using {@link ContainerAsyncClient#getContainerName()} - */ - public void getContainerName() { - // BEGIN: com.azure.storage.blob.ContainerAsyncClient.getContainerName - String containerName = client.getContainerName(); - System.out.println("The name of the blob is " + containerName); - // END: com.azure.storage.blob.ContainerAsyncClient.getContainerName - } -} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java index 6d462368bba7..eda08f390ddf 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java @@ -66,18 +66,18 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept * ContainerClient uses the same endpoint, credential and pipeline from storageClient. * Note that container names require lowercase. */ - ContainerClient containerClient = storageClient.getContainerClient("myjavacontainerparallelupload" + System.currentTimeMillis()); + BlobContainerClient blobContainerClient = storageClient.getBlobContainerClient("myjavacontainerparallelupload" + System.currentTimeMillis()); /* * Create a container in Storage blob account. */ - containerClient.create(); + blobContainerClient.create(); /* * Create a BlockBlobClient object that wraps a blob's endpoint and a default pipeline, the blockBlobClient give us access to upload the file. */ String filename = "BigFile.bin"; - BlockBlobClient blobClient = containerClient.getBlockBlobClient(filename); + BlobClient blobClient = blobContainerClient.getBlobClient(filename); /* * Create the empty uploadFile and downloadFile. @@ -115,7 +115,7 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept /* * Clean up the local files and storage container. */ - containerClient.delete(); + blobContainerClient.delete(); Files.deleteIfExists(largeFile.toPath()); Files.deleteIfExists(downloadFile.toPath()); } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java index 13bffad9de2a..bfa5bc678847 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java @@ -7,12 +7,12 @@ import java.net.URL; final class JavaDocCodeSnippetsHelpers { - static ContainerAsyncClient getContainerAsyncClient() { - return new ContainerClientBuilder().buildAsyncClient(); + static BlobContainerAsyncClient getContainerAsyncClient() { + return new BlobContainerClientBuilder().buildAsyncClient(); } - static ContainerClient getContainerClient() { - return new ContainerClientBuilder().buildClient(); + static BlobContainerClient getContainerClient() { + return new BlobContainerClientBuilder().buildClient(); } static BlobAsyncClient getBlobAsyncClient(String blobName) { @@ -23,20 +23,6 @@ static BlobClient getBlobClient(String blobName) { return new BlobClient(getBlobAsyncClient(blobName)); } - static PageBlobClient getPageBlobClient(String blobName, String containerName) { - return new BlobClientBuilder() - .blobName(blobName) - .containerName(containerName) - .buildPageBlobClient(); - } - - static PageBlobAsyncClient getPageBlobAsyncClient(String blobName, String containerName) { - return new BlobClientBuilder() - .blobName(blobName) - .containerName(containerName) - .buildPageBlobAsyncClient(); - } - static BlobServiceAsyncClient getBlobServiceAsyncClient() { return new BlobServiceClientBuilder().buildAsyncClient(); } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java index 551a4416705e..ef338167bd4a 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java @@ -40,19 +40,19 @@ public static void main(String[] args) { * Create 3 different containers from the storageClient. */ for (int i = 0; i < 3; i++) { - storageClient.createContainer("mycontainersforlisting" + i + System.currentTimeMillis()); + storageClient.createBlobContainer("mycontainersforlisting" + i + System.currentTimeMillis()); } /* * List the containers' name under the Azure storage account. */ - storageClient.listContainers().forEach(containerItem -> { + storageClient.listBlobContainers().forEach(containerItem -> { System.out.println("Container name: " + containerItem.getName()); /* * Clean up the containers at the same time. */ - storageClient.getContainerClient(containerItem.getName()).delete(); + storageClient.getBlobContainerClient(containerItem.getName()).delete(); }); } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java index 0599c91f3b45..4720320b7a36 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java @@ -5,7 +5,7 @@ import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobHTTPHeaders; -import com.azure.storage.blob.models.Metadata; +import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.credentials.SharedKeyCredential; import java.io.ByteArrayInputStream; @@ -14,17 +14,18 @@ import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.Locale; +import java.util.Map; /** - * This example shows how to set metadata for containers and blobs and how to set HTTPHeaders for blobs - * using the Azure Storage Blob SDK for Java. + * This example shows how to set metadata for containers and blobs and how to set HTTPHeaders for blobs using the Azure + * Storage Blob SDK for Java. */ public class SetMetadataAndHTTPHeadersExample { /** * Entry point into the setting metadata examples for Storage blobs. - * @param args Unused. Arguments to the program. * + * @param args Unused. Arguments to the program. * @throws IOException If an I/O error occurs */ public static void main(String[] args) throws IOException { @@ -50,27 +51,27 @@ public static void main(String[] args) throws IOException { /* * Create a container client from storageClient. */ - ContainerClient containerClient = storageClient.getContainerClient("mycontainer" + System.currentTimeMillis()); + BlobContainerClient blobContainerClient = storageClient.getBlobContainerClient("mycontainer" + System.currentTimeMillis()); /* * Setup containerMetadata for container. */ - Metadata containerMetadata = new Metadata(Collections.singletonMap("mycontainermetadata", "sample")); + Map containerMetadata = Collections.singletonMap("mycontainermetadata", "sample"); /* * Create a container with the containerMetadata above. */ - containerClient.createWithResponse(containerMetadata, null, null, new Context("key1", "value1")); + blobContainerClient.createWithResponse(containerMetadata, null, null, new Context("key1", "value1")); /* * Create a blob client. */ - BlockBlobClient blobClient = containerClient.getBlockBlobClient("myblob" + System.currentTimeMillis()); + BlockBlobClient blobClient = blobContainerClient.getBlobClient("myblob" + System.currentTimeMillis()).getBlockBlobClient(); /* * Create a blob with blob's blobMetadata and BlobHttpHeaders. */ - Metadata blobMetadata = new Metadata(Collections.singletonMap("myblobmetadata", "sample")); + Map blobMetadata = Collections.singletonMap("myblobmetadata", "sample"); BlobHTTPHeaders blobHTTPHeaders = new BlobHTTPHeaders().setBlobContentDisposition("attachment") .setBlobContentType("text/html; charset=utf-8"); @@ -85,6 +86,6 @@ public static void main(String[] args) throws IOException { * Clean up the container and blob. */ blobClient.delete(); - containerClient.delete(); + blobContainerClient.delete(); } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java index db6343683f37..5ccf638842fb 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java @@ -21,7 +21,7 @@ public class StorageErrorHandlingExample { * @param args Unused. Arguments to the program. */ public static void main(String[] args) { - ContainerClient containerClient = new ContainerClientBuilder().endpoint("https://account.blob.core.windows.net/mycontainer") + BlobContainerClient blobContainerClient = new BlobContainerClientBuilder().endpoint("https://account.blob.core.windows.net/mycontainer") .buildClient(); try { @@ -29,7 +29,7 @@ public static void main(String[] args) { /* * An error occurred while creating the container. */ - containerClient.create(); + blobContainerClient.create(); } catch (StorageException e) { /* @@ -59,7 +59,7 @@ public static void main(String[] args) { /* * Process the error. */ - System.out.println("The container url is " + containerClient.toString()); + System.out.println("The container url is " + blobContainerClient.toString()); } } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java similarity index 68% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobAsyncClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java index 839e07fada36..7e7ee85555a6 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendPositionAccessConditions; @@ -9,58 +9,57 @@ import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import reactor.core.publisher.Flux; -import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link AppendBlobAsyncClient} */ public class AppendBlobAsyncClientJavaDocCodeSnippets { - private AppendBlobAsyncClient client = JavaDocCodeSnippetsHelpers.getBlobAsyncClient("blobName") - .asAppendBlobAsyncClient(); + private AppendBlobAsyncClient client = new SpecializedBlobClientBuilder().buildAppendBlobAsyncClient(); private String leaseId = "leaseId"; - private Flux data = Flux.just(ByteBuffer.wrap("data".getBytes("UTF-8"))); + private Flux data = Flux.just(ByteBuffer.wrap("data".getBytes(StandardCharsets.UTF_8))); private long length = 4L; private static final Long POSITION = null; private Long maxSize = length; - private URL sourceUrl = JavaDocCodeSnippetsHelpers.generateURL("https://example.com"); + private URL sourceUrl = new URL("https://example.com"); private long offset = 1024; private long count = 1024; /** - * - * @throws UnsupportedEncodingException if cannot get bytes from sample sting as utf-8 encoding + * @throws MalformedURLException Ignore */ - AppendBlobAsyncClientJavaDocCodeSnippets() throws UnsupportedEncodingException { + public AppendBlobAsyncClientJavaDocCodeSnippets() throws MalformedURLException { } /** * Code snippet for {@link AppendBlobAsyncClient#create()} */ public void create() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.create + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.create client.create().subscribe(response -> System.out.printf("Created AppendBlob at %s%n", response.getLastModified())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.create + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.create } /** - * Code snippet for {@link AppendBlobAsyncClient#createWithResponse(BlobHTTPHeaders, Metadata, BlobAccessConditions)} + * Code snippet for {@link AppendBlobAsyncClient#createWithResponse(BlobHTTPHeaders, Map, BlobAccessConditions)} */ public void create2() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentType("binary") .setBlobContentLanguage("en-US"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -68,24 +67,24 @@ public void create2() { client.createWithResponse(headers, metadata, accessConditions).subscribe(response -> System.out.printf("Created AppendBlob at %s%n", response.getValue().getLastModified())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions } /** * Code snippet for {@link AppendBlobAsyncClient#appendBlock(Flux, long)} */ public void appendBlock() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.appendBlock#Flux-long + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlock#Flux-long client.appendBlock(data, length).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getBlobCommittedBlockCount())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.appendBlock#Flux-long + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlock#Flux-long } /** * Code snippet for {@link AppendBlobAsyncClient#appendBlockWithResponse(Flux, long, AppendBlobAccessConditions)} */ public void appendBlock2() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions AppendBlobAccessConditions accessConditions = new AppendBlobAccessConditions() .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(POSITION) @@ -93,24 +92,24 @@ public void appendBlock2() { client.appendBlockWithResponse(data, length, accessConditions).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getValue().getBlobCommittedBlockCount())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockWithResponse#Flux-long-AppendBlobAccessConditions } /** * Code snippet for {@link AppendBlobAsyncClient#appendBlockFromUrl(URL, BlobRange)} */ public void appendBlockFromUrl() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange client.appendBlockFromUrl(sourceUrl, new BlobRange(offset, count)).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getBlobCommittedBlockCount())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrl#URL-BlobRange } /** * Code snippet for {@link AppendBlobAsyncClient#appendBlockFromUrlWithResponse(URL, BlobRange, byte[], AppendBlobAccessConditions, SourceModifiedAccessConditions)} */ public void appendBlockFromUrl2() { - // BEGIN: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions AppendBlobAccessConditions appendBlobAccessConditions = new AppendBlobAccessConditions() .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(POSITION) @@ -122,6 +121,6 @@ public void appendBlockFromUrl2() { client.appendBlockFromUrlWithResponse(sourceUrl, new BlobRange(offset, count), null, appendBlobAccessConditions, modifiedAccessConditions).subscribe(response -> System.out.printf("AppendBlob has %d committed blocks%n", response.getValue().getBlobCommittedBlockCount())); - // END: com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java index 79983fddc7a0..d8904cb25a1e 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AppendBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java @@ -1,89 +1,69 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.util.Context; - import com.azure.storage.blob.models.AppendBlobAccessConditions; import com.azure.storage.blob.models.AppendPositionAccessConditions; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import java.io.ByteArrayInputStream; import java.io.InputStream; -import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link AppendBlobClient} */ public class AppendBlobClientJavaDocCodeSnippets { - private AppendBlobClient client = JavaDocCodeSnippetsHelpers.getBlobClient("blobName") - .asAppendBlobClient(); + private AppendBlobClient client = new SpecializedBlobClientBuilder().buildAppendBlobClient(); private Duration timeout = Duration.ofSeconds(30); private String leaseId = "leaseId"; - private InputStream data = new ByteArrayInputStream("data".getBytes("UTF-8")); + private InputStream data = new ByteArrayInputStream("data".getBytes(StandardCharsets.UTF_8)); private long length = 4L; private static final Long POSITION = null; private Long maxSize = length; - private URL sourceUrl = JavaDocCodeSnippetsHelpers.generateURL("https://example.com"); + private URL sourceUrl = new URL("https://example.com"); private long offset = 1024; private long count = 1024; /** - * @throws UnsupportedEncodingException if cannot get bytes from sample sting as utf-8 encoding + * @throws MalformedURLException Ignore */ - AppendBlobClientJavaDocCodeSnippets() throws UnsupportedEncodingException { + public AppendBlobClientJavaDocCodeSnippets() throws MalformedURLException { } /** * Code snippet for {@link AppendBlobClient#create()} */ - public void setCreate() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.create + public void create() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.create System.out.printf("Created AppendBlob at %s%n", client.create().getLastModified()); - // END: com.azure.storage.blob.AppendBlobClient.create - } - - /** - * Code snippet for {@link AppendBlobClient#create(BlobHTTPHeaders, Metadata, BlobAccessConditions, Duration)} - */ - public void create2() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.create#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration - BlobHTTPHeaders headers = new BlobHTTPHeaders() - .setBlobContentType("binary") - .setBlobContentLanguage("en-US"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - System.out.printf("Created AppendBlob at %s%n", - client.create(headers, metadata, accessConditions, timeout).getLastModified()); - // END: com.azure.storage.blob.AppendBlobClient.create#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.AppendBlobClient.create } /** - * Code snippet for {@link AppendBlobClient#createWithResponse(BlobHTTPHeaders, Metadata, BlobAccessConditions, + * Code snippet for {@link AppendBlobClient#createWithResponse(BlobHTTPHeaders, Map, BlobAccessConditions, * Duration, Context)} */ - public void create3() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context + public void createWithResponse() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentType("binary") .setBlobContentLanguage("en-US"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -92,17 +72,17 @@ public void create3() { System.out.printf("Created AppendBlob at %s%n", client.createWithResponse(headers, metadata, accessConditions, timeout, context).getValue().getLastModified()); - // END: com.azure.storage.blob.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.AppendBlobClient.createWithResponse#BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context } /** * Code snippet for {@link AppendBlobClient#appendBlock(InputStream, long)} */ public void appendBlock() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.appendBlock#InputStream-long + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlock#InputStream-long System.out.printf("AppendBlob has %d committed blocks%n", client.appendBlock(data, length).getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.AppendBlobClient.appendBlock#InputStream-long + // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlock#InputStream-long } /** @@ -110,7 +90,7 @@ public void appendBlock() { * Duration, Context)} */ public void appendBlock2() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context AppendBlobAccessConditions accessConditions = new AppendBlobAccessConditions() .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(POSITION) @@ -120,45 +100,25 @@ public void appendBlock2() { System.out.printf("AppendBlob has %d committed blocks%n", client.appendBlockWithResponse(data, length, accessConditions, timeout, context).getValue().getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockWithResponse#InputStream-long-AppendBlobAccessConditions-Duration-Context } /** * Code snippet for {@link AppendBlobClient#appendBlockFromUrl(URL, BlobRange)} */ public void appendBlockFromUrl() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrl#URL-BlobRange System.out.printf("AppendBlob has %d committed blocks%n", client.appendBlockFromUrl(sourceUrl, new BlobRange(offset, count)).getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange - } - - /** - * Code snippet for {@link AppendBlobClient#appendBlockFromUrl(URL, BlobRange, byte[], AppendBlobAccessConditions, - * SourceModifiedAccessConditions, Duration)} - */ - public void appendBlockFromUrl2() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration - AppendBlobAccessConditions appendBlobAccessConditions = new AppendBlobAccessConditions() - .setAppendPositionAccessConditions(new AppendPositionAccessConditions() - .setAppendPosition(POSITION) - .setMaxSize(maxSize)); - - SourceModifiedAccessConditions modifiedAccessConditions = new SourceModifiedAccessConditions() - .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); - - System.out.printf("AppendBlob has %d committed blocks%n", - client.appendBlockFromUrl(sourceUrl, new BlobRange(offset, count), null, - appendBlobAccessConditions, modifiedAccessConditions, timeout).getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration + // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrl#URL-BlobRange } /** * Code snippet for {@link AppendBlobClient#appendBlockFromUrlWithResponse(URL, BlobRange, byte[], * AppendBlobAccessConditions, SourceModifiedAccessConditions, Duration, Context)} */ - public void appendBlockFromUrl3() { - // BEGIN: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + public void appendBlockFromUrlWithResponse() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context AppendBlobAccessConditions appendBlobAccessConditions = new AppendBlobAccessConditions() .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(POSITION) @@ -173,6 +133,6 @@ public void appendBlockFromUrl3() { client.appendBlockFromUrlWithResponse(sourceUrl, new BlobRange(offset, count), null, appendBlobAccessConditions, modifiedAccessConditions, timeout, context).getValue().getBlobCommittedBlockCount()); - // END: com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#URL-BlobRange-byte-AppendBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java new file mode 100644 index 000000000000..d8c17072416a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +/** + * Code snippets for {@link BlobAsyncClientBase} + */ +@SuppressWarnings("unused") +public class BlobAsyncClientBaseJavaDocCodeSnippets { + private BlobAsyncClientBase client = new BlobAsyncClientBase(null, null, null); + private String leaseId = "leaseId"; + private String copyId = "copyId"; + private URL url = new URL("https://sample.com"); + private String file = "file"; + + /** + * @throws MalformedURLException Ignore + */ + public BlobAsyncClientBaseJavaDocCodeSnippets() throws MalformedURLException { + } + + /** + * Code snippet for {@link BlobAsyncClientBase#exists()} + */ + public void existsCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.exists + client.exists().subscribe(response -> System.out.printf("Exists? %b%n", response)); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.exists + } + + /** + * Code snippets for {@link BlobAsyncClientBase#startCopyFromURL(URL)} + */ + public void startCopyFromURLCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#URL + client.startCopyFromURL(url) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURL#URL + } + + /** + * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURL(String)} + */ + public void abortCopyFromURLCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String + client.abortCopyFromURL(copyId).doOnSuccess(response -> System.out.println("Aborted copy from URL")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURL#String + } + + /** + * Code snippets for {@link BlobAsyncClientBase#copyFromURL(URL)} + */ + public void copyFromURLCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#URL + client.copyFromURL(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURL#URL + } + + /** + * Code snippets for {@link BlobAsyncClientBase#download()} + * + * @throws UncheckedIOException If an I/O error occurs + */ + public void downloadCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.download + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + client.download().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.download + } + + /** + * Code snippet for {@link BlobAsyncClientBase#downloadWithResponse(BlobRange, ReliableDownloadOptions, + * BlobAccessConditions, boolean)} + * + * @throws UncheckedIOException If an I/O error occurs + */ + public void downloadWithResponseCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + BlobRange range = new BlobRange(1024, 2048L); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadWithResponse(range, options, null, false).subscribe(response -> { + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + response.getValue().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + }); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + } + + /** + * Code snippets for {@link BlobAsyncClientBase#downloadToFile(String)} and {@link BlobAsyncClientBase#downloadToFileWithResponse(String, + * BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, boolean)} + */ + public void downloadToFileCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFile#String + client.downloadToFile(file).subscribe(response -> System.out.println("Completed download to file")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFile#String + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean + + BlobRange range = new BlobRange(1024, 2048L); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadToFileWithResponse(file, range, null, options, null, false) + .subscribe(response -> System.out.println("Completed download to file")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean + } + + /** + * Code snippets for {@link BlobAsyncClientBase#delete()} + */ + public void deleteCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.delete + client.delete().doOnSuccess(response -> System.out.println("Completed delete")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.delete + } + + /** + * Code snippets for {@link BlobAsyncClientBase#getProperties()} + */ + public void getPropertiesCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getProperties + client.getProperties().subscribe(response -> + System.out.printf("Type: %s, Size: %d%n", response.getBlobType(), response.getBlobSize())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getProperties + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setHTTPHeaders(BlobHTTPHeaders)} + */ + public void setHTTPHeadersCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHTTPHeaders + client.setHTTPHeaders(new BlobHTTPHeaders() + .setBlobContentLanguage("en-US") + .setBlobContentType("binary")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeaders#BlobHTTPHeaders + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setMetadata(Map)} + */ + public void setMetadataCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadata#Map + client.setMetadata(Collections.singletonMap("metadata", "value")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadata#Map + } + + /** + * Code snippets for {@link BlobAsyncClientBase#createSnapshot()} + */ + public void createSnapshotCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshot + client.createSnapshot() + .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", + response.getSnapshotId())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshot + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setAccessTier(AccessTier)} + */ + public void setTierCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTier#AccessTier + client.setAccessTier(AccessTier.HOT); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTier#AccessTier + } + + /** + * Code snippet for {@link BlobAsyncClientBase#undelete()} + */ + public void undeleteCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.undelete + client.undelete().doOnSuccess(response -> System.out.println("Completed undelete")); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.undelete + } + + /** + * Code snippet for {@link BlobAsyncClientBase#getAccountInfo()} + */ + public void getAccountInfoCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfo + client.getAccountInfo().subscribe(response -> System.out.printf("Account Kind: %s, SKU: %s%n", + response.getAccountKind(), response.getSkuName())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfo + } + + /** + * Code snippet for {@link BlobAsyncClientBase#existsWithResponse()} + */ + public void existsWithResponseCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.existsWithResponse + client.existsWithResponse().subscribe(response -> System.out.printf("Exists? %b%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.existsWithResponse + } + + /** + * Code snippets for {@link BlobAsyncClientBase#startCopyFromURLWithResponse(URL, Map, AccessTier, + * RehydratePriority, ModifiedAccessConditions, BlobAccessConditions)} + */ + public void startCopyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions + Map metadata = Collections.singletonMap("metadata", "value"); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, + modifiedAccessConditions, blobAccessConditions) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#abortCopyFromURLWithResponse(String, LeaseAccessConditions)} + */ + public void abortCopyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions + LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions) + .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#copyFromURLWithResponse(URL, Map, AccessTier, + * ModifiedAccessConditions, BlobAccessConditions)} + */ + public void copyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions + Map metadata = Collections.singletonMap("metadata", "value"); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, blobAccessConditions) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response)); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#downloadWithResponse(BlobRange, ReliableDownloadOptions, + * BlobAccessConditions, boolean)} + * + * @throws UncheckedIOException If an I/O error occurs + */ + public void downloadWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadWithResponse#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + BlobRange range = new BlobRange(1024, (long) 2048); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadWithResponse(range, options, null, false).subscribe(response -> { + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + response.getValue().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + }); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.downloadWithResponse#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + } + + /** + * Code snippets for {@link BlobAsyncClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions)} + */ + public void deleteWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions + client.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, null) + .subscribe(response -> System.out.printf("Delete completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#getPropertiesWithResponse(BlobAccessConditions)} + */ + public void getPropertiesWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + client.getPropertiesWithResponse(accessConditions).subscribe( + response -> System.out.printf("Type: %s, Size: %d%n", response.getValue().getBlobType(), + response.getValue().getBlobSize())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getPropertiesWithResponse#BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setHTTPHeadersWithResponse(BlobHTTPHeaders, BlobAccessConditions)} + */ + public void setHTTPHeadersWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + client.setHTTPHeadersWithResponse(new BlobHTTPHeaders() + .setBlobContentLanguage("en-US") + .setBlobContentType("binary"), accessConditions).subscribe( + response -> + System.out.printf("Set HTTP headers completed with status %d%n", + response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setMetadataWithResponse(Map, BlobAccessConditions)} + */ + public void setMetadataWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions) + .subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setMetadataWithResponse#Map-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#createSnapshotWithResponse(Map, BlobAccessConditions)} + */ + public void createSnapshotWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions + Map snapshotMetadata = Collections.singletonMap("metadata", "value"); + BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( + new LeaseAccessConditions().setLeaseId(leaseId)); + + client.createSnapshotWithResponse(snapshotMetadata, accessConditions) + .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.createSnapshotWithResponse#Map-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions)} + */ + public void setTierWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions + LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions) + .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", + response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions + } + + /** + * Code snippet for {@link BlobAsyncClientBase#undeleteWithResponse()} + */ + public void undeleteWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.undeleteWithResponse + client.undeleteWithResponse() + .subscribe(response -> System.out.printf("Undelete completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.undeleteWithResponse + } + + /** + * Code snippet for {@link BlobAsyncClientBase#getAccountInfoWithResponse()} + */ + public void getAccountInfoWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfoWithResponse + client.getAccountInfoWithResponse().subscribe(response -> System.out.printf("Account Kind: %s, SKU: %s%n", + response.getValue().getAccountKind(), response.getValue().getSkuName())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfoWithResponse + } + + /** + * Code snippet for {@link BlobAsyncClientBase#generateUserDelegationSAS(UserDelegationKey, String, BlobSasPermission, + * OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} + */ + public void generateUserDelegationSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() + .setAddPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + String accountName = "accountName"; + UserDelegationKey userDelegationKey = new UserDelegationKey(); + + String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, + startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, + contentLanguage, contentType); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } + + /** + * Code snippet for {@link BlobAsyncClientBase#generateSAS(String, BlobSasPermission, OffsetDateTime, OffsetDateTime, + * String, SASProtocol, IpRange, String, String, String, String, String)} + */ + public void generateSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String identifier = "identifier"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + + // Note either "identifier", or "expiryTime and permissions" are required to be set + String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, + cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } +} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java new file mode 100644 index 000000000000..87fd7533d2a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobProperties; +import com.azure.storage.blob.BlobSasPermission; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.Constants; +import com.azure.storage.common.IpRange; +import com.azure.storage.common.SASProtocol; + +import java.io.ByteArrayOutputStream; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +/** + * Code snippets for {@link BlobClientBase} + */ +@SuppressWarnings("unused") +public class BlobClientBaseJavaDocCodeSnippets { + private BlobClientBase client = new BlobClientBase(null); + private String leaseId = "leaseId"; + private String copyId = "copyId"; + private URL url = new URL("https://sample.com"); + private String file = "file"; + private Duration timeout = Duration.ofSeconds(30); + private String key1 = "key1"; + private String key2 = "key2"; + private String value1 = "val1"; + private String value2 = "val2"; + + /** + * @throws MalformedURLException Ignore + */ + public BlobClientBaseJavaDocCodeSnippets() throws MalformedURLException { + } + + /** + * Code snippets for {@link BlobClientBase#exists()} + */ + public void existsCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.exists + System.out.printf("Exists? %b%n", client.exists()); + // END: com.azure.storage.blob.specialized.BlobClientBase.exists + } + + /** + * Code snippets for {@link BlobClientBase#startCopyFromURL(URL)} + */ + public void startCopyFromURL() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#URL + System.out.printf("Copy identifier: %s%n", client.startCopyFromURL(url)); + // END: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURL#URL + } + + /** + * Code snippets for {@link BlobClientBase#abortCopyFromURL(String)} + */ + public void abortCopyFromURL() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String + client.abortCopyFromURL(copyId); + System.out.println("Aborted copy completed."); + // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURL#String + } + + /** + * Code snippets for {@link BlobClientBase#copyFromURL(URL)} + */ + public void copyFromURL() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#URL + System.out.printf("Copy identifier: %s%n", client.copyFromURL(url)); + // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURL#URL + } + + /** + * Code snippets for {@link BlobClientBase#download(OutputStream)} + */ + public void download() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.download#OutputStream + client.download(new ByteArrayOutputStream()); + System.out.println("Download completed."); + // END: com.azure.storage.blob.specialized.BlobClientBase.download#OutputStream + } + + /** + * Code snippets for {@link BlobClientBase#downloadToFile(String)} and + * {@link BlobClientBase#downloadToFileWithResponse(String, BlobRange, ParallelTransferOptions, ReliableDownloadOptions, BlobAccessConditions, + * boolean, Duration, Context)} + */ + public void downloadToFile() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.downloadToFile#String + client.downloadToFile(file); + System.out.println("Completed download to file"); + // END: com.azure.storage.blob.specialized.BlobClientBase.downloadToFile#String + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + BlobRange range = new BlobRange(1024, 2048L); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadToFileWithResponse(file, range, new ParallelTransferOptions().setBlockSize(4 * Constants.MB), + options, null, false, timeout, new Context(key2, value2)); + System.out.println("Completed download to file"); + // END: com.azure.storage.blob.specialized.BlobClientBase.downloadToFileWithResponse#String-BlobRange-ParallelTransferOptions-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#delete()} + */ + public void setDelete() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.delete + client.delete(); + System.out.println("Delete completed."); + // END: com.azure.storage.blob.specialized.BlobClientBase.delete + } + + /** + * Code snippets for {@link BlobClientBase#getProperties()} + */ + public void getProperties() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getProperties + BlobProperties properties = client.getProperties(); + System.out.printf("Type: %s, Size: %d%n", properties.getBlobType(), properties.getBlobSize()); + // END: com.azure.storage.blob.specialized.BlobClientBase.getProperties + } + + /** + * Code snippets for {@link BlobClientBase#setHTTPHeaders(BlobHTTPHeaders)} + */ + public void setHTTPHeaders() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHTTPHeaders + client.setHTTPHeaders(new BlobHTTPHeaders() + .setBlobContentLanguage("en-US") + .setBlobContentType("binary")); + System.out.println("Set HTTP headers completed"); + // END: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeaders#BlobHTTPHeaders + } + + /** + * Code snippets for {@link BlobClientBase#setMetadata(Map)} + */ + public void setMetadata() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setMetadata#Map + client.setMetadata(Collections.singletonMap("metadata", "value")); + System.out.println("Set metadata completed"); + // END: com.azure.storage.blob.specialized.BlobClientBase.setMetadata#Map + } + + /** + * Code snippets for {@link BlobClientBase#createSnapshot()} + */ + public void createSnapshot() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.createSnapshot + System.out.printf("Identifier for the snapshot is %s%n", client.createSnapshot().getSnapshotId()); + // END: com.azure.storage.blob.specialized.BlobClientBase.createSnapshot + } + + /** + * Code snippets for {@link BlobClientBase#setAccessTier(AccessTier)} and + * {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + */ + public void setTier() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTier#AccessTier + System.out.printf("Set tier completed with status code %d%n", + client.setAccessTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTier#AccessTier + + + } + + /** + * Code snippets for {@link BlobClientBase#undelete()} + */ + public void unsetDelete() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.undelete + client.undelete(); + System.out.println("Undelete completed"); + // END: com.azure.storage.blob.specialized.BlobClientBase.undelete + } + + /** + * Code snippet for {@link BlobClientBase#getAccountInfo()} + */ + public void getAccountInfo() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getAccountInfo + StorageAccountInfo accountInfo = client.getAccountInfo(); + System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.getAccountKind(), accountInfo.getSkuName()); + // END: com.azure.storage.blob.specialized.BlobClientBase.getAccountInfo + } + + /** + * Code snippet for {@link BlobClientBase#existsWithResponse(Duration, Context)} + */ + public void existsWithResponseCodeSnippet() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.existsWithResponse#Duration-Context + System.out.printf("Exists? %b%n", client.existsWithResponse(timeout, new Context(key2, value2)).getValue()); + // END: com.azure.storage.blob.specialized.BlobClientBase.existsWithResponse#Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#startCopyFromURLWithResponse(URL, Map, AccessTier, RehydratePriority, + * ModifiedAccessConditions, BlobAccessConditions, Duration, Context)} + */ + public void startCopyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + Map metadata = Collections.singletonMap("metadata", "value"); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( + new LeaseAccessConditions().setLeaseId(leaseId)); + + System.out.printf("Copy identifier: %s%n", + client.startCopyFromURLWithResponse(url, metadata, AccessTier.HOT, RehydratePriority.STANDARD, + modifiedAccessConditions, blobAccessConditions, timeout, + new Context(key2, value2))); + // END: com.azure.storage.blob.specialized.BlobClientBase.startCopyFromURLWithResponse#URL-Map-AccessTier-RehydratePriority-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#abortCopyFromURLWithResponse(String, LeaseAccessConditions, Duration, Context)} + */ + public void abortCopyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context + LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + System.out.printf("Aborted copy completed with status %d%n", + client.abortCopyFromURLWithResponse(copyId, leaseAccessConditions, timeout, + new Context(key2, value2)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.abortCopyFromURLWithResponse#String-LeaseAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#copyFromURLWithResponse(URL, Map, AccessTier, ModifiedAccessConditions, + * BlobAccessConditions, Duration, Context)} + */ + public void copyFromURLWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + Map metadata = Collections.singletonMap("metadata", "value"); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( + new LeaseAccessConditions().setLeaseId(leaseId)); + + System.out.printf("Copy identifier: %s%n", + client.copyFromURLWithResponse(url, metadata, AccessTier.HOT, modifiedAccessConditions, + blobAccessConditions, timeout, + new Context(key1, value1)).getValue()); + // END: com.azure.storage.blob.specialized.BlobClientBase.copyFromURLWithResponse#URL-Map-AccessTier-ModifiedAccessConditions-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#downloadWithResponse(OutputStream, BlobRange, ReliableDownloadOptions, + * BlobAccessConditions, boolean, Duration, Context)} + * @throws UncheckedIOException If an I/O error occurs + */ + public void downloadWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.downloadWithResponse#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + BlobRange range = new BlobRange(1024, 2048L); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + System.out.printf("Download completed with status %d%n", + client.downloadWithResponse(new ByteArrayOutputStream(), range, options, null, false, + timeout, new Context(key2, value2)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.downloadWithResponse#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration-Context + + } + + /** + * Code snippets for {@link BlobClientBase#deleteWithResponse(DeleteSnapshotsOptionType, BlobAccessConditions, Duration, + * Context)} + */ + public void deleteWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context + System.out.printf("Delete completed with status %d%n", + client.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, null, timeout, + new Context(key1, value1)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.deleteWithResponse#DeleteSnapshotsOptionType-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#getPropertiesWithResponse(BlobAccessConditions, Duration, Context)} + */ + public void getPropertiesWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + BlobProperties properties = client.getPropertiesWithResponse(accessConditions, timeout, + new Context(key2, value2)).getValue(); + System.out.printf("Type: %s, Size: %d%n", properties.getBlobType(), properties.getBlobSize()); + // END: com.azure.storage.blob.specialized.BlobClientBase.getPropertiesWithResponse#BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#setHTTPHeadersWithResponse(BlobHTTPHeaders, BlobAccessConditions, Duration, + * Context)} + */ + public void setHTTPHeadersWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions-Duration-Context + BlobAccessConditions accessConditions = new BlobAccessConditions() + .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)); + + System.out.printf("Set HTTP headers completed with status %d%n", + client.setHTTPHeadersWithResponse(new BlobHTTPHeaders() + .setBlobContentLanguage("en-US") + .setBlobContentType("binary"), accessConditions, timeout, new Context(key1, value1)) + .getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.setHTTPHeadersWithResponse#BlobHTTPHeaders-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#setMetadataWithResponse(Map, BlobAccessConditions, Duration, Context)} + */ + public void setMetadataWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context + BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( + new LeaseAccessConditions().setLeaseId(leaseId)); + + System.out.printf("Set metadata completed with status %d%n", + client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), accessConditions, timeout, + new Context(key1, value1)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.setMetadataWithResponse#Map-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#createSnapshotWithResponse(Map, BlobAccessConditions, Duration, + * Context)} + */ + public void createSnapshotWithResponseCodeSnippets() { + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context + Map snapshotMetadata = Collections.singletonMap("metadata", "value"); + BlobAccessConditions accessConditions = new BlobAccessConditions().setLeaseAccessConditions( + new LeaseAccessConditions().setLeaseId(leaseId)); + + System.out.printf("Identifier for the snapshot is %s%n", + client.createSnapshotWithResponse(snapshotMetadata, accessConditions, timeout, + new Context(key1, value1)).getValue()); + // END: com.azure.storage.blob.specialized.BlobClientBase.createSnapshotWithResponse#Map-BlobAccessConditions-Duration-Context + } + + /** + * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(AccessTier, RehydratePriority, LeaseAccessConditions, Duration, Context)} + */ + public void setTierWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context + LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); + + System.out.printf("Set tier completed with status code %d%n", + client.setAccessTierWithResponse(AccessTier.HOT, RehydratePriority.STANDARD, accessConditions, timeout, + new Context(key2, value2)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-LeaseAccessConditions-Duration-Context + } + + /** + * Code snippet for {@link BlobClientBase#undeleteWithResponse(Duration, Context)} + */ + public void undeleteWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.undeleteWithResponse#Duration-Context + System.out.printf("Undelete completed with status %d%n", client.undeleteWithResponse(timeout, + new Context(key1, value1)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.undeleteWithResponse#Duration-Context + } + + /** + * Code snippet for {@link BlobClientBase#getAccountInfoWithResponse(Duration, Context)} + */ + public void getAccountInfoWithResponseCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getAccountInfoWithResponse#Duration-Context + StorageAccountInfo accountInfo = client.getAccountInfoWithResponse(timeout, new Context(key1, value1)).getValue(); + System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.getAccountKind(), accountInfo.getSkuName()); + // END: com.azure.storage.blob.specialized.BlobClientBase.getAccountInfoWithResponse#Duration-Context + } + + /** + * Code snippet for {@link BlobClientBase#generateUserDelegationSAS(UserDelegationKey, String, BlobSasPermission, + * OffsetDateTime, OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} + */ + public void generateUserDelegationSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + UserDelegationKey userDelegationKey = new UserDelegationKey(); + String accountName = "accountName"; + + String sas = client.generateUserDelegationSAS(userDelegationKey, accountName, permissions, expiryTime, + startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, + contentLanguage, contentType); + // END: com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSAS#UserDelegationKey-String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } + + /** + * Code snippet for {@link BlobClientBase#generateSAS(String, BlobSasPermission, OffsetDateTime, OffsetDateTime, String, + * SASProtocol, IpRange, String, String, String, String, String)} + */ + public void generateSASCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + BlobSasPermission permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true); + OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + IpRange ipRange = new IpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255"); + SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; + String cacheControl = "cache"; + String contentDisposition = "disposition"; + String contentEncoding = "encoding"; + String contentLanguage = "language"; + String contentType = "type"; + String identifier = "identifier"; + String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + + // Note either "identifier", or "expiryTime and permissions" are required to be set + String sas = client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, + cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); + // END: com.azure.storage.blob.specialized.BlobClientBase.generateSAS#String-BlobSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String + } +} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobAsyncClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index 992a0f598a6d..99a74e83b6d9 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAccessConditions; @@ -10,11 +10,11 @@ import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import reactor.core.publisher.Flux; +import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -22,54 +22,51 @@ import java.util.Base64; import java.util.Collections; import java.util.List; +import java.util.Map; /** * Code snippet for {@link BlockBlobAsyncClient} */ @SuppressWarnings({"unused"}) public class BlockBlobAsyncClientJavaDocCodeSnippets { - private BlockBlobAsyncClient client = JavaDocCodeSnippetsHelpers.getBlobAsyncClient("blobName") - .asBlockBlobAsyncClient(); - + private BlockBlobAsyncClient client = new SpecializedBlobClientBuilder().buildBlockBlobAsyncClient(); private Flux data = Flux.just(ByteBuffer.wrap("data".getBytes(StandardCharsets.UTF_8))); private long length = 4L; private String leaseId = "leaseId"; - private String filePath = "filePath"; private String base64BlockID = "base64BlockID"; - private URL sourceURL = JavaDocCodeSnippetsHelpers.generateURL("https://example.com"); + private URL sourceURL = new URL("https://example.com"); private long offset = 1024L; private long count = length; - private int blockSize = 50; - private int numBuffers = 2; + /** - * + * @throws MalformedURLException Ignore */ - public BlockBlobAsyncClientJavaDocCodeSnippets() { + public BlockBlobAsyncClientJavaDocCodeSnippets() throws MalformedURLException { } /** * Code snippet for {@link BlockBlobAsyncClient#upload(Flux, long)} */ public void upload() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-long + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long client.upload(data, length).subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", Base64.getEncoder().encodeToString(response.getContentMD5()))); - // END: com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-long + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.upload#Flux-long } /** - * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, long, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, long, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions)} */ public void upload2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -78,116 +75,49 @@ public void upload2() { client.uploadWithResponse(data, length, headers, metadata, AccessTier.HOT, accessConditions) .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); - // END: com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions - } - - /** - * Code snippet for {@link BlockBlobAsyncClient#upload(Flux, int, int)} - */ - public void upload3() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-int-int - client.upload(data, blockSize, numBuffers).subscribe(response -> - System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getContentMD5()))); - // END: com.azure.storage.blob.BlockBlobAsyncClient.upload#Flux-int-int - } - - /** - * Code snippet for {@link BlockBlobAsyncClient#uploadWithResponse(Flux, int, int, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions)} - */ - public void upload4() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-int-int-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions - BlobHTTPHeaders headers = new BlobHTTPHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); - - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - client.uploadWithResponse(data, blockSize, numBuffers, headers, metadata, AccessTier.HOT, accessConditions) - .subscribe(response -> System.out.printf("Uploaded BlockBlob MD5 is %s%n", - Base64.getEncoder().encodeToString(response.getValue().getContentMD5()))); - // END: com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse#Flux-int-int-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions - } - - /** - * Code snippet for {@link BlockBlobAsyncClient#uploadFromFile(String)} - */ - public void uploadFromFile() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String - client.uploadFromFile(filePath) - .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) - .subscribe(completion -> System.out.println("Upload from file succeeded")); - // END: com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String - } - - /** - * Code snippet for {@link BlockBlobAsyncClient#uploadFromFile(String, Integer, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions)} - */ - public void uploadFromFile2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions - BlobHTTPHeaders headers = new BlobHTTPHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); - - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - - client.uploadFromFile(filePath, BlockBlobAsyncClient.BLOB_MAX_UPLOAD_BLOCK_SIZE, - headers, metadata, AccessTier.HOT, accessConditions) - .doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())) - .subscribe(completion -> System.out.println("Upload from file succeeded")); - // END: com.azure.storage.blob.BlockBlobAsyncClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.uploadWithResponse#Flux-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions } /** * Code snippet for {@link BlockBlobAsyncClient#stageBlock(String, Flux, long)} */ public void stageBlock() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.stageBlock#String-Flux-long + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlock#String-Flux-long client.stageBlock(base64BlockID, data, length) .subscribe( response -> System.out.println("Staging block completed"), error -> System.out.printf("Error when calling stage Block: %s", error)); - // END: com.azure.storage.blob.BlockBlobAsyncClient.stageBlock#String-Flux-long + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlock#String-Flux-long } /** * Code snippet for {@link BlockBlobAsyncClient#stageBlockWithResponse(String, Flux, long, LeaseAccessConditions)} */ public void stageBlock2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); client.stageBlockWithResponse(base64BlockID, data, length, accessConditions).subscribe(response -> System.out.printf("Staging block completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockWithResponse#String-Flux-long-LeaseAccessConditions } /** * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURL(String, URL, BlobRange)} */ public void stageBlockFromURL() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange client.stageBlockFromURL(base64BlockID, sourceURL, new BlobRange(offset, count)) .subscribe( response -> System.out.println("Staging block completed"), error -> System.out.printf("Error when calling stage Block: %s", error)); - // END: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURL#String-URL-BlobRange } /** * Code snippet for {@link BlockBlobAsyncClient#stageBlockFromURLWithResponse(String, URL, BlobRange, byte[], LeaseAccessConditions, SourceModifiedAccessConditions)} */ public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); SourceModifiedAccessConditions sourceModifiedAccessConditions = new SourceModifiedAccessConditions() .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); @@ -195,14 +125,14 @@ public void stageBlockFromURL2() { client.stageBlockFromURLWithResponse(base64BlockID, sourceURL, new BlobRange(offset, count), null, leaseAccessConditions, sourceModifiedAccessConditions).subscribe(response -> System.out.printf("Staging block from URL completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions } /** * Code snippet for {@link BlockBlobAsyncClient#listBlocks(BlockListType)} */ public void listBlocks() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.listBlocks#BlockListType + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocks#BlockListType client.listBlocks(BlockListType.ALL).subscribe(block -> { System.out.println("Committed Blocks:"); block.getCommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); @@ -210,14 +140,14 @@ public void listBlocks() { System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); }); - // END: com.azure.storage.blob.BlockBlobAsyncClient.listBlocks#BlockListType + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocks#BlockListType } /** * Code snippet for {@link BlockBlobAsyncClient#listBlocksWithResponse(BlockListType, LeaseAccessConditions)} */ public void listBlocks2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); client.listBlocksWithResponse(BlockListType.ALL, accessConditions).subscribe(response -> { @@ -228,30 +158,30 @@ public void listBlocks2() { System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); }); - // END: com.azure.storage.blob.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions } /** * Code snippet for {@link BlockBlobAsyncClient#commitBlockList(List)} */ public void commitBlockList() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList#List + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockList#List client.commitBlockList(Collections.singletonList(base64BlockID)).subscribe(response -> System.out.printf("Committing block list completed. Last modified: %s%n", response.getLastModified())); - // END: com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList#List + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockList#List } /** - * Code snippet for {@link BlockBlobAsyncClient#commitBlockListWithResponse(List, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions)} + * Code snippet for {@link BlockBlobAsyncClient#commitBlockListWithResponse(List, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions)} */ public void commitBlockList2() { - // BEGIN: com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -259,6 +189,6 @@ public void commitBlockList2() { client.commitBlockListWithResponse(Collections.singletonList(base64BlockID), headers, metadata, AccessTier.HOT, accessConditions).subscribe(response -> System.out.printf("Committing block list completed with status %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java similarity index 56% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index 2072fd906b0b..839d4e99c743 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; @@ -11,14 +11,13 @@ import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.SourceModifiedAccessConditions; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; -import java.io.UncheckedIOException; +import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.time.Duration; @@ -26,29 +25,27 @@ import java.util.Base64; import java.util.Collections; import java.util.List; +import java.util.Map; /** * Code snippet for {@link BlockBlobClient} */ @SuppressWarnings({"unused"}) public class BlockBlobClientJavaDocCodeSnippets { - private BlockBlobClient client = JavaDocCodeSnippetsHelpers.getBlobClient("blobName") - .asBlockBlobClient(); - + private BlockBlobClient client = new SpecializedBlobClientBuilder().buildBlockBlobClient(); private InputStream data = new ByteArrayInputStream("data".getBytes(StandardCharsets.UTF_8)); private long length = 4L; private Duration timeout = Duration.ofSeconds(30); private String leaseId = "leaseId"; - private String filePath = "filePath"; private String base64BlockID = "base64BlockID"; - private URL sourceURL = JavaDocCodeSnippetsHelpers.generateURL("https://example.com"); + private URL sourceURL = new URL("https://example.com"); private long offset = 1024L; private long count = length; /** - * + * @throws MalformedURLException Ignore */ - public BlockBlobClientJavaDocCodeSnippets() { + public BlockBlobClientJavaDocCodeSnippets() throws MalformedURLException { } /** @@ -57,25 +54,23 @@ public BlockBlobClientJavaDocCodeSnippets() { * @throws IOException If an I/O error occurs */ public void upload() throws IOException { - // BEGIN: com.azure.storage.blob.BlockBlobClient.upload#InputStream-long + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long System.out.printf("Uploaded BlockBlob MD5 is %s%n", Base64.getEncoder().encodeToString(client.upload(data, length).getContentMD5())); - // END: com.azure.storage.blob.BlockBlobClient.upload#InputStream-long + // END: com.azure.storage.blob.specialized.BlockBlobClient.upload#InputStream-long } /** - * Code snippet for {@link BlockBlobClient#uploadWithResponse(InputStream, long, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions, Duration, Context)} - * - * @throws IOException If an I/O error occurs + * Code snippet for {@link BlockBlobClient#uploadWithResponse(InputStream, long, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions, Duration, Context)} */ - public void upload2() throws IOException { - // BEGIN: com.azure.storage.blob.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context + public void upload2() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -87,89 +82,44 @@ public void upload2() throws IOException { accessConditions, timeout, context) .getValue() .getContentMD5())); - // END: com.azure.storage.blob.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context - } - - /** - * Code snippet for {@link BlockBlobClient#uploadFromFile(String)} - * - * @throws IOException If an I/O error occurs - */ - public void uploadFromFile() throws IOException { - // BEGIN: com.azure.storage.blob.BlockBlobClient.uploadFromFile#String - try { - client.uploadFromFile(filePath); - System.out.println("Upload from file succeeded"); - } catch (UncheckedIOException ex) { - System.err.printf("Failed to upload from file %s%n", ex.getMessage()); - } - // END: com.azure.storage.blob.BlockBlobClient.uploadFromFile#String - } - - /** - * Code snippet for {@link BlockBlobClient#uploadFromFile(String, Integer, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions, Duration)} - * - * @throws IOException If an I/O error occurs - */ - public void uploadFromFile2() throws IOException { - // BEGIN: com.azure.storage.blob.BlockBlobClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration - BlobHTTPHeaders headers = new BlobHTTPHeaders() - .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) - .setBlobContentLanguage("en-US") - .setBlobContentType("binary"); - - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - BlobAccessConditions accessConditions = new BlobAccessConditions() - .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) - .setModifiedAccessConditions(new ModifiedAccessConditions() - .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3))); - Integer blockSize = 100 * 1024 * 1024; // 100 MB; - - try { - client.uploadFromFile(filePath, blockSize, headers, metadata, - AccessTier.HOT, accessConditions, timeout); - System.out.println("Upload from file succeeded"); - } catch (UncheckedIOException ex) { - System.err.printf("Failed to upload from file %s%n", ex.getMessage()); - } - // END: com.azure.storage.blob.BlockBlobClient.uploadFromFile#String-Integer-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration + // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadWithResponse#InputStream-long-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context } /** * Code snippet for {@link BlockBlobClient#stageBlock(String, InputStream, long)} */ public void stageBlock() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.stageBlock#String-InputStream-long + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long client.stageBlock(base64BlockID, data, length); - // END: com.azure.storage.blob.BlockBlobClient.stageBlock#String-InputStream-long + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlock#String-InputStream-long } /** * Code snippet for {@link BlockBlobClient#stageBlockWithResponse(String, InputStream, long, LeaseAccessConditions, Duration, Context)} */ public void stageBlock2() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); Context context = new Context("key", "value"); System.out.printf("Staging block completed with status %d%n", client.stageBlockWithResponse(base64BlockID, data, length, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockWithResponse#String-InputStream-long-LeaseAccessConditions-Duration-Context } /** * Code snippet for {@link BlockBlobClient#stageBlockFromURL(String, URL, BlobRange)} */ public void stageBlockFromURL() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange client.stageBlockFromURL(base64BlockID, sourceURL, new BlobRange(offset, count)); - // END: com.azure.storage.blob.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURL#String-URL-BlobRange } /** * Code snippet for {@link BlockBlobClient#stageBlockFromURLWithResponse(String, URL, BlobRange, byte[], LeaseAccessConditions, SourceModifiedAccessConditions, Duration, Context)} */ public void stageBlockFromURL2() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().setLeaseId(leaseId); SourceModifiedAccessConditions sourceModifiedAccessConditions = new SourceModifiedAccessConditions() .setSourceIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); @@ -178,14 +128,14 @@ public void stageBlockFromURL2() { System.out.printf("Staging block from URL completed with status %d%n", client.stageBlockFromURLWithResponse(base64BlockID, sourceURL, new BlobRange(offset, count), null, leaseAccessConditions, sourceModifiedAccessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.stageBlockFromURLWithResponse#String-URL-BlobRange-byte-LeaseAccessConditions-SourceModifiedAccessConditions-Duration-Context } /** * Code snippet for {@link BlockBlobClient#listBlocks(BlockListType)} */ public void listBlocks() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.listBlocks#BlockListType + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.listBlocks#BlockListType BlockList block = client.listBlocks(BlockListType.ALL); System.out.println("Committed Blocks:"); @@ -193,14 +143,14 @@ public void listBlocks() { System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); - // END: com.azure.storage.blob.BlockBlobClient.listBlocks#BlockListType + // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocks#BlockListType } /** * Code snippet for {@link BlockBlobClient#listBlocksWithResponse(BlockListType, LeaseAccessConditions, Duration, Context)} */ public void listBlocks2() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context LeaseAccessConditions accessConditions = new LeaseAccessConditions().setLeaseId(leaseId); Context context = new Context("key", "value"); BlockList block = client.listBlocksWithResponse(BlockListType.ALL, accessConditions, timeout, context).getValue(); @@ -210,30 +160,30 @@ public void listBlocks2() { System.out.println("Uncommitted Blocks:"); block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSize())); - // END: com.azure.storage.blob.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-LeaseAccessConditions-Duration-Context } /** * Code snippet for {@link BlockBlobClient#commitBlockList(List)} */ public void commitBlockList() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.commitBlockList#List + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List System.out.printf("Committing block list completed. Last modified: %s%n", client.commitBlockList(Collections.singletonList(base64BlockID)).getLastModified()); - // END: com.azure.storage.blob.BlockBlobClient.commitBlockList#List + // END: com.azure.storage.blob.specialized.BlockBlobClient.commitBlockList#List } /** - * Code snippet for {@link BlockBlobClient#commitBlockListWithResponse(List, BlobHTTPHeaders, Metadata, AccessTier, BlobAccessConditions, Duration, Context)} + * Code snippet for {@link BlockBlobClient#commitBlockListWithResponse(List, BlobHTTPHeaders, Map, AccessTier, BlobAccessConditions, Duration, Context)} */ public void commitBlockList2() { - // BEGIN: com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentMD5("data".getBytes(StandardCharsets.UTF_8)) .setBlobContentLanguage("en-US") .setBlobContentType("binary"); - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + Map metadata = Collections.singletonMap("metadata", "value"); BlobAccessConditions accessConditions = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseId)) .setModifiedAccessConditions(new ModifiedAccessConditions() @@ -243,6 +193,6 @@ public void commitBlockList2() { System.out.printf("Committing block list completed with status %d%n", client.commitBlockListWithResponse(Collections.singletonList(base64BlockID), headers, metadata, AccessTier.HOT, accessConditions, timeout, context).getStatusCode()); - // END: com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse#List-BlobHTTPHeaders-Metadata-AccessTier-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.BlockBlobClient.uploadFromFile#List-BlobHTTPHeaders-Map-AccessTier-BlobAccessConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java index 1a5467f8a3d6..d455c2cf72ff 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java @@ -11,7 +11,7 @@ public class LeaseAsyncClientJavaDocCodeSnippets { private LeaseAsyncClient client = new LeaseClientBuilder() - .blobAsyncClient(new BlobClientBuilder().blobName("blob").buildBlobAsyncClient()) + .blobAsyncClient(new BlobClientBuilder().blobName("blob").buildAsyncClient()) .buildAsyncClient(); /** diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java index 897ce9ae3331..709243279497 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientBuilderJavaDocCodeSnippets.java @@ -5,21 +5,21 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobClient; -import com.azure.storage.blob.ContainerAsyncClient; -import com.azure.storage.blob.ContainerClient; -import com.azure.storage.blob.ContainerClientBuilder; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobContainerClientBuilder; public class LeaseClientBuilderJavaDocCodeSnippets { - private ContainerAsyncClient containerAsyncClient = new ContainerClientBuilder() + private BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder() .containerName("container") .buildAsyncClient(); - private ContainerClient containerClient = new ContainerClientBuilder() + private BlobContainerClient blobContainerClient = new BlobContainerClientBuilder() .containerName("container") .buildClient(); - private BlobAsyncClient blobAsyncClient = containerAsyncClient.getBlobAsyncClient("blob"); - private BlobClient blobClient = containerClient.getBlobClient("blob"); + private BlobAsyncClient blobAsyncClient = blobContainerAsyncClient.getBlobAsyncClient("blob"); + private BlobClient blobClient = blobContainerClient.getBlobClient("blob"); private String leaseId = "leaseId"; @@ -52,7 +52,7 @@ public void syncInstantiationWithBlobAndLeaseId() { public void syncInstantiationWithContainer() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainer LeaseClient leaseClient = new LeaseClientBuilder() - .containerClient(containerClient) + .containerClient(blobContainerClient) .buildClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainer } @@ -63,7 +63,7 @@ public void syncInstantiationWithContainer() { public void syncInstantiationWithContainerAndLeaseId() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainerAndLeaseId LeaseClient leaseClient = new LeaseClientBuilder() - .containerClient(containerClient) + .containerClient(blobContainerClient) .leaseId(leaseId) .buildClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.syncInstantiationWithContainerAndLeaseId @@ -98,7 +98,7 @@ public void asyncInstantiationWithBlobAndLeaseId() { public void asyncInstantiationWithContainer() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainer LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() - .containerAsyncClient(containerAsyncClient) + .containerAsyncClient(blobContainerAsyncClient) .buildAsyncClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainer } @@ -109,7 +109,7 @@ public void asyncInstantiationWithContainer() { public void asyncInstantiationWithContainerAndLeaseId() { // BEGIN: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId LeaseAsyncClient leaseAsyncClient = new LeaseClientBuilder() - .containerAsyncClient(containerAsyncClient) + .containerAsyncClient(blobContainerAsyncClient) .leaseId(leaseId) .buildAsyncClient(); // END: com.azure.storage.blob.specialized.LeaseClientBuilder.asyncInstantiationWithContainerAndLeaseId diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java index 1c72b85ee4bb..ec4fbbd6a414 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java @@ -12,7 +12,7 @@ public class LeaseClientJavaDocCodeSnippets { private LeaseClient client = new LeaseClientBuilder() - .blobClient(new BlobClientBuilder().blobName("blob").buildBlobClient()) + .blobClient(new BlobClientBuilder().blobName("blob").buildClient()) .buildClient(); private Duration timeout = Duration.ofSeconds(30); private String key = "key"; diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java similarity index 73% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobAsyncClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index d845222e9af5..4b0749dc8370 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -1,14 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.storage.blob.models.BlobAccessConditions; import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageRange; @@ -18,19 +17,21 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link PageBlobAsyncClient} */ @SuppressWarnings("unused") public class PageBlobAsyncClientJavaDocCodeSnippets { - private PageBlobAsyncClient client = JavaDocCodeSnippetsHelpers.getPageBlobAsyncClient("blobName", "containerName"); - private Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + private PageBlobAsyncClient client = new SpecializedBlobClientBuilder().buildPageBlobAsyncClient(); + private Map metadata = Collections.singletonMap("metadata", "value"); private ByteBuffer[] bufferData = new ByteBuffer[]{ ByteBuffer.wrap(new byte[]{1}), ByteBuffer.wrap(new byte[]{2}) @@ -39,27 +40,32 @@ public class PageBlobAsyncClientJavaDocCodeSnippets { private long size = 1024; private String leaseId = "leaseId"; private long sequenceNumber = 0; - private URL url = JavaDocCodeSnippetsHelpers.generateURL("https://sample.com"); + private URL url = new URL("https://sample.com"); private long sourceOffset = 0; private String data = "data"; private long offset = 0; /** - * Code snippets for {@link PageBlobAsyncClient#setCreate(long)} + * @throws MalformedURLException ignored + */ + public PageBlobAsyncClientJavaDocCodeSnippets() throws MalformedURLException { + } + + /** + * Code snippets for {@link PageBlobAsyncClient#create(long)} */ public void setCreateCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.setCreate#long - client.setCreate(size).subscribe(response -> System.out.printf( + // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.create#long + client.create(size).subscribe(response -> System.out.printf( "Created page blob with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.setCreate#long + // END: com.azure.storage.blob.PageBlobAsyncClient.create#long } /** - * Code snippets for {@link PageBlobAsyncClient#createWithResponse(long, Long, BlobHTTPHeaders, Metadata, - * BlobAccessConditions)} + * Code snippets for {@link PageBlobAsyncClient#createWithResponse(long, Long, BlobHTTPHeaders, Map, BlobAccessConditions)} */ public void createWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"); @@ -71,28 +77,28 @@ public void createWithResponseCodeSnippet() { .subscribe(response -> System.out.printf( "Created page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#uploadPages(PageRange, Flux)} */ public void uploadPagesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.uploadPages#PageRange-Flux + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPages#PageRange-Flux PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); client.uploadPages(pageRange, body).subscribe(response -> System.out.printf( "Uploaded page blob with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.uploadPages#PageRange-Flux + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPages#PageRange-Flux } /** * Code snippets for {@link PageBlobAsyncClient#uploadPagesWithResponse(PageRange, Flux, PageBlobAccessConditions)} */ public void uploadPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -102,14 +108,14 @@ public void uploadPagesWithResponseCodeSnippet() { client.uploadPagesWithResponse(pageRange, body, pageBlobAccessConditions) .subscribe(response -> System.out.printf( "Uploaded page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesWithResponse#PageRange-Flux-PageBlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#uploadPagesFromURL(PageRange, URL, Long)} */ public void uploadPagesFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -117,7 +123,7 @@ public void uploadPagesFromURLCodeSnippet() { client.uploadPagesFromURL(pageRange, url, sourceOffset) .subscribe(response -> System.out.printf( "Uploaded page blob from URL with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURL#PageRange-URL-Long } /** @@ -125,7 +131,7 @@ public void uploadPagesFromURLCodeSnippet() { * PageBlobAccessConditions, SourceModifiedAccessConditions)} */ public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -140,28 +146,28 @@ public void uploadPagesFromURLWithResponseCodeSnippet() { sourceAccessConditions) .subscribe(response -> System.out.printf( "Uploaded page blob from URL with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#clearPages(PageRange)} */ public void clearPagesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.clearPages#PageRange + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPages#PageRange PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); client.clearPages(pageRange).subscribe(response -> System.out.printf( "Cleared page blob with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.clearPages#PageRange + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPages#PageRange } /** * Code snippets for {@link PageBlobAsyncClient#clearPagesWithResponse(PageRange, PageBlobAccessConditions)} */ public void clearPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -171,14 +177,14 @@ public void clearPagesWithResponseCodeSnippet() { client.clearPagesWithResponse(pageRange, pageBlobAccessConditions) .subscribe(response -> System.out.printf( "Cleared page blob with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#getPageRanges(BlobRange)} */ public void getPageRangesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.getPageRanges#BlobRange + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRanges#BlobRange BlobRange blobRange = new BlobRange(offset); client.getPageRanges(blobRange).subscribe(response -> { @@ -187,14 +193,14 @@ public void getPageRangesCodeSnippet() { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.getPageRanges#BlobRange + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRanges#BlobRange } /** * Code snippets for {@link PageBlobAsyncClient#getPageRangesWithResponse(BlobRange, BlobAccessConditions)} */ public void getPageRangesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions BlobRange blobRange = new BlobRange(offset); BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); @@ -206,14 +212,14 @@ public void getPageRangesWithResponseCodeSnippet() { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#getPageRangesDiff(BlobRange, String)} */ public void getPageRangesDiffCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; @@ -223,7 +229,7 @@ public void getPageRangesDiffCodeSnippet() { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiff#BlobRange-String } /** @@ -231,7 +237,7 @@ public void getPageRangesDiffCodeSnippet() { * BlobAccessConditions)} */ public void getPageRangesDiffWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( @@ -244,42 +250,42 @@ public void getPageRangesDiffWithResponseCodeSnippet() { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#resize(long)} */ public void resizeCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.resize#long + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.resize#long client.resize(size).subscribe(response -> System.out.printf( "Page blob resized with sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.resize#long + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.resize#long } /** * Code snippets for {@link PageBlobAsyncClient#resizeWithResponse(long, BlobAccessConditions)} */ public void resizeWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); client.resizeWithResponse(size, blobAccessConditions) .subscribe(response -> System.out.printf( "Page blob resized with sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.resizeWithResponse#long-BlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#updateSequenceNumber(SequenceNumberActionType, Long)} */ public void updateSequenceNumberCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long client.updateSequenceNumber(SequenceNumberActionType.INCREMENT, size) .subscribe(response -> System.out.printf( "Page blob updated to sequence number %s%n", response.getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumber#SequenceNumberActionType-Long } /** @@ -287,21 +293,21 @@ public void updateSequenceNumberCodeSnippet() { * BlobAccessConditions)} */ public void updateSequenceNumberWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); client.updateSequenceNumberWithResponse(SequenceNumberActionType.INCREMENT, size, blobAccessConditions) .subscribe(response -> System.out.printf( "Page blob updated to sequence number %s%n", response.getValue().getBlobSequenceNumber())); - // END: com.azure.storage.blob.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions } /** * Code snippets for {@link PageBlobAsyncClient#copyIncremental(URL, String)} */ public void copyIncrementalCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.copyIncremental#URL-String + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncremental#URL-String final String snapshot = "copy snapshot"; client.copyIncremental(url, snapshot).subscribe(response -> { if (CopyStatusType.SUCCESS == response) { @@ -314,14 +320,14 @@ public void copyIncrementalCodeSnippet() { System.out.println("Page blob copied pending"); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.copyIncremental#URL-String + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncremental#URL-String } /** * Code snippets for {@link PageBlobAsyncClient#copyIncrementalWithResponse(URL, String, ModifiedAccessConditions)} */ public void copyIncrementalWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions final String snapshot = "copy snapshot"; ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfNoneMatch("snapshotMatch"); @@ -340,7 +346,7 @@ public void copyIncrementalWithResponseCodeSnippet() { System.out.println("Page blob copied pending"); } }); - // END: com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java similarity index 72% rename from sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobClientJavaDocCodeSnippets.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index a586acac368a..0394b34bc2e7 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobAccessConditions; @@ -9,7 +9,6 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseAccessConditions; -import com.azure.storage.blob.models.Metadata; import com.azure.storage.blob.models.ModifiedAccessConditions; import com.azure.storage.blob.models.PageBlobAccessConditions; import com.azure.storage.blob.models.PageBlobItem; @@ -20,19 +19,21 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; +import java.util.Map; /** * Code snippets for {@link PageBlobClient} */ @SuppressWarnings("unused") public class PageBlobClientJavaDocCodeSnippets { - private PageBlobClient client = JavaDocCodeSnippetsHelpers.getPageBlobClient("blobName", "containerName"); - private Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + private PageBlobClient client = new SpecializedBlobClientBuilder().buildPageBlobClient(); + private Map metadata = Collections.singletonMap("metadata", "value"); private String leaseId = "leaseId"; private Duration timeout = Duration.ofSeconds(30); private long size = 1024; @@ -42,24 +43,29 @@ public class PageBlobClientJavaDocCodeSnippets { private String key = "key"; private String value = "value"; private String data = "data"; - private URL url = JavaDocCodeSnippetsHelpers.generateURL("https://sample.com"); + private URL url = new URL("https://sample.com"); /** - * Code snippets for {@link PageBlobClient#setCreate(long)} + * @throws MalformedURLException ignored */ - public void setCreateCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.setCreate#long - PageBlobItem pageBlob = client.setCreate(size); + public PageBlobClientJavaDocCodeSnippets() throws MalformedURLException { + } + + /** + * Code snippets for {@link PageBlobClient#create(long)} + */ + public void createCodeSnippet() { + // BEGIN: com.azure.storage.blob.PageBlobClient.create#long + PageBlobItem pageBlob = client.create(size); System.out.printf("Created page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.setCreate#long + // END: com.azure.storage.blob.PageBlobClient.create#long } /** - * Code snippets for {@link PageBlobClient#createWithResponse(long, Long, BlobHTTPHeaders, Metadata, - * BlobAccessConditions, Duration, Context)} + * Code snippets for {@link PageBlobClient#createWithResponse(long, Long, BlobHTTPHeaders, Map, BlobAccessConditions, Duration, Context)} */ public void createWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context BlobHTTPHeaders headers = new BlobHTTPHeaders() .setBlobContentLanguage("en-US") .setBlobContentType("binary"); @@ -72,14 +78,14 @@ public void createWithResponseCodeSnippet() { .getValue(); System.out.printf("Created page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Metadata-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.createWithResponse#long-Long-BlobHTTPHeaders-Map-BlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#uploadPages(PageRange, InputStream)} */ public void uploadPagesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.uploadPages#PageRange-InputStream + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPages#PageRange-InputStream PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -87,7 +93,7 @@ public void uploadPagesCodeSnippet() { PageBlobItem pageBlob = client.uploadPages(pageRange, dataStream); System.out.printf("Uploaded page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.uploadPages#PageRange-InputStream + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPages#PageRange-InputStream } /** @@ -95,7 +101,7 @@ public void uploadPagesCodeSnippet() { * Duration, Context)} */ public void uploadPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -108,14 +114,14 @@ public void uploadPagesWithResponseCodeSnippet() { .uploadPagesWithResponse(pageRange, dataStream, pageBlobAccessConditions, timeout, context).getValue(); System.out.printf("Uploaded page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesWithResponse#PageRange-InputStream-PageBlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#uploadPagesFromURL(PageRange, URL, Long)} */ public void uploadPagesFromURLCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -123,7 +129,7 @@ public void uploadPagesFromURLCodeSnippet() { PageBlobItem pageBlob = client.uploadPagesFromURL(pageRange, url, sourceOffset); System.out.printf("Uploaded page blob from URL with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURL#PageRange-URL-Long } /** @@ -131,7 +137,7 @@ public void uploadPagesFromURLCodeSnippet() { * PageBlobAccessConditions, SourceModifiedAccessConditions, Duration, Context)} */ public void uploadPagesFromURLWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -148,14 +154,14 @@ public void uploadPagesFromURLWithResponseCodeSnippet() { sourceAccessConditions, timeout, context).getValue(); System.out.printf("Uploaded page blob from URL with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.uploadPagesFromURLWithResponse#PageRange-URL-Long-byte-PageBlobAccessConditions-SourceModifiedAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#clearPages(PageRange)} */ public void clearPagesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.clearPages#PageRange + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.clearPages#PageRange PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -163,7 +169,7 @@ public void clearPagesCodeSnippet() { PageBlobItem pageBlob = client.clearPages(pageRange); System.out.printf("Cleared page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.clearPages#PageRange + // END: com.azure.storage.blob.specialized.PageBlobClient.clearPages#PageRange } /** @@ -171,7 +177,7 @@ public void clearPagesCodeSnippet() { * Context)} */ public void clearPagesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context PageRange pageRange = new PageRange() .setStart(0) .setEnd(511); @@ -183,14 +189,14 @@ public void clearPagesWithResponseCodeSnippet() { .clearPagesWithResponse(pageRange, pageBlobAccessConditions, timeout, context).getValue(); System.out.printf("Cleared page blob with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.clearPagesWithResponse#PageRange-PageBlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#getPageRanges(BlobRange)} */ public void getPageRangesCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.getPageRanges#BlobRange + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRanges#BlobRange BlobRange blobRange = new BlobRange(offset); PageList pageList = client.getPageRanges(blobRange); @@ -198,7 +204,7 @@ public void getPageRangesCodeSnippet() { for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.PageBlobClient.getPageRanges#BlobRange + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRanges#BlobRange } /** @@ -206,7 +212,7 @@ public void getPageRangesCodeSnippet() { * Context)} */ public void getPageRangesWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context BlobRange blobRange = new BlobRange(offset); BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); @@ -219,14 +225,14 @@ public void getPageRangesWithResponseCodeSnippet() { for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#getPageRangesDiff(BlobRange, String)} */ public void getPageRangesDiffCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.getPageRangesDiff#BlobRange-String + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiff#BlobRange-String BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; PageList pageList = client.getPageRangesDiff(blobRange, prevSnapshot); @@ -235,7 +241,7 @@ public void getPageRangesDiffCodeSnippet() { for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.PageBlobClient.getPageRangesDiff#BlobRange-String + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiff#BlobRange-String } /** @@ -243,7 +249,7 @@ public void getPageRangesDiffCodeSnippet() { * Duration, Context)} */ public void getPageRangesDiffWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context BlobRange blobRange = new BlobRange(offset); final String prevSnapshot = "previous snapshot"; BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( @@ -257,24 +263,24 @@ public void getPageRangesDiffWithResponseCodeSnippet() { for (PageRange pageRange : pageList.getPageRange()) { System.out.printf("Start: %s, End: %s%n", pageRange.getStart(), pageRange.getEnd()); } - // END: com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#resize(long)} */ public void resizeCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.resize#long + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.resize#long PageBlobItem pageBlob = client.resize(size); System.out.printf("Page blob resized with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.resize#long + // END: com.azure.storage.blob.specialized.PageBlobClient.resize#long } /** * Code snippets for {@link PageBlobClient#resizeWithResponse(long, BlobAccessConditions, Duration, Context)} */ public void resizeWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); Context context = new Context(key, value); @@ -282,18 +288,18 @@ public void resizeWithResponseCodeSnippet() { PageBlobItem pageBlob = client .resizeWithResponse(size, blobAccessConditions, timeout, context).getValue(); System.out.printf("Page blob resized with sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.resizeWithResponse#long-BlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#updateSequenceNumber(SequenceNumberActionType, Long)} */ public void updateSequenceNumberCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long PageBlobItem pageBlob = client.updateSequenceNumber(SequenceNumberActionType.INCREMENT, size); System.out.printf("Page blob updated to sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long + // END: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumber#SequenceNumberActionType-Long } /** @@ -301,7 +307,7 @@ public void updateSequenceNumberCodeSnippet() { * BlobAccessConditions, Duration, Context)} */ public void updateSequenceNumberWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context BlobAccessConditions blobAccessConditions = new BlobAccessConditions().setLeaseAccessConditions( new LeaseAccessConditions().setLeaseId(leaseId)); Context context = new Context(key, value); @@ -310,14 +316,14 @@ public void updateSequenceNumberWithResponseCodeSnippet() { SequenceNumberActionType.INCREMENT, size, blobAccessConditions, timeout, context).getValue(); System.out.printf("Page blob updated to sequence number %s%n", pageBlob.getBlobSequenceNumber()); - // END: com.azure.storage.blob.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.updateSequenceNumberWithResponse#SequenceNumberActionType-Long-BlobAccessConditions-Duration-Context } /** * Code snippets for {@link PageBlobClient#copyIncremental(URL, String)} */ public void copyIncrementalCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.copyIncremental#URL-String + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.copyIncremental#URL-String final String snapshot = "copy snapshot"; CopyStatusType statusType = client.copyIncremental(url, snapshot); @@ -330,7 +336,7 @@ public void copyIncrementalCodeSnippet() { } else if (CopyStatusType.PENDING == statusType) { System.out.println("Page blob copied pending"); } - // END: com.azure.storage.blob.PageBlobClient.copyIncremental#URL-String + // END: com.azure.storage.blob.specialized.PageBlobClient.copyIncremental#URL-String } /** @@ -338,7 +344,7 @@ public void copyIncrementalCodeSnippet() { * Duration, Context)} */ public void copyIncrementalWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context final String snapshot = "copy snapshot"; ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() .setIfNoneMatch("snapshotMatch"); @@ -356,7 +362,7 @@ public void copyIncrementalWithResponseCodeSnippet() { } else if (CopyStatusType.PENDING == statusType) { System.out.println("Page blob copied pending"); } - // END: com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context + // END: com.azure.storage.blob.specialized.PageBlobClient.copyIncrementalWithResponse#URL-String-ModifiedAccessConditions-Duration-Context } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 9546d6963f22..42c2771d99e5 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -22,12 +22,14 @@ import com.azure.core.test.utils.TestResourceNamer import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger import com.azure.identity.credential.EnvironmentCredentialBuilder -import com.azure.storage.blob.models.ContainerItem +import com.azure.storage.blob.models.BlobContainerItem import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.LeaseStateType -import com.azure.storage.blob.models.ListContainersOptions +import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.models.RetentionPolicy import com.azure.storage.blob.models.StorageServiceProperties +import com.azure.storage.blob.specialized.BlobAsyncClientBase +import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.LeaseClient import com.azure.storage.blob.specialized.LeaseClientBuilder import com.azure.storage.common.BaseClientBuilder @@ -55,10 +57,10 @@ class APISpec extends Specification { // both sync and async clients point to same container @Shared - ContainerClient cc + BlobContainerClient cc @Shared - ContainerAsyncClient ccAsync + BlobContainerAsyncClient ccAsync // Fields used for conveniently creating blobs with data. static final String defaultText = "default" @@ -112,7 +114,7 @@ class APISpec extends Specification { static def BLOB_STORAGE = "BLOB_STORAGE_" static def PREMIUM_STORAGE = "PREMIUM_STORAGE_" - static SharedKeyCredential primaryCredential + protected static SharedKeyCredential primaryCredential static SharedKeyCredential alternateCredential static SharedKeyCredential blobCredential static SharedKeyCredential premiumCredential @@ -157,15 +159,15 @@ class APISpec extends Specification { premiumBlobServiceClient = setClient(premiumCredential) containerName = generateContainerName() - cc = primaryBlobServiceClient.getContainerClient(containerName) - ccAsync = primaryBlobServiceAsyncClient.getContainerAsyncClient(containerName) + cc = primaryBlobServiceClient.getBlobContainerClient(containerName) + ccAsync = primaryBlobServiceAsyncClient.getBlobContainerAsyncClient(containerName) cc.create() } def cleanup() { - def options = new ListContainersOptions().setPrefix(containerPrefix + testName) - for (ContainerItem container : primaryBlobServiceClient.listContainers(options, Duration.ofSeconds(120))) { - ContainerClient containerClient = primaryBlobServiceClient.getContainerClient(container.getName()) + def options = new ListBlobContainersOptions().setPrefix(containerPrefix + testName) + for (BlobContainerItem container : primaryBlobServiceClient.listBlobContainers(options, Duration.ofSeconds(120))) { + BlobContainerClient containerClient = primaryBlobServiceClient.getBlobContainerClient(container.getName()) if (container.getProperties().getLeaseState() == LeaseStateType.LEASED) { createLeaseClient(containerClient).breakLeaseWithResponse(0, null, null, null) @@ -300,8 +302,8 @@ class APISpec extends Specification { return builder } - ContainerClient getContainerClient(SASTokenCredential credential, String endpoint) { - ContainerClientBuilder builder = new ContainerClientBuilder() + BlobContainerClient getContainerClient(SASTokenCredential credential, String endpoint) { + BlobContainerClientBuilder builder = new BlobContainerClientBuilder() .endpoint(endpoint) .httpClient(getHttpClient()) .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) @@ -324,7 +326,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - builder.credential(credential).buildBlobAsyncClient() + builder.credential(credential).buildAsyncClient() } BlobClient getBlobClient(SASTokenCredential credential, String endpoint, String blobName) { @@ -343,7 +345,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - return builder.credential(credential).buildBlobClient() + return builder.credential(credential).buildClient() } BlobClient getBlobClient(SharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { @@ -360,7 +362,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - return builder.credential(credential).buildBlobClient() + return builder.credential(credential).buildClient() } BlobClient getBlobClient(SharedKeyCredential credential, String endpoint, String blobName) { @@ -374,7 +376,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - return builder.credential(credential).buildBlobClient() + return builder.credential(credential).buildClient() } BlobClient getBlobClient(String endpoint, SASTokenCredential credential) { @@ -391,7 +393,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - return builder.buildBlobClient() + return builder.buildClient() } HttpClient getHttpClient() { @@ -409,22 +411,22 @@ class APISpec extends Specification { } } - static LeaseClient createLeaseClient(BlobClient blobClient) { + static LeaseClient createLeaseClient(BlobClientBase blobClient) { return createLeaseClient(blobClient, null) } - static LeaseClient createLeaseClient(BlobClient blobClient, String leaseId) { + static LeaseClient createLeaseClient(BlobClientBase blobClient, String leaseId) { return new LeaseClientBuilder() .blobClient(blobClient) .leaseId(leaseId) .buildClient() } - static LeaseClient createLeaseClient(ContainerClient containerClient) { + static LeaseClient createLeaseClient(BlobContainerClient containerClient) { return createLeaseClient(containerClient, null) } - static LeaseClient createLeaseClient(ContainerClient containerClient, String leaseId) { + static LeaseClient createLeaseClient(BlobContainerClient containerClient, String leaseId) { return new LeaseClientBuilder() .containerClient(containerClient) .leaseId(leaseId) @@ -483,7 +485,7 @@ class APISpec extends Specification { * @return * The appropriate etag value to run the current test. */ - def setupBlobMatchCondition(BlobClient bc, String match) { + def setupBlobMatchCondition(BlobClientBase bc, String match) { if (match == receivedEtag) { return bc.getProperties().getETag() } else { @@ -491,7 +493,7 @@ class APISpec extends Specification { } } - def setupBlobMatchCondition(BlobAsyncClient bac, String match) { + def setupBlobMatchCondition(BlobAsyncClientBase bac, String match) { if (match == receivedEtag) { return bac.getProperties().block().getETag() } else { @@ -513,7 +515,7 @@ class APISpec extends Specification { * The actual leaseAccessConditions of the blob if recievedLeaseID is passed, otherwise whatever was passed will be * returned. */ - def setupBlobLeaseCondition(BlobClient bc, String leaseID) { + def setupBlobLeaseCondition(BlobClientBase bc, String leaseID) { String responseLeaseId = null if (leaseID == receivedLeaseID || leaseID == garbageLeaseID) { responseLeaseId = createLeaseClient(bc).acquireLease(-1) @@ -525,7 +527,7 @@ class APISpec extends Specification { } } - def setupBlobLeaseCondition(BlobAsyncClient bac, String leaseID) { + def setupBlobLeaseCondition(BlobAsyncClientBase bac, String leaseID) { String responseLeaseId = null if (leaseID == receivedLeaseID || leaseID == garbageLeaseID) { responseLeaseId = new LeaseClientBuilder() @@ -541,7 +543,7 @@ class APISpec extends Specification { } } - def setupContainerMatchCondition(ContainerClient cu, String match) { + def setupContainerMatchCondition(BlobContainerClient cu, String match) { if (match == receivedEtag) { return cu.getProperties().getETag() } else { @@ -549,7 +551,7 @@ class APISpec extends Specification { } } - def setupContainerLeaseCondition(ContainerClient cu, String leaseID) { + def setupContainerLeaseCondition(BlobContainerClient cu, String leaseID) { if (leaseID == receivedLeaseID) { return createLeaseClient(cu).acquireLease(-1) } else { @@ -611,7 +613,7 @@ class APISpec extends Specification { } } - def waitForCopy(ContainerClient bu, String status) { + def waitForCopy(BlobContainerClient bu, String status) { OffsetDateTime start = OffsetDateTime.now() while (status != CopyStatusType.SUCCESS.toString()) { status = bu.getPropertiesWithResponse(null, null, null).getHeaders().getValue("x-ms-copy-status") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index 79bd4b7eb85c..c2643cd3f484 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -3,9 +3,6 @@ package com.azure.storage.blob -import com.azure.core.http.HttpHeaders -import com.azure.core.http.rest.Response - import com.azure.core.implementation.util.ImplUtils import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.ArchiveStatus @@ -18,15 +15,16 @@ import com.azure.storage.blob.models.DeleteSnapshotsOptionType import com.azure.storage.blob.models.LeaseAccessConditions import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.LeaseStatusType -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.RehydratePriority import com.azure.storage.blob.models.ReliableDownloadOptions -import com.azure.storage.blob.models.StorageAccountInfo import com.azure.storage.blob.models.StorageErrorCode import com.azure.storage.blob.models.StorageException import com.azure.storage.blob.models.SyncCopyStatusType +import com.azure.storage.blob.specialized.BlobClientBase +import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder import spock.lang.Unroll import java.nio.ByteBuffer @@ -35,12 +33,12 @@ import java.security.MessageDigest import java.time.OffsetDateTime class BlobAPITest extends APISpec { - BlobClient bc + BlobClientBase bc String blobName def setup() { blobName = generateBlobName() - bc = cc.getBlockBlobClient(blobName) + bc = cc.getBlobClient(blobName).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) } @@ -81,7 +79,7 @@ class BlobAPITest extends APISpec { def "Download empty file"() { setup: - bc = cc.getAppendBlobClient("emptyAppendBlob") + bc = cc.getBlobClient("emptyAppendBlob").getAppendBlobClient() bc.create() when: @@ -108,11 +106,11 @@ class BlobAPITest extends APISpec { constructed in BlobClient.download(). */ setup: - BlobClient bu2 = getBlobClient(primaryCredential, bc.getBlobUrl().toString(), new MockRetryRangeResponsePolicy()) + def bu2 = getBlobClient(primaryCredential, bc.getBlobUrl(), new MockRetryRangeResponsePolicy()) when: - BlobRange range = new BlobRange(2, 5L) - ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(3) + def range = new BlobRange(2, 5L) + def options = new ReliableDownloadOptions().maxRetryRequests(3) bu2.downloadWithResponse(new ByteArrayOutputStream(), range, options, null, false, null, null) then: @@ -128,7 +126,7 @@ class BlobAPITest extends APISpec { when: def outStream = new ByteArrayOutputStream() bc.download(outStream) - byte[] result = outStream.toByteArray() + def result = outStream.toByteArray() then: result == defaultData.array() @@ -137,7 +135,7 @@ class BlobAPITest extends APISpec { @Unroll def "Download range"() { setup: - BlobRange range = (count == null) ? new BlobRange(offset) : new BlobRange(offset, count) + def range = (count == null) ? new BlobRange(offset) : new BlobRange(offset, count) when: def outStream = new ByteArrayOutputStream() @@ -159,7 +157,7 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) @@ -186,7 +184,7 @@ class BlobAPITest extends APISpec { def "Download AC fail"() { setup: setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -211,8 +209,8 @@ class BlobAPITest extends APISpec { def "Download md5"() { when: - Response response = bc.downloadWithResponse(new ByteArrayOutputStream(), new BlobRange(0, 3), null, null, true, null, null) - byte[] contentMD5 = response.getHeaders().getValue("content-md5").getBytes() + def response = bc.downloadWithResponse(new ByteArrayOutputStream(), new BlobRange(0, 3), null, null, true, null, null) + def contentMD5 = response.getHeaders().getValue("content-md5").getBytes() then: contentMD5 == Base64.getEncoder().encode(MessageDigest.getInstance("MD5").digest(defaultText.substring(0, 3).getBytes())) @@ -220,25 +218,28 @@ class BlobAPITest extends APISpec { def "Download error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.download(null) then: - thrown(IllegalArgumentException) + thrown(NullPointerException) } def "Download snapshot"() { when: - ByteArrayOutputStream originalStream = new ByteArrayOutputStream() + def originalStream = new ByteArrayOutputStream() bc.download(originalStream) def bc2 = bc.createSnapshot() - bc.asBlockBlobClient().upload(new ByteArrayInputStream("ABC".getBytes()), 3) + new SpecializedBlobClientBuilder() + .blobClient(bc) + .buildBlockBlobClient() + .upload(new ByteArrayInputStream("ABC".getBytes()), 3) then: - ByteArrayOutputStream snapshotStream = new ByteArrayOutputStream() + def snapshotStream = new ByteArrayOutputStream() bc2.download(snapshotStream) snapshotStream.toByteArray() == originalStream.toByteArray() } @@ -271,7 +272,6 @@ class BlobAPITest extends APISpec { when: bc.downloadToFile(testFile.getPath()) def fileContent = new Scanner(testFile).useDelimiter("\\Z").next() - then: fileContent == defaultText @@ -325,7 +325,7 @@ class BlobAPITest extends APISpec { @Unroll def "Get properties AC"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -349,7 +349,7 @@ class BlobAPITest extends APISpec { @Unroll def "Get properties AC fail"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -374,7 +374,7 @@ class BlobAPITest extends APISpec { def "Get properties error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.getProperties() @@ -385,7 +385,7 @@ class BlobAPITest extends APISpec { def "Set HTTP headers null"() { setup: - Response response = bc.setHTTPHeadersWithResponse(null, null, null, null) + def response = bc.setHTTPHeadersWithResponse(null, null, null, null) expect: response.getStatusCode() == 200 @@ -394,8 +394,8 @@ class BlobAPITest extends APISpec { def "Set HTTP headers min"() { setup: - BlobProperties properties = bc.getProperties() - BlobHTTPHeaders headers = new BlobHTTPHeaders() + def properties = bc.getProperties() + def headers = new BlobHTTPHeaders() .setBlobContentEncoding(properties.getContentEncoding()) .setBlobContentDisposition(properties.getContentDisposition()) .setBlobContentType("type") @@ -412,7 +412,7 @@ class BlobAPITest extends APISpec { @Unroll def "Set HTTP headers headers"() { setup: - BlobHTTPHeaders putHeaders = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + def putHeaders = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -438,7 +438,7 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -464,7 +464,7 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -489,7 +489,7 @@ class BlobAPITest extends APISpec { def "Set HTTP headers error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.setHTTPHeaders(null) @@ -511,7 +511,7 @@ class BlobAPITest extends APISpec { def "Set metadata min"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() metadata.put("foo", "bar") when: @@ -524,7 +524,7 @@ class BlobAPITest extends APISpec { @Unroll def "Set metadata metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() if (key1 != null && value1 != null) { metadata.put(key1, value1) } @@ -547,7 +547,7 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -574,7 +574,7 @@ class BlobAPITest extends APISpec { noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -599,7 +599,7 @@ class BlobAPITest extends APISpec { def "Set metadata error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.setMetadata(null) @@ -624,7 +624,7 @@ class BlobAPITest extends APISpec { @Unroll def "Snapshot metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() if (key1 != null && value1 != null) { metadata.put(key1, value1) } @@ -650,7 +650,7 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -676,7 +676,7 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -702,7 +702,7 @@ class BlobAPITest extends APISpec { def "Snapshot error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.createSnapshot() @@ -713,9 +713,9 @@ class BlobAPITest extends APISpec { def "Copy"() { setup: - def copyDestBlob = cc.getBlockBlobClient(generateBlobName()) + def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() def headers = - copyDestBlob.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getHeaders() + copyDestBlob.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, null, null, null).getHeaders() when: while (copyDestBlob.getProperties().getCopyStatus() == CopyStatusType.PENDING) { @@ -734,14 +734,14 @@ class BlobAPITest extends APISpec { def "Copy min"() { expect: - bc.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getStatusCode() == 202 + bc.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, null, null, null).getStatusCode() == 202 } @Unroll def "Copy metadata"() { setup: - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) - Metadata metadata = new Metadata() + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def metadata = new HashMap() if (key1 != null && value1 != null) { metadata.put(key1, value1) } @@ -749,14 +749,14 @@ class BlobAPITest extends APISpec { metadata.put(key2, value2) } - def status = bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null, null) + def status = bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), metadata, null, null, null, null, null, null) .getHeaders().getValue("x-ms-copy-status") - OffsetDateTime start = OffsetDateTime.now() + def start = OffsetDateTime.now() while (status != CopyStatusType.SUCCESS.toString()) { sleepIfRecord(1000) status = bu2.getPropertiesWithResponse(null, null, null).getHeaders().getValue("x-ms-copy-status") - OffsetDateTime currentTime = OffsetDateTime.now() + def currentTime = OffsetDateTime.now() if (status == CopyStatusType.FAILED.toString() || currentTime.minusMinutes(1) == start) { throw new Exception("Copy failed or took too long") } @@ -774,7 +774,7 @@ class BlobAPITest extends APISpec { @Unroll def "Copy source AC"() { setup: - BlobClient copyDestBlob = cc.getBlockBlobClient(generateBlobName()) + def copyDestBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() match = setupBlobMatchCondition(bc, match) def mac = new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -783,7 +783,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) expect: - copyDestBlob.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, mac, null, null, null).getStatusCode() == 202 + copyDestBlob.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, mac, null, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch @@ -797,7 +797,7 @@ class BlobAPITest extends APISpec { @Unroll def "Copy source AC fail"() { setup: - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def mac = new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -806,7 +806,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, mac, null, null, null) + bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, mac, null, null, null) then: thrown(StorageException) @@ -822,11 +822,11 @@ class BlobAPITest extends APISpec { @Unroll def "Copy dest AC"() { setup: - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -836,7 +836,7 @@ class BlobAPITest extends APISpec { expect: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, bac, null, null).getStatusCode() == 202 + bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, bac, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch | leaseID @@ -851,11 +851,11 @@ class BlobAPITest extends APISpec { @Unroll def "Copy dest AC fail"() { setup: - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) noneMatch = setupBlobMatchCondition(bu2, noneMatch) setupBlobLeaseCondition(bu2, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -864,7 +864,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) when: - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, bac, null, null) + bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, bac, null, null) then: thrown(StorageException) @@ -881,21 +881,22 @@ class BlobAPITest extends APISpec { def "Abort copy lease fail"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort - bc.asBlockBlobClient() + new SpecializedBlobClientBuilder() + .blobClient(bc) + .buildBlockBlobClient() .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) // So we don't have to create a SAS. cc.setAccessPolicy(PublicAccessType.BLOB, null) - ContainerClient cu2 = alternateBlobServiceClient.getContainerClient(generateBlobName()) + def cu2 = alternateBlobServiceClient.getBlobContainerClient(generateBlobName()) cu2.create() - BlockBlobClient bu2 = cu2.getBlockBlobClient(generateBlobName()) + def bu2 = cu2.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) - String leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) + def leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) when: - String copyID = - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, - new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() + def copyID = bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, + new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() bu2.abortCopyFromURLWithResponse(copyID, new LeaseAccessConditions().setLeaseId(garbageLeaseID), null, null) then: @@ -909,18 +910,20 @@ class BlobAPITest extends APISpec { def "Abort copy"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort - bc.asBlockBlobClient().upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) + new SpecializedBlobClientBuilder().blobClient(bc) + .buildBlockBlobClient() + .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) // So we don't have to create a SAS. cc.setAccessPolicy(PublicAccessType.BLOB, null) - ContainerClient cu2 = alternateBlobServiceClient.getContainerClient(generateBlobName()) + def cu2 = alternateBlobServiceClient.getBlobContainerClient(generateBlobName()) cu2.create() - BlobClient bu2 = cu2.getBlobClient(generateBlobName()) + def bu2 = cu2.getBlobClient(generateBlobName()) when: - String copyID = bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null, null).getValue() - Response response = bu2.abortCopyFromURLWithResponse(copyID, null, null, null) - HttpHeaders headers = response.getHeaders() + def copyID = bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, null, null, null).getValue() + def response = bu2.abortCopyFromURLWithResponse(copyID, null, null, null) + def headers = response.getHeaders() then: response.getStatusCode() == 204 @@ -934,16 +937,18 @@ class BlobAPITest extends APISpec { def "Abort copy min"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort - bc.asBlockBlobClient().upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) + new SpecializedBlobClientBuilder().blobClient(bc) + .buildBlockBlobClient() + .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) // So we don't have to create a SAS. cc.setAccessPolicy(PublicAccessType.BLOB, null) - ContainerClient cu2 = alternateBlobServiceClient.getContainerClient(generateBlobName()) + def cu2 = alternateBlobServiceClient.getBlobContainerClient(generateBlobName()) cu2.create() - BlobClient bu2 = cu2.getBlobClient(generateBlobName()) + def bu2 = cu2.getBlobClient(generateBlobName()) when: - String copyID = bu2.startCopyFromURL(bc.getBlobUrl()) + def copyID = bu2.startCopyFromURL(new URL(bc.getBlobUrl())) then: bu2.abortCopyFromURLWithResponse(copyID, null, null, null).getStatusCode() == 204 @@ -952,19 +957,21 @@ class BlobAPITest extends APISpec { def "Abort copy lease"() { setup: // Data has to be large enough and copied between accounts to give us enough time to abort - bc.asBlockBlobClient().upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) + new SpecializedBlobClientBuilder().blobClient(bc) + .buildBlockBlobClient() + .upload(new ByteArrayInputStream(getRandomByteArray(8 * 1024 * 1024)), 8 * 1024 * 1024) // So we don't have to create a SAS. cc.setAccessPolicy(PublicAccessType.BLOB, null) - ContainerClient cu2 = alternateBlobServiceClient.getContainerClient(generateContainerName()) + def cu2 = alternateBlobServiceClient.getBlobContainerClient(generateContainerName()) cu2.create() - BlockBlobClient bu2 = cu2.getBlockBlobClient(generateBlobName()) + def bu2 = cu2.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) - String leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) + def leaseID = setupBlobLeaseCondition(bu2, receivedLeaseID) when: - String copyID = - bu2.startCopyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, + def copyID = + bu2.startCopyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, new BlobAccessConditions().setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)), null, null).getValue() then: @@ -975,7 +982,7 @@ class BlobAPITest extends APISpec { def "Copy error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.startCopyFromURL(new URL("http://www.error.com")) @@ -986,7 +993,7 @@ class BlobAPITest extends APISpec { def "Abort copy error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.abortCopyFromURL("id") @@ -999,10 +1006,10 @@ class BlobAPITest extends APISpec { setup: // Sync copy is a deep copy, which requires either sas or public access. cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - HttpHeaders headers = bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() + def headers = bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, null, null).getHeaders() then: headers.getValue("x-ms-copy-status") == SyncCopyStatusType.SUCCESS.toString() @@ -1013,18 +1020,18 @@ class BlobAPITest extends APISpec { def "Sync copy min"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 202 + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, null, null, null).getStatusCode() == 202 } @Unroll def "Sync copy metadata"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) - Metadata metadata = new Metadata() + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + def metadata = new HashMap() if (key1 != null && value1 != null) { metadata.put(key1, value1) } @@ -1033,7 +1040,7 @@ class BlobAPITest extends APISpec { } when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), metadata, null, null, null, null, null) + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), metadata, null, null, null, null, null) then: bu2.getProperties().getMetadata() == metadata @@ -1048,7 +1055,7 @@ class BlobAPITest extends APISpec { def "Sync copy source AC"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() match = setupBlobMatchCondition(bc, match) def mac = new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1057,7 +1064,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null).getStatusCode() == 202 + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, mac, null, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch @@ -1072,7 +1079,7 @@ class BlobAPITest extends APISpec { def "Sync copy source AC fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def mac = new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1081,7 +1088,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, mac, null, null, null) + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, mac, null, null, null) then: thrown(StorageException) @@ -1098,11 +1105,11 @@ class BlobAPITest extends APISpec { def "Sync copy dest AC"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1111,7 +1118,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) expect: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, bac, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch | leaseID @@ -1127,11 +1134,11 @@ class BlobAPITest extends APISpec { def "Sync copy dest AC fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - BlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) noneMatch = setupBlobMatchCondition(bu2, noneMatch) setupBlobLeaseCondition(bu2, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1140,7 +1147,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) when: - bu2.copyFromURLWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) + bu2.copyFromURLWithResponse(new URL(bc.getBlobUrl()), null, null, null, bac, null, null) then: thrown(StorageException) @@ -1156,10 +1163,10 @@ class BlobAPITest extends APISpec { def "Sync copy error"() { setup: - def bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bu2.copyFromURL(bc.getBlobUrl()) + bu2.copyFromURL(new URL(bc.getBlobUrl())) then: thrown(StorageException) @@ -1167,8 +1174,8 @@ class BlobAPITest extends APISpec { def "Delete"() { when: - Response response = bc.deleteWithResponse(null, null, null, null) - HttpHeaders headers = response.getHeaders() + def response = bc.deleteWithResponse(null, null, null, null) + def headers = response.getHeaders() then: response.getStatusCode() == 202 @@ -1187,7 +1194,7 @@ class BlobAPITest extends APISpec { setup: bc.createSnapshot() // Create an extra blob so the list isn't empty (null) when we delete base blob, too - BlockBlobClient bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) when: @@ -1207,7 +1214,7 @@ class BlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1233,7 +1240,7 @@ class BlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -1258,7 +1265,7 @@ class BlobAPITest extends APISpec { def "Blob delete error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.delete() @@ -1270,13 +1277,13 @@ class BlobAPITest extends APISpec { @Unroll def "Set tier block blob"() { setup: - ContainerClient cc = blobServiceClient.createContainer(generateContainerName()) - BlockBlobClient bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultData.remaining()) when: - Response initialResponse = bc.setTierWithResponse(tier, null, null, null, null) - HttpHeaders headers = initialResponse.getHeaders() + def initialResponse = bc.setAccessTierWithResponse(tier, null, null, null, null) + def headers = initialResponse.getHeaders() then: initialResponse.getStatusCode() == 200 || initialResponse.getStatusCode() == 202 @@ -1298,13 +1305,13 @@ class BlobAPITest extends APISpec { @Unroll def "Set tier page blob"() { setup: - ContainerClient cc = premiumBlobServiceClient.createContainer(generateContainerName()) + def cc = premiumBlobServiceClient.createBlobContainer(generateContainerName()) - def bc = cc.getPageBlobClient(generateBlobName()) - bc.setCreate(512) + def bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() + bc.create(512) when: - bc.setTier(tier) + bc.setAccessTier(tier) then: bc.getProperties().getAccessTier() == tier @@ -1326,12 +1333,12 @@ class BlobAPITest extends APISpec { def "Set tier min"() { setup: - ContainerClient cc = blobServiceClient.createContainer(generateContainerName()) - BlockBlobClient bu = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bu = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu.upload(defaultInputStream.get(), defaultData.remaining()) when: - int statusCode = bc.setTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode() + def statusCode = bc.setAccessTierWithResponse(AccessTier.HOT, null, null, null, null).getStatusCode() then: statusCode == 200 || statusCode == 202 @@ -1342,18 +1349,18 @@ class BlobAPITest extends APISpec { def "Set tier inferred"() { setup: - def cc = blobServiceClient.createContainer(generateBlobName()) - def bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) when: - boolean inferred1 = bc.getProperties().isAccessTierInferred() - Boolean inferredList1 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() + def inferred1 = bc.getProperties().isAccessTierInferred() + def inferredList1 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() - bc.setTier(AccessTier.HOT) + bc.setAccessTier(AccessTier.HOT) - boolean inferred2 = bc.getProperties().isAccessTierInferred() - Boolean inferredList2 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() + def inferred2 = bc.getProperties().isAccessTierInferred() + def inferredList2 = cc.listBlobsFlat().iterator().next().getProperties().isAccessTierInferred() then: inferred1 @@ -1365,13 +1372,13 @@ class BlobAPITest extends APISpec { @Unroll def "Set tier archive status"() { setup: - def cc = blobServiceClient.createContainer(generateBlobName()) - def bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) when: - bc.setTier(sourceTier) - bc.setTier(destTier) + bc.setAccessTier(sourceTier) + bc.setAccessTier(destTier) then: bc.getProperties().getArchiveStatus() == status @@ -1386,12 +1393,12 @@ class BlobAPITest extends APISpec { def "Set tier error"() { setup: - def cc = blobServiceClient.createContainer(generateContainerName()) - def bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) when: - bc.setTier(AccessTier.fromString("garbage")) + bc.setAccessTier(AccessTier.fromString("garbage")) then: def e = thrown(StorageException) @@ -1403,22 +1410,22 @@ class BlobAPITest extends APISpec { def "Set tier illegal argument"() { when: - bc.setTier(null) + bc.setAccessTier(null) then: - thrown(IllegalArgumentException) + thrown(NullPointerException) } def "Set tier lease"() { setup: - def cc = blobServiceClient.createContainer(generateContainerName()) - def bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) when: - bc.setTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId(leaseID), null, null) + bc.setAccessTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId(leaseID), null, null) then: notThrown(StorageException) @@ -1429,12 +1436,12 @@ class BlobAPITest extends APISpec { def "Set tier lease fail"() { setup: - def cc = blobServiceClient.createContainer(generateContainerName()) - def bc = cc.getBlockBlobClient(generateBlobName()) + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) when: - bc.setTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId("garbage"), null, null) + bc.setAccessTierWithResponse(AccessTier.HOT, null, new LeaseAccessConditions().setLeaseId("garbage"), null, null) then: thrown(StorageException) @@ -1443,12 +1450,12 @@ class BlobAPITest extends APISpec { @Unroll def "Copy with tier"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, tier1, null, null, null) - def bcCopy = cc.getBlockBlobClient(generateBlobName()) + def bcCopy = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - bcCopy.copyFromURLWithResponse(new URL(bc.getBlobUrl().toString() + "?" + bc.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSASPermission().setReadPermission(true))), null, tier2, null, null, null, null) + bcCopy.copyFromURLWithResponse(new URL(bc.getBlobUrl() + "?" + bc.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSasPermission().setReadPermission(true))), null, tier2, null, null, null, null) then: bcCopy.getProperties().getAccessTier() == tier2 @@ -1487,7 +1494,7 @@ class BlobAPITest extends APISpec { } def "Undelete error"() { - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.undelete() @@ -1498,7 +1505,7 @@ class BlobAPITest extends APISpec { def "Get account info"() { when: - Response response = primaryBlobServiceClient.getAccountInfoWithResponse(null, null) + def response = primaryBlobServiceClient.getAccountInfoWithResponse(null, null) then: response.getHeaders().getValue("Date") != null @@ -1515,9 +1522,9 @@ class BlobAPITest extends APISpec { def "Get account info error"() { when: - BlobServiceClient serviceURL = getServiceClient(primaryBlobServiceClient.getAccountUrl().toString()) + def serviceURL = getServiceClient(primaryBlobServiceClient.getAccountUrl()) - serviceURL.getContainerClient(generateContainerName()).getBlobClient(generateBlobName()).getAccountInfo() + serviceURL.getBlobContainerClient(generateContainerName()).getBlobClient(generateBlobName()).getAccountInfo() then: thrown(StorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy index 8296f70ed461..ab393115a019 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.groovy @@ -1,19 +1,21 @@ package com.azure.storage.blob + import com.azure.storage.common.Constants import spock.lang.Ignore +import spock.lang.Requires class BlobOutputStreamTest extends APISpec { private static int FOUR_MB = 4 * Constants.MB - @Ignore + @Requires({ liveMode() }) def "BlockBlob output stream"() { setup: - byte[] data = getRandomByteArray(100 * Constants.MB) - BlockBlobClient blockBlobClient = cc.getBlockBlobClient(generateBlobName()) + def data = getRandomByteArray(10 * Constants.MB) + def blockBlobClient = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - BlobOutputStream outputStream = blockBlobClient.getBlobOutputStream() + def outputStream = blockBlobClient.getBlobOutputStream() outputStream.write(data) outputStream.close() @@ -22,16 +24,16 @@ class BlobOutputStreamTest extends APISpec { convertInputStreamToByteArray(blockBlobClient.openInputStream()) == data } - @Ignore + @Requires({ liveMode() }) def "PageBlob output stream"() { setup: - byte[] data = getRandomByteArray(1024 * Constants.MB - 512) - PageBlobClient pageBlobClient = cc.getPageBlobClient(generateBlobName()) - pageBlobClient.setCreate(data.length) + def data = getRandomByteArray(16 * Constants.MB - 512) + def pageBlobClient = cc.getBlobClient(generateBlobName()).getPageBlobClient() + pageBlobClient.create(data.length) when: - BlobOutputStream outputStream = pageBlobClient.getBlobOutputStream(data.length) + def outputStream = pageBlobClient.getBlobOutputStream(data.length) outputStream.write(data) outputStream.close() @@ -39,16 +41,16 @@ class BlobOutputStreamTest extends APISpec { convertInputStreamToByteArray(pageBlobClient.openInputStream()) == data } - @Ignore + @Requires({ liveMode() }) def "AppendBlob output stream"() { setup: - byte[] data = getRandomByteArray(64 * FOUR_MB) - AppendBlobClient appendBlobClient = cc.getAppendBlobClient(generateBlobName()) + def data = getRandomByteArray(4 * FOUR_MB) + def appendBlobClient = cc.getBlobClient(generateBlobName()).getAppendBlobClient() appendBlobClient.create() when: - BlobOutputStream outputStream = appendBlobClient.getBlobOutputStream() - for (int i = 0; i != 64; i++) { + def outputStream = appendBlobClient.getBlobOutputStream() + for (int i = 0; i != 4; i++) { outputStream.write(Arrays.copyOfRange(data, i * FOUR_MB, ((i + 1) * FOUR_MB) - 1)) } outputStream.close() @@ -58,7 +60,7 @@ class BlobOutputStreamTest extends APISpec { convertInputStreamToByteArray(appendBlobClient.openInputStream()) == data } - private static byte[] convertInputStreamToByteArray(InputStream inputStream) { + def convertInputStreamToByteArray(InputStream inputStream) { int b ByteArrayOutputStream outputStream = new ByteArrayOutputStream() try { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy index a11adbd4d104..fd9d6a78c964 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy @@ -1,5 +1,7 @@ package com.azure.storage.blob + +import com.azure.storage.blob.specialized.BlockBlobClient import com.azure.storage.common.Constants import spock.lang.Requires @@ -7,24 +9,24 @@ class BlockBlobInputOutputStreamTest extends APISpec { BlockBlobClient bc def setup() { - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() } // Only run this test in live mode as BlobOutputStream dynamically assigns blocks - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Upload download"() { when: - int length = 30 * Constants.MB - byte[] randomBytes = getRandomByteArray(length) + def length = 30 * Constants.MB + def randomBytes = getRandomByteArray(length) - BlobOutputStream outStream = bc.getBlobOutputStream() + def outStream = bc.getBlobOutputStream() outStream.write(randomBytes) outStream.close() then: - BlobInputStream inputStream = bc.openInputStream() + def inputStream = bc.openInputStream() int b - ByteArrayOutputStream outputStream = new ByteArrayOutputStream() + def outputStream = new ByteArrayOutputStream() try { while ((b = inputStream.read()) != -1) { outputStream.write(b) @@ -32,7 +34,6 @@ class BlockBlobInputOutputStreamTest extends APISpec { } catch (IOException ex) { throw new UncheckedIOException(ex) } - byte[] randomBytes2 = outputStream.toByteArray() - assert randomBytes2 == randomBytes + assert outputStream.toByteArray() == randomBytes } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy index 1187f50ec5e6..50dbf8541d4c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy @@ -2,8 +2,12 @@ package com.azure.storage.blob import com.azure.core.http.policy.HttpLogDetailLevel import com.azure.storage.blob.models.CustomerProvidedKey -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.PageRange +import com.azure.storage.blob.specialized.AppendBlobClient +import com.azure.storage.blob.specialized.BlobClientBase +import com.azure.storage.blob.specialized.BlockBlobClient +import com.azure.storage.blob.specialized.PageBlobClient import com.azure.storage.common.Constants import java.time.OffsetDateTime @@ -11,16 +15,16 @@ import java.time.OffsetDateTime class CPKTest extends APISpec { CustomerProvidedKey key - ContainerClient cpkContainer + BlobContainerClient cpkContainer BlockBlobClient cpkBlockBlob PageBlobClient cpkPageBlob AppendBlobClient cpkAppendBlob - BlobClient cpkExistingBlob + BlobClientBase cpkExistingBlob def setup() { key = new CustomerProvidedKey(getRandomKey()) - def builder = new ContainerClientBuilder() - .endpoint(cc.getContainerUrl().toString()) + def builder = new BlobContainerClientBuilder() + .endpoint(cc.getBlobContainerUrl().toString()) .customerProvidedKey(key) .httpClient(getHttpClient()) .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) @@ -29,11 +33,11 @@ class CPKTest extends APISpec { addOptionalRecording(builder) cpkContainer = builder.buildClient() - cpkBlockBlob = cpkContainer.getBlockBlobClient(generateBlobName()) - cpkPageBlob = cpkContainer.getPageBlobClient(generateBlobName()) - cpkAppendBlob = cpkContainer.getAppendBlobClient(generateBlobName()) + cpkBlockBlob = cpkContainer.getBlobClient(generateBlobName()).getBlockBlobClient() + cpkPageBlob = cpkContainer.getBlobClient(generateBlobName()).getPageBlobClient() + cpkAppendBlob = cpkContainer.getBlobClient(generateBlobName()).getAppendBlobClient() - def existingBlobSetup = cpkContainer.getBlockBlobClient(generateBlobName()) + def existingBlobSetup = cpkContainer.getBlobClient(generateBlobName()).getBlockBlobClient() existingBlobSetup.upload(defaultInputStream.get(), defaultDataSize) cpkExistingBlob = existingBlobSetup } @@ -84,12 +88,12 @@ class CPKTest extends APISpec { def "Put block from URL with CPK"() { setup: - def sourceBlob = cc.getBlockBlobClient(generateBlobName()) + def sourceBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() sourceBlob.upload(defaultInputStream.get(), defaultDataSize) when: def response = cpkBlockBlob.stageBlockFromURLWithResponse(getBlockID(), - new URL(sourceBlob.getBlobUrl().toString() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSASPermission().setReadPermission(true))), + new URL(sourceBlob.getBlobUrl() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSasPermission().setReadPermission(true))), null, null, null, null, null, null) then: @@ -115,7 +119,7 @@ class CPKTest extends APISpec { def "Put page with CPK"() { setup: - cpkPageBlob.setCreate(PageBlobClient.PAGE_BYTES) + cpkPageBlob.create(PageBlobClient.PAGE_BYTES) when: def response = cpkPageBlob.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -129,16 +133,16 @@ class CPKTest extends APISpec { def "Put page from URL wih CPK"() { setup: - def sourceBlob = cc.getPageBlobClient(generateBlobName()) - sourceBlob.setCreate(PageBlobClient.PAGE_BYTES) + def sourceBlob = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceBlob.create(PageBlobClient.PAGE_BYTES) sourceBlob.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES)), null, null, null) - cpkPageBlob.setCreate(PageBlobClient.PAGE_BYTES) + cpkPageBlob.create(PageBlobClient.PAGE_BYTES) when: def response = cpkPageBlob.uploadPagesFromURLWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), - new URL(sourceBlob.getBlobUrl().toString() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSASPermission().setReadPermission(true))), + new URL(sourceBlob.getBlobUrl() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSasPermission().setReadPermission(true))), null, null, null, null, null, null) then: @@ -150,7 +154,7 @@ class CPKTest extends APISpec { def "Put multiple pages with CPK"() { setup: - cpkPageBlob.setCreate(PageBlobClient.PAGE_BYTES * 2) + cpkPageBlob.create(PageBlobClient.PAGE_BYTES * 2) when: def response = cpkPageBlob.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES * 2 - 1), @@ -178,12 +182,12 @@ class CPKTest extends APISpec { def "Append block from URL with CPK"() { setup: cpkAppendBlob.create() - def sourceBlob = cc.getBlockBlobClient(generateBlobName()) + def sourceBlob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() sourceBlob.upload(defaultInputStream.get(), defaultDataSize) when: def response = cpkAppendBlob.appendBlockFromUrlWithResponse( - new URL(sourceBlob.getBlobUrl().toString() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSASPermission().setReadPermission(true))), + new URL(sourceBlob.getBlobUrl() + "?" + sourceBlob.generateSAS(OffsetDateTime.now().plusHours(1), new BlobSasPermission().setReadPermission(true))), null, null, null, null, null, null) then: @@ -195,7 +199,7 @@ class CPKTest extends APISpec { def "Set blob metadata with CPK"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() metadata.put("foo", "bar") when: @@ -230,7 +234,7 @@ class CPKTest extends APISpec { def "Snapshot blob with CPK"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() metadata.put("foo", "bar") when: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 360fd047214c..14eb0b00c1fd 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -3,27 +3,24 @@ package com.azure.storage.blob -import com.azure.core.http.rest.Response import com.azure.storage.blob.models.AccessPolicy import com.azure.storage.blob.models.AccessTier -import com.azure.storage.blob.models.AppendBlobItem -import com.azure.storage.blob.models.BlobItem import com.azure.storage.blob.models.BlobListDetails import com.azure.storage.blob.models.BlobType -import com.azure.storage.blob.models.ContainerAccessConditions -import com.azure.storage.blob.models.ContainerAccessPolicies +import com.azure.storage.blob.models.BlobContainerAccessConditions import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.LeaseAccessConditions import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.LeaseStatusType import com.azure.storage.blob.models.ListBlobsOptions -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.SignedIdentifier import com.azure.storage.blob.models.StorageErrorCode import com.azure.storage.blob.models.StorageException +import com.azure.storage.blob.specialized.BlobClientBase import spock.lang.Unroll import java.time.Duration @@ -36,7 +33,7 @@ class ContainerAPITest extends APISpec { def "Create all null"() { setup: // Overwrite the existing cc, which has already been created - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: def response = cc.createWithResponse(null, null, null, null) @@ -48,7 +45,7 @@ class ContainerAPITest extends APISpec { def "Create min"() { when: - def cc = primaryBlobServiceClient.createContainer(generateContainerName()) + def cc = primaryBlobServiceClient.createBlobContainer(generateContainerName()) then: cc.exists() @@ -57,8 +54,8 @@ class ContainerAPITest extends APISpec { @Unroll def "Create metadata"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) - def metadata = new Metadata() + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -83,7 +80,7 @@ class ContainerAPITest extends APISpec { @Unroll def "Create publicAccess"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.createWithResponse(null, publicAccess, null, null) @@ -132,7 +129,7 @@ class ContainerAPITest extends APISpec { def "Get properties lease"() { setup: - String leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) + def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: cc.getPropertiesWithResponse(new LeaseAccessConditions().setLeaseId(leaseID), null, null).getStatusCode() == 200 @@ -148,7 +145,7 @@ class ContainerAPITest extends APISpec { def "Get properties error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.getProperties() @@ -159,8 +156,8 @@ class ContainerAPITest extends APISpec { def "Set metadata"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) - Metadata metadata = new Metadata() + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) + def metadata = new HashMap() metadata.put("key", "value") cc.createWithResponse(metadata, null, null, null) @@ -175,7 +172,7 @@ class ContainerAPITest extends APISpec { def "Set metadata min"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() metadata.put("foo", "bar") when: @@ -188,7 +185,7 @@ class ContainerAPITest extends APISpec { @Unroll def "Set metadata metadata"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -210,7 +207,7 @@ class ContainerAPITest extends APISpec { def "Set metadata AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified)) @@ -228,7 +225,7 @@ class ContainerAPITest extends APISpec { @Unroll def "Set metadata AC fail"() { setup: - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified)) @@ -248,13 +245,13 @@ class ContainerAPITest extends APISpec { @Unroll def "Set metadata AC illegal"() { setup: - ModifiedAccessConditions mac = new ModifiedAccessConditions() + def mac = new ModifiedAccessConditions() .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) when: - cc.setMetadataWithResponse(null, new ContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.setMetadataWithResponse(null, new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) then: thrown(UnsupportedOperationException) @@ -268,7 +265,7 @@ class ContainerAPITest extends APISpec { def "Set metadata error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.setMetadata(null) @@ -303,7 +300,7 @@ class ContainerAPITest extends APISpec { def "Set access policy min ids"() { setup: - SignedIdentifier identifier = new SignedIdentifier() + def identifier = new SignedIdentifier() .setId("0000") .setAccessPolicy(new AccessPolicy() .setStart(OffsetDateTime.now().atZoneSameInstant(ZoneId.of("UTC")).toOffsetDateTime()) @@ -311,8 +308,7 @@ class ContainerAPITest extends APISpec { .plusDays(1)) .setPermission("r")) - def ids = [] - ids.push(identifier) + def ids = [ identifier ] as List when: cc.setAccessPolicy(null, ids) @@ -323,21 +319,19 @@ class ContainerAPITest extends APISpec { def "Set access policy ids"() { setup: - SignedIdentifier identifier = new SignedIdentifier() + def identifier = new SignedIdentifier() .setId("0000") .setAccessPolicy(new AccessPolicy() .setStart(getUTCNow()) .setExpiry(getUTCNow().plusDays(1)) .setPermission("r")) - SignedIdentifier identifier2 = new SignedIdentifier() + def identifier2 = new SignedIdentifier() .setId("0001") .setAccessPolicy(new AccessPolicy() .setStart(getUTCNow()) .setExpiry(getUTCNow().plusDays(2)) .setPermission("w")) - List ids = new ArrayList<>() - ids.add(identifier) - ids.add(identifier2) + def ids = [ identifier, identifier2 ] as List when: def response = cc.setAccessPolicyWithResponse(null, ids, null, null, null) @@ -358,7 +352,7 @@ class ContainerAPITest extends APISpec { def "Set access policy AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -378,7 +372,7 @@ class ContainerAPITest extends APISpec { @Unroll def "Set access policy AC fail"() { setup: - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -400,10 +394,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Set access policy AC illegal"() { setup: - ModifiedAccessConditions mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - cc.setAccessPolicyWithResponse(null, null, new ContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.setAccessPolicyWithResponse(null, null, new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) then: thrown(UnsupportedOperationException) @@ -416,7 +410,7 @@ class ContainerAPITest extends APISpec { def "Set access policy error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.setAccessPolicy(null, null) @@ -427,16 +421,15 @@ class ContainerAPITest extends APISpec { def "Get access policy"() { setup: - SignedIdentifier identifier = new SignedIdentifier() + def identifier = new SignedIdentifier() .setId("0000") .setAccessPolicy(new AccessPolicy() .setStart(getUTCNow()) .setExpiry(getUTCNow().plusDays(1)) .setPermission("r")) - List ids = new ArrayList<>() - ids.push(identifier) + def ids = [ identifier ] as List cc.setAccessPolicy(PublicAccessType.BLOB, ids) - Response response = cc.getAccessPolicyWithResponse(null, null, null) + def response = cc.getAccessPolicyWithResponse(null, null, null) expect: response.getStatusCode() == 200 @@ -449,7 +442,7 @@ class ContainerAPITest extends APISpec { def "Get access policy lease"() { setup: - String leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) + def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: cc.getAccessPolicyWithResponse(new LeaseAccessConditions().setLeaseId(leaseID), null, null).getStatusCode() == 200 @@ -465,7 +458,7 @@ class ContainerAPITest extends APISpec { def "Get access policy error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.getAccessPolicy() @@ -476,7 +469,7 @@ class ContainerAPITest extends APISpec { def "Delete"() { when: - Response response = cc.deleteWithResponse(null, null, null) + def response = cc.deleteWithResponse(null, null, null) then: response.getStatusCode() == 202 @@ -497,7 +490,7 @@ class ContainerAPITest extends APISpec { def "Delete AC"() { setup: leaseID = setupContainerLeaseCondition(cc, leaseID) - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -517,7 +510,7 @@ class ContainerAPITest extends APISpec { @Unroll def "Delete AC fail"() { setup: - ContainerAccessConditions cac = new ContainerAccessConditions() + def cac = new BlobContainerAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -539,10 +532,10 @@ class ContainerAPITest extends APISpec { @Unroll def "Delete AC illegal"() { setup: - ModifiedAccessConditions mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new ModifiedAccessConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - cc.deleteWithResponse(new ContainerAccessConditions().setModifiedAccessConditions(mac), null, null) + cc.deleteWithResponse(new BlobContainerAccessConditions().setModifiedAccessConditions(mac), null, null) then: thrown(UnsupportedOperationException) @@ -555,7 +548,7 @@ class ContainerAPITest extends APISpec { def "Delete error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.delete() @@ -566,12 +559,12 @@ class ContainerAPITest extends APISpec { def "List blobs flat"() { setup: - String name = generateBlobName() - PageBlobClient bu = cc.getPageBlobClient(name) - bu.setCreate(512) + def name = generateBlobName() + def bu = cc.getBlobClient(name).getPageBlobClient() + bu.create(512) when: - Iterator blobs = cc.listBlobsFlat().iterator() + def blobs = cc.listBlobsFlat().iterator() //ContainerListBlobFlatSegmentHeaders headers = response.headers() //List blobs = responseiterator()() @@ -582,7 +575,7 @@ class ContainerAPITest extends APISpec { // headers.requestId() != null // headers.getVersion() != null // headers.date() != null - BlobItem blob = blobs.next() + def blob = blobs.next() !blobs.hasNext() blob.getName() == name blob.getProperties().getBlobType() == BlobType.PAGE_BLOB @@ -621,12 +614,12 @@ class ContainerAPITest extends APISpec { } def setupListBlobsTest(String normalName, String copyName, String metadataName, String uncommittedName) { - def normal = cc.getPageBlobClient(normalName) - normal.setCreate(512) + def normal = cc.getBlobClient(normalName).getPageBlobClient() + normal.create(512) - def copyBlob = cc.getPageBlobClient(copyName) + def copyBlob = cc.getBlobClient(copyName).getPageBlobClient() - copyBlob.startCopyFromURL(normal.getBlobUrl()) + copyBlob.startCopyFromURL(new URL(normal.getBlobUrl())) def start = OffsetDateTime.now() def status = CopyStatusType.PENDING while (status != CopyStatusType.SUCCESS) { @@ -638,40 +631,31 @@ class ContainerAPITest extends APISpec { sleepIfRecord(1000) } - def metadataBlob = cc.getPageBlobClient(metadataName) - def values = new Metadata() - values.put("foo", "bar") - metadataBlob.createWithResponse(512, null, null, values, null, null, null) + def metadataBlob = cc.getBlobClient(metadataName).getPageBlobClient() + def metadata = new HashMap() + metadata.put("foo", "bar") + metadataBlob.createWithResponse(512, null, null, metadata, null, null, null) def snapshotTime = normal.createSnapshot().getSnapshotId() - def uncommittedBlob = cc.getBlockBlobClient(uncommittedName) + def uncommittedBlob = cc.getBlobClient(uncommittedName).getBlockBlobClient() uncommittedBlob.stageBlock("0000", defaultInputStream.get(), defaultData.remaining()) return snapshotTime } - def blobListResponseToList(Iterator blobs) { - ArrayList blobQueue = new ArrayList<>() - while (blobs.hasNext()) { - blobQueue.add(blobs.next()) - } - - return blobQueue - } - def "List blobs flat options copy"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setCopy(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveCopy(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsFlat(options, null).iterator()) + def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -687,15 +671,15 @@ class ContainerAPITest extends APISpec { def "List blobs flat options metadata"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setMetadata(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveMetadata(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsFlat(options, null).iterator()) + def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -708,15 +692,15 @@ class ContainerAPITest extends APISpec { def "List blobs flat options snapshots"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setSnapshots(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() - String snapshotTime = setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveSnapshots(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() + def snapshotTime = setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsFlat(options, null).iterator()) + def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -727,15 +711,15 @@ class ContainerAPITest extends APISpec { def "List blobs flat options uncommitted"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setUncommittedBlobs(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveUncommittedBlobs(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsFlat(options, null).iterator()) + def blobs = cc.listBlobsFlat(options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -746,14 +730,14 @@ class ContainerAPITest extends APISpec { def "List blobs flat options deleted"() { setup: enableSoftDelete() - String name = generateBlobName() - AppendBlobClient bu = cc.getAppendBlobClient(name) + def name = generateBlobName() + def bu = cc.getBlobClient(name).getAppendBlobClient() bu.create() bu.delete() when: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setDeletedBlobs(true)) - Iterator blobs = cc.listBlobsFlat(options, null).iterator() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveDeletedBlobs(true)) + def blobs = cc.listBlobsFlat(options, null).iterator() then: blobs.next().getName() == name @@ -764,15 +748,15 @@ class ContainerAPITest extends APISpec { def "List blobs flat options prefix"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setPrefix("a") - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setPrefix("a") + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - Iterator blobs = cc.listBlobsFlat(options, null).iterator() + def blobs = cc.listBlobsFlat(options, null).iterator() then: blobs.next().getName() == normalName @@ -782,8 +766,8 @@ class ContainerAPITest extends APISpec { def "List blobs flat options maxResults"() { setup: def PAGE_SIZE = 2 - def options = new ListBlobsOptions().setDetails(new BlobListDetails().setCopy(true) - .setSnapshots(true).setUncommittedBlobs(true)).setMaxResults(PAGE_SIZE) + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveCopy(true) + .setRetrieveSnapshots(true).setRetrieveUncommittedBlobs(true)).setMaxResults(PAGE_SIZE) def normalName = "a" + generateBlobName() def copyName = "c" + generateBlobName() def metadataName = "m" + generateBlobName() @@ -808,8 +792,8 @@ class ContainerAPITest extends APISpec { def NUM_BLOBS = 10 def PAGE_SIZE = 6 for (int i = 0; i < NUM_BLOBS ; i++) { - PageBlobClient bc = cc.getPageBlobClient(generateBlobName()) - bc.setCreate(512) + def bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() + bc.create(512) } when: "list blobs with sync client" @@ -836,7 +820,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.listBlobsFlat().iterator().hasNext() @@ -850,9 +834,9 @@ class ContainerAPITest extends APISpec { def NUM_BLOBS = 5 def PAGE_RESULTS = 3 - def blobs = [] as Collection + def blobs = [] as Collection for (i in (1..NUM_BLOBS)) { - def blob = cc.getBlockBlobClient(generateBlobName()) + def blob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() blob.upload(defaultInputStream.get(), defaultDataSize) blobs << blob } @@ -869,9 +853,9 @@ class ContainerAPITest extends APISpec { def NUM_BLOBS = 5 def PAGE_RESULTS = 3 - def blobs = [] as Collection + def blobs = [] as Collection for (i in (1..NUM_BLOBS)) { - def blob = cc.getBlockBlobClient(generateBlobName()) + def blob = cc.getBlobClient(generateBlobName()).getBlockBlobClient() blob.upload(defaultInputStream.get(), defaultDataSize) blobs << blob } @@ -885,12 +869,12 @@ class ContainerAPITest extends APISpec { def "List blobs hierarchy"() { setup: - String name = generateBlobName() - PageBlobClient bu = cc.getPageBlobClient(name) - bu.setCreate(512) + def name = generateBlobName() + def bu = cc.getBlobClient(name).getPageBlobClient() + bu.create(512) when: - Iterator blobs = cc.listBlobsHierarchy(null).iterator() + def blobs = cc.listBlobsHierarchy(null).iterator() then: // response.getStatusCode() == 200 @@ -912,15 +896,15 @@ class ContainerAPITest extends APISpec { def "List blobs hier options copy"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setCopy(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveCopy(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsHierarchy("", options, null).iterator()) + def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -936,15 +920,15 @@ class ContainerAPITest extends APISpec { def "List blobs hier options metadata"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setMetadata(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveMetadata(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsHierarchy("", options, null).iterator()) + def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -957,15 +941,15 @@ class ContainerAPITest extends APISpec { def "List blobs hier options uncommitted"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setUncommittedBlobs(true)) - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveUncommittedBlobs(true)) + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - List blobs = blobListResponseToList(cc.listBlobsHierarchy("", options, null).iterator()) + def blobs = cc.listBlobsHierarchy("", options, null).stream().collect(Collectors.toList()) then: blobs.get(0).getName() == normalName @@ -977,12 +961,12 @@ class ContainerAPITest extends APISpec { setup: enableSoftDelete() def name = generateBlobName() - def bc = cc.getAppendBlobClient(name) + def bc = cc.getBlobClient(name).getAppendBlobClient() bc.create() bc.delete() when: - def options = new ListBlobsOptions().setDetails(new BlobListDetails().setDeletedBlobs(true)) + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveDeletedBlobs(true)) def blobs = cc.listBlobsHierarchy("", options, null).iterator() then: @@ -994,15 +978,15 @@ class ContainerAPITest extends APISpec { def "List blobs hier options prefix"() { setup: - ListBlobsOptions options = new ListBlobsOptions().setPrefix("a") - String normalName = "a" + generateBlobName() - String copyName = "c" + generateBlobName() - String metadataName = "m" + generateBlobName() - String uncommittedName = "u" + generateBlobName() + def options = new ListBlobsOptions().setPrefix("a") + def normalName = "a" + generateBlobName() + def copyName = "c" + generateBlobName() + def metadataName = "m" + generateBlobName() + def uncommittedName = "u" + generateBlobName() setupListBlobsTest(normalName, copyName, metadataName, uncommittedName) when: - Iterator blobs = cc.listBlobsHierarchy("", options, null).iterator() + def blobs = cc.listBlobsHierarchy("", options, null).iterator() then: blobs.next().getName() == normalName @@ -1012,8 +996,8 @@ class ContainerAPITest extends APISpec { def "List blobs hier options maxResults"() { setup: - def options = new ListBlobsOptions().setDetails(new BlobListDetails().setCopy(true) - .setUncommittedBlobs(true)).setMaxResults(1) + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveCopy(true) + .setRetrieveUncommittedBlobs(true)).setMaxResults(1) def normalName = "a" + generateBlobName() def copyName = "c" + generateBlobName() def metadataName = "m" + generateBlobName() @@ -1031,7 +1015,7 @@ class ContainerAPITest extends APISpec { @Unroll def "List blobs hier options fail"() { when: - def options = new ListBlobsOptions().setDetails(new BlobListDetails().setSnapshots(snapshots)) + def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveSnapshots(snapshots)) .setMaxResults(maxResults) cc.listBlobsHierarchy(null, options, null).iterator().hasNext() @@ -1048,7 +1032,7 @@ class ContainerAPITest extends APISpec { setup: def blobNames = ["a", "b/a", "c", "d/a", "e", "f", "g/a"] for (def blobName : blobNames) { - def bu = cc.getAppendBlobClient(blobName) + def bu = cc.getBlobClient(blobName).getAppendBlobClient() bu.create() } @@ -1079,8 +1063,8 @@ class ContainerAPITest extends APISpec { def NUM_BLOBS = 10 def PAGE_SIZE = 6 for (int i = 0; i < NUM_BLOBS; i++) { - PageBlobClient bc = cc.getPageBlobClient(generateBlobName()) - bc.setCreate(512) + def bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() + bc.create(512) } def blobs = cc.listBlobsHierarchy("/", new ListBlobsOptions().setMaxResults(PAGE_SIZE), null) @@ -1105,8 +1089,8 @@ class ContainerAPITest extends APISpec { def NUM_BLOBS = 10 def PAGE_SIZE = 3 for (int i = 0; i < NUM_BLOBS; i++) { - def bc = cc.getPageBlobClient(generateBlobName()) - bc.setCreate(512) + def bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() + bc.create(512) } expect: "listing operation will fetch all 10 blobs, despite page size being smaller than 10" @@ -1115,7 +1099,7 @@ class ContainerAPITest extends APISpec { def "List blobs hier error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: cc.listBlobsHierarchy(".").iterator().hasNext() @@ -1128,10 +1112,10 @@ class ContainerAPITest extends APISpec { def "Create URL special chars"() { // This test checks that we encode special characters in blob names correctly. setup: - AppendBlobClient bu2 = cc.getAppendBlobClient(name) - PageBlobClient bu3 = cc.getPageBlobClient(name + "2") - BlockBlobClient bu4 = cc.getBlockBlobClient(name + "3") - BlockBlobClient bu5 = cc.getBlockBlobClient(name) + def bu2 = cc.getBlobClient(name).getAppendBlobClient() + def bu3 = cc.getBlobClient(name + "2").getPageBlobClient() + def bu4 = cc.getBlobClient(name + "3").getBlockBlobClient() + def bu5 = cc.getBlobClient(name).getBlockBlobClient() expect: bu2.createWithResponse(null, null, null, null, null).getStatusCode() == 201 @@ -1140,7 +1124,7 @@ class ContainerAPITest extends APISpec { bu4.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, null, null).getStatusCode() == 201 when: - Iterator blobs = cc.listBlobsFlat().iterator() + def blobs = cc.listBlobsFlat().iterator() then: blobs.next().getName() == name @@ -1159,13 +1143,13 @@ class ContainerAPITest extends APISpec { def "Root explicit"() { setup: - cc = primaryBlobServiceClient.getContainerClient(ContainerClient.ROOT_CONTAINER_NAME) + cc = primaryBlobServiceClient.getBlobContainerClient(BlobContainerClient.ROOT_CONTAINER_NAME) // Create root container if not exist. if (!cc.exists()) { cc.create() } - AppendBlobClient bu = cc.getAppendBlobClient("rootblob") + def bu = cc.getBlobClient("rootblob").getAppendBlobClient() expect: bu.createWithResponse(null, null, null, null, null).getStatusCode() == 201 @@ -1173,18 +1157,17 @@ class ContainerAPITest extends APISpec { def "Root explicit in endpoint"() { setup: - cc = primaryBlobServiceClient.getContainerClient(ContainerClient.ROOT_CONTAINER_NAME) + cc = primaryBlobServiceClient.getBlobContainerClient(BlobContainerClient.ROOT_CONTAINER_NAME) // Create root container if not exist. if (!cc.exists()) { cc.create() } - AppendBlobClient bu = cc.getAppendBlobClient("rootblob") + def bu = cc.getBlobClient("rootblob").getAppendBlobClient() when: - Response createResponse = bu.createWithResponse(null, null, null, null, null) - - Response propsResponse = bu.getPropertiesWithResponse(null, null, null) + def createResponse = bu.createWithResponse(null, null, null, null, null) + def propsResponse = bu.getPropertiesWithResponse(null, null, null) then: createResponse.getStatusCode() == 201 @@ -1221,7 +1204,7 @@ class ContainerAPITest extends APISpec { def "Web container"() { setup: - cc = primaryBlobServiceClient.getContainerClient(ContainerClient.STATIC_WEBSITE_CONTAINER_NAME) + cc = primaryBlobServiceClient.getBlobContainerClient(BlobContainerClient.STATIC_WEBSITE_CONTAINER_NAME) // Create root container if not exist. try { cc.create() @@ -1231,7 +1214,7 @@ class ContainerAPITest extends APISpec { throw se } } - def webContainer = primaryBlobServiceClient.getContainerClient(ContainerClient.STATIC_WEBSITE_CONTAINER_NAME) + def webContainer = primaryBlobServiceClient.getBlobContainerClient(BlobContainerClient.STATIC_WEBSITE_CONTAINER_NAME) when: // Validate some basic operation. @@ -1260,9 +1243,9 @@ class ContainerAPITest extends APISpec { def "Get account info error"() { when: - BlobServiceClient serviceURL = getServiceClient(primaryBlobServiceClient.getAccountUrl().toString()) + def serviceURL = getServiceClient(primaryBlobServiceClient.getAccountUrl()) - serviceURL.getContainerClient(generateContainerName()).getAccountInfo() + serviceURL.getBlobContainerClient(generateContainerName()).getAccountInfo() then: thrown(StorageException) @@ -1271,8 +1254,8 @@ class ContainerAPITest extends APISpec { def "Get Container Name"() { given: def containerName = generateContainerName() - def newcc = primaryBlobServiceClient.getContainerClient(containerName) + def newcc = primaryBlobServiceClient.getBlobContainerClient(containerName) expect: - containerName == newcc.getContainerName() + containerName == newcc.getBlobContainerName() } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ProgressReporterTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ProgressReporterTest.groovy index 3363d431ca82..2e0e40c4e7f3 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ProgressReporterTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ProgressReporterTest.groovy @@ -3,7 +3,7 @@ package com.azure.storage.blob - +import com.azure.storage.blob.specialized.BlockBlobAsyncClient import reactor.core.publisher.Flux import spock.lang.Requires @@ -35,7 +35,7 @@ class ProgressReporterTest extends APISpec { 0 * mockReceiver.reportProgress({ it > 30 }) } - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Report progress sequential network test"() { setup: IProgressReceiver mockReceiver = Mock(IProgressReceiver) @@ -44,8 +44,8 @@ class ProgressReporterTest extends APISpec { Flux data = ProgressReporter.addProgressReporting(Flux.just(buffer), mockReceiver) when: - BlockBlobAsyncClient bu = getBlobAsyncClient(primaryCredential, cc.getContainerUrl().toString(), generateBlobName()) - .asBlockBlobAsyncClient() + BlockBlobAsyncClient bu = getBlobAsyncClient(primaryCredential, cc.getBlobContainerUrl(), generateBlobName()) + .getBlockBlobAsyncClient() bu.upload(data, buffer.remaining()).block() diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/RequestRetryTestFactory.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/RequestRetryTestFactory.java index de5faefc8982..88495a5ac477 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/RequestRetryTestFactory.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/RequestRetryTestFactory.java @@ -55,7 +55,7 @@ class RequestRetryTestFactory { static final String RETRY_TEST_PRIMARY_HOST = "PrimaryDC"; static final String RETRY_TEST_SECONDARY_HOST = "SecondaryDC"; - static final ByteBuffer RETRY_TEST_DEFAULT_DATA = ByteBuffer.wrap("Default data".getBytes()); + private static final ByteBuffer RETRY_TEST_DEFAULT_DATA = ByteBuffer.wrap("Default data".getBytes()); private static final String RETRY_TEST_HEADER = "TestHeader"; private static final String RETRY_TEST_QUERY_PARAM = "TestQueryParam"; private static final Mono RETRY_TEST_OK_RESPONSE = Mono.just(new RetryTestResponse(200)); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index cad711a45f78..cf1f8af8d974 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -8,17 +8,20 @@ import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.SignedIdentifier import com.azure.storage.blob.models.StorageException import com.azure.storage.blob.models.UserDelegationKey +import com.azure.storage.blob.specialized.BlobServiceSasSignatureValues +import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder import com.azure.storage.common.AccountSASPermission import com.azure.storage.common.AccountSASResourceType import com.azure.storage.common.AccountSASService import com.azure.storage.common.AccountSASSignatureValues import com.azure.storage.common.Constants -import com.azure.storage.common.IPRange +import com.azure.storage.common.IpRange import com.azure.storage.common.SASProtocol import com.azure.storage.common.Utility import com.azure.storage.common.credentials.SASTokenCredential import com.azure.storage.common.credentials.SharedKeyCredential import spock.lang.Ignore +import spock.lang.Requires import spock.lang.Unroll import java.time.LocalDateTime @@ -62,12 +65,12 @@ class SASTest extends APISpec { setup: def data = "test".getBytes() def blobName = generateBlobName() - def bu = cc.getBlockBlobClient(blobName) + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) def snapshotId = bu.createSnapshot().getSnapshotId() when: - def snapshotBlob = cc.getBlockBlobClient(blobName, snapshotId) + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() then: snapshotBlob.getSnapshotId() == snapshotId @@ -78,12 +81,12 @@ class SASTest extends APISpec { setup: def data = "test".getBytes() def blobName = generateBlobName() - def bu = cc.getBlockBlobClient(blobName) + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) def snapshotId = bu.createSnapshot().getSnapshotId() when: - def snapshotBlob = cc.getBlockBlobClient(blobName, snapshotId) + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() then: snapshotBlob.isSnapshot() @@ -95,18 +98,18 @@ class SASTest extends APISpec { setup: def data = "test".getBytes() def blobName = generateBlobName() - def bu = getBlobClient(primaryCredential, cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) - def permissions = new BlobSASPermission() + def permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true) def startTime = getUTCNow().minusDays(1) def expiryTime = getUTCNow().plusDays(1) - def ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") def sasProtocol = SASProtocol.HTTPS_HTTP @@ -119,7 +122,7 @@ class SASTest extends APISpec { when: def sas = bu.generateSAS(null, permissions, expiryTime, startTime, null, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) - def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName).getBlockBlobClient() def os = new ByteArrayOutputStream() client.download(os) @@ -139,21 +142,21 @@ class SASTest extends APISpec { def data = "test".getBytes() def blobName = generateBlobName() - def bu = getBlobClient(primaryCredential, cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) - String snapshotId = bu.createSnapshot().getSnapshotId() + def snapshotId = bu.createSnapshot().getSnapshotId() - def snapshotBlob = cc.getBlockBlobClient(blobName, snapshotId) + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() - def permissions = new BlobSASPermission() + def permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true) def startTime = getUTCNow().minusDays(1) def expiryTime = getUTCNow().plusDays(1) - def ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") def sasProtocol = SASProtocol.HTTPS_HTTP @@ -166,7 +169,7 @@ class SASTest extends APISpec { when: def sas = snapshotBlob.generateSAS(null, permissions, expiryTime, startTime, null, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) - def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName, snapshotId).asBlockBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() def os = new ByteArrayOutputStream() client.download(os) @@ -189,27 +192,27 @@ class SASTest extends APISpec { cc.setAccessPolicy(null, Arrays.asList(identifier)) // Check containerSASPermissions - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setList(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true) + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setListPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true) - OffsetDateTime expiryTime = getUTCNow().plusDays(1) + def expiryTime = getUTCNow().plusDays(1) when: - String sasWithId = cc.generateSAS(identifier.getId()) + def sasWithId = cc.generateSAS(identifier.getId()) - ContainerClient client1 = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithId), cc.getContainerUrl().toString()) + def client1 = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithId), cc.getBlobContainerUrl()) client1.listBlobsFlat().iterator().hasNext() - String sasWithPermissions = cc.generateSAS(permissions, expiryTime) + def sasWithPermissions = cc.generateSAS(permissions, expiryTime) - ContainerClient client2 = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithPermissions), cc.getContainerUrl().toString()) + def client2 = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithPermissions), cc.getBlobContainerUrl()) client2.listBlobsFlat().iterator().hasNext() @@ -218,49 +221,49 @@ class SASTest extends APISpec { } /* TODO: Fix user delegation tests to run in CI */ - @Ignore + @Requires({ liveMode() }) def "serviceSASSignatureValues network test blob user delegation"() { setup: - byte[] data = "test".getBytes() - String blobName = generateBlobName() - BlockBlobClient bu = cc.getBlockBlobClient(blobName) + def data = "test".getBytes() + def blobName = generateBlobName() + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) - BlobSASPermission permissions = new BlobSASPermission() + def permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true) - OffsetDateTime startTime = getUTCNow().minusDays(1) - OffsetDateTime expiryTime = getUTCNow().plusDays(1) + def startTime = getUTCNow().minusDays(1) + def expiryTime = getUTCNow().plusDays(1) - IPRange ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") - SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP - String cacheControl = "cache" - String contentDisposition = "disposition" - String contentEncoding = "encoding" - String contentLanguage = "language" - String contentType = "type" + def sasProtocol = SASProtocol.HTTPS_HTTP + def cacheControl = "cache" + def contentDisposition = "disposition" + def contentEncoding = "encoding" + def contentLanguage = "language" + def contentType = "type" - UserDelegationKey key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) + def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) when: - String sas = bu.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime, startTime, key.getSignedVersion(), sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) + def sas = bu.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime, startTime, key.getSignedVersion(), sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) then: sas != null when: - BlockBlobClient client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - OutputStream os = new ByteArrayOutputStream() + def os = new ByteArrayOutputStream() client.download(os) - BlobProperties properties = client.getProperties() + def properties = client.getProperties() then: os.toString() == new String(data) @@ -273,37 +276,37 @@ class SASTest extends APISpec { def "BlobServiceSAS network test blob snapshot"() { setup: - String containerName = generateContainerName() - String blobName = generateBlobName() - ContainerClient containerClient = primaryBlobServiceClient.createContainer(containerName) - BlockBlobClient blobClient = containerClient.getBlockBlobClient(blobName) + def containerName = generateContainerName() + def blobName = generateBlobName() + def containerClient = primaryBlobServiceClient.createBlobContainer(containerName) + def blobClient = containerClient.getBlobClient(blobName).getBlockBlobClient() blobClient.upload(defaultInputStream.get(), defaultDataSize) // need something to snapshot - BlockBlobClient snapshotBlob = blobClient.createSnapshot().asBlockBlobClient() - String snapshotId = snapshotBlob.getSnapshotId() + def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(blobClient.createSnapshot()).buildBlockBlobClient() + def snapshotId = snapshotBlob.getSnapshotId() - BlobSASPermission permissions = new BlobSASPermission() + def permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true) - OffsetDateTime startTime = getUTCNow().minusDays(1) - OffsetDateTime expiryTime = getUTCNow().plusDays(1) - IPRange ipRange = new IPRange() + def startTime = getUTCNow().minusDays(1) + def expiryTime = getUTCNow().plusDays(1) + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") - SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP - String cacheControl = "cache" - String contentDisposition = "disposition" - String contentEncoding = "encoding" - String contentLanguage = "language" - String contentType = "type" + def sasProtocol = SASProtocol.HTTPS_HTTP + def cacheControl = "cache" + def contentDisposition = "disposition" + def contentEncoding = "encoding" + def contentLanguage = "language" + def contentType = "type" when: - String sas = snapshotBlob.generateSAS(null, permissions, expiryTime, startTime, null, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) + def sas = snapshotBlob.generateSAS(null, permissions, expiryTime, startTime, null, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) and: - AppendBlobClient client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), containerClient.getContainerUrl().toString(), blobName).asAppendBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), containerClient.getBlobContainerUrl(), blobName).getAppendBlobClient() client.download(new ByteArrayOutputStream()) @@ -311,9 +314,9 @@ class SASTest extends APISpec { thrown(StorageException) when: - AppendBlobClient snapClient = getBlobClient(SASTokenCredential.fromSASTokenString(sas), containerClient.getContainerUrl().toString(), blobName, snapshotId).asAppendBlobClient() + def snapClient = getBlobClient(SASTokenCredential.fromSASTokenString(sas), containerClient.getBlobContainerUrl(), blobName, snapshotId).getAppendBlobClient() - ByteArrayOutputStream data = new ByteArrayOutputStream() + def data = new ByteArrayOutputStream() snapClient.download(data) then: @@ -321,7 +324,7 @@ class SASTest extends APISpec { data.toByteArray() == defaultData.array() and: - BlobProperties properties = snapClient.getProperties() + def properties = snapClient.getProperties() then: properties.getCacheControl() == "cache" @@ -331,44 +334,44 @@ class SASTest extends APISpec { } - @Ignore + @Requires({ liveMode() }) def "serviceSASSignatureValues network test blob snapshot user delegation"() { setup: - byte[] data = "test".getBytes() - String blobName = generateBlobName() - BlockBlobClient bu = cc.getBlockBlobClient(blobName) + def data = "test".getBytes() + def blobName = generateBlobName() + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) - BlockBlobClient snapshotBlob = bu.createSnapshot().asBlockBlobClient() - String snapshotId = snapshotBlob.getSnapshotId() + def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(bu.createSnapshot()).buildBlockBlobClient() + def snapshotId = snapshotBlob.getSnapshotId() - BlobSASPermission permissions = new BlobSASPermission() + def permissions = new BlobSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) - .getDeletePermission(true) + .setDeletePermission(true) .setAddPermission(true) - OffsetDateTime startTime = getUTCNow().minusDays(1) - OffsetDateTime expiryTime = getUTCNow().plusDays(1) + def startTime = getUTCNow().minusDays(1) + def expiryTime = getUTCNow().plusDays(1) - IPRange ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") - SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP - String cacheControl = "cache" - String contentDisposition = "disposition" - String contentEncoding = "encoding" - String contentLanguage = "language" - String contentType = "type" + def sasProtocol = SASProtocol.HTTPS_HTTP + def cacheControl = "cache" + def contentDisposition = "disposition" + def contentEncoding = "encoding" + def contentLanguage = "language" + def contentType = "type" - UserDelegationKey key = getOAuthServiceClient().getUserDelegationKey(startTime, expiryTime) + def key = getOAuthServiceClient().getUserDelegationKey(startTime, expiryTime) when: - String sas = snapshotBlob.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime, startTime, key.getSignedVersion(), sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) + def sas = snapshotBlob.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime, startTime, key.getSignedVersion(), sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) // base blob with snapshot SAS - BlockBlobClient client1 = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def client1 = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName).getBlockBlobClient() client1.download(new ByteArrayOutputStream()) then: @@ -377,8 +380,8 @@ class SASTest extends APISpec { when: // blob snapshot with snapshot SAS - BlockBlobClient client2 = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName, snapshotId).asBlockBlobClient() - OutputStream os = new ByteArrayOutputStream() + def client2 = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() + def os = new ByteArrayOutputStream() client2.download(os) then: @@ -398,22 +401,22 @@ class SASTest extends APISpec { @Ignore def "serviceSASSignatureValues network test container user delegation"() { setup: - ContainerSASPermission permissions = new ContainerSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setAdd(true) - .setList(true) + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true) - OffsetDateTime expiryTime = getUTCNow().plusDays(1) + def expiryTime = getUTCNow().plusDays(1) - UserDelegationKey key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) + def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) when: - String sasWithPermissions = cc.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime) + def sasWithPermissions = cc.generateUserDelegationSAS(key, primaryCredential.getAccountName(), permissions, expiryTime) - ContainerClient client = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithPermissions), cc.getContainerUrl().toString()) + def client = getContainerClient(SASTokenCredential.fromSASTokenString(sasWithPermissions), cc.getBlobContainerUrl()) client.listBlobsFlat().iterator().hasNext() then: @@ -424,7 +427,7 @@ class SASTest extends APISpec { setup: def data = "test".getBytes() def blobName = generateBlobName() - def bu = cc.getBlockBlobClient(blobName) + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) def service = new AccountSASService() @@ -440,7 +443,7 @@ class SASTest extends APISpec { when: def sas = primaryBlobServiceClient.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName).getBlockBlobClient() def os = new ByteArrayOutputStream() client.download(os) @@ -452,7 +455,7 @@ class SASTest extends APISpec { setup: def data = "test".getBytes() def blobName = generateBlobName() - def bu = cc.getBlockBlobClient(blobName) + def bu = cc.getBlobClient(blobName).getBlockBlobClient() bu.upload(new ByteArrayInputStream(data), data.length) def service = new AccountSASService() @@ -468,7 +471,7 @@ class SASTest extends APISpec { when: def sas = primaryBlobServiceClient.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getContainerUrl().toString(), blobName).asBlockBlobClient() + def client = getBlobClient(SASTokenCredential.fromSASTokenString(sas), cc.getBlobContainerUrl(), blobName).getBlockBlobClient() client.delete() then: @@ -491,8 +494,8 @@ class SASTest extends APISpec { when: def sas = primaryBlobServiceClient.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def sc = getServiceClient(SASTokenCredential.fromSASTokenString(sas), primaryBlobServiceClient.getAccountUrl().toString()) - sc.createContainer(generateContainerName()) + def sc = getServiceClient(SASTokenCredential.fromSASTokenString(sas), primaryBlobServiceClient.getAccountUrl()) + sc.createBlobContainer(generateContainerName()) then: thrown(StorageException) @@ -514,8 +517,8 @@ class SASTest extends APISpec { when: def sas = primaryBlobServiceClient.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def sc = getServiceClient(SASTokenCredential.fromSASTokenString(sas), primaryBlobServiceClient.getAccountUrl().toString()) - sc.createContainer(generateContainerName()) + def sc = getServiceClient(SASTokenCredential.fromSASTokenString(sas), primaryBlobServiceClient.getAccountUrl()) + sc.createBlobContainer(generateContainerName()) then: notThrown(StorageException) @@ -530,8 +533,8 @@ class SASTest extends APISpec { @Unroll def "serviceSasSignatures string to sign"() { when: - BlobServiceSASSignatureValues v = new BlobServiceSASSignatureValues() - def p = new BlobSASPermission() + def v = new BlobServiceSasSignatureValues() + def p = new BlobSasPermission() p.setReadPermission(true) v.setPermissions(p.toString()) @@ -542,7 +545,7 @@ class SASTest extends APISpec { v.setCanonicalName("containerName/blobName") .setSnapshotId(snapId) if (ipRange != null) { - def ipR = new IPRange() + def ipR = new IpRange() ipR.setIpMin("ip") v.setIpRange(ipR) } @@ -568,9 +571,9 @@ class SASTest extends APISpec { where: startTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | new IPRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | null | new IpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | null | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\ncontrol\n\n\n\n" null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\ndisposition\n\n\n" @@ -582,9 +585,9 @@ class SASTest extends APISpec { @Unroll def "serviceSasSignatures string to sign user delegation key"() { when: - def v = new BlobServiceSASSignatureValues() + def v = new BlobServiceSasSignatureValues() - def p = new BlobSASPermission() + def p = new BlobSasPermission() p.setReadPermission(true) v.setPermissions(p.toString()) @@ -595,7 +598,7 @@ class SASTest extends APISpec { v.setCanonicalName("containerName/blobName") .setSnapshotId(snapId) if (ipRange != null) { - def ipR = new IPRange() + def ipR = new IpRange() ipR.setIpMin("ip") v.setIpRange(ipR) } @@ -630,9 +633,9 @@ class SASTest extends APISpec { null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new IPRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new IpRange() | null | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\n" null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\ncontrol\n\n\n\n" null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\ndisposition\n\n\n" @@ -641,23 +644,10 @@ class SASTest extends APISpec { null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\ncontainerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\n\n\n\n\n\ntype" } - def "serviceSASSignatureValues canonicalizedResource"() { - setup: - def blobName = generateBlobName() - def accountName = "account" - def bu = cc.getBlockBlobClient(blobName) - - when: - def serviceSASSignatureValues = bu.blockBlobAsyncClient.configureServiceSASSignatureValues(new BlobServiceSASSignatureValues(), accountName) - - then: - serviceSASSignatureValues.getCanonicalName() == "/blob/" + accountName + cc.containerUrl.path + "/" + blobName - } - @Unroll def "serviceSasSignatureValues IA"() { setup: - def v = new BlobServiceSASSignatureValues() + def v = new BlobServiceSasSignatureValues() .setSnapshotId("2018-01-01T00:00:00.0000000Z") .setVersion(version) @@ -665,7 +655,7 @@ class SASTest extends APISpec { v.generateSASQueryParameters((SharedKeyCredential) creds) then: - def e = thrown(IllegalArgumentException) + def e = thrown(NullPointerException) e.getMessage().contains(parameter) where: @@ -677,10 +667,10 @@ class SASTest extends APISpec { @Unroll def "BlobSASPermissions toString"() { setup: - def perms = new BlobSASPermission() + def perms = new BlobSasPermission() .setReadPermission(read) .setWritePermission(write) - .getDeletePermission(delete) + .setDeletePermission(delete) .setCreatePermission(create) .setAddPermission(add) @@ -700,7 +690,7 @@ class SASTest extends APISpec { @Unroll def "BlobSASPermissions parse"() { when: - def perms = BlobSASPermission.parse(permString) + def perms = BlobSasPermission.parse(permString) then: perms.getReadPermission() == read @@ -722,7 +712,7 @@ class SASTest extends APISpec { def "BlobSASPermissions parse IA"() { when: - BlobSASPermission.parse("rwaq") + BlobSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -731,13 +721,13 @@ class SASTest extends APISpec { @Unroll def "ContainerSASPermissions toString"() { setup: - def perms = new ContainerSASPermission() - .setRead(read) - .setWrite(write) - .setDelete(delete) - .setCreate(create) - .setAdd(add) - .setList(list) + def perms = new BlobContainerSasPermission() + .setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setCreatePermission(create) + .setAddPermission(add) + .setListPermission(list) expect: perms.toString() == expectedString @@ -756,15 +746,15 @@ class SASTest extends APISpec { @Unroll def "ContainerSASPermissions parse"() { when: - def perms = ContainerSASPermission.parse(permString) + def perms = BlobContainerSasPermission.parse(permString) then: - perms.getRead() == read - perms.getWrite() == write - perms.getDelete() == delete - perms.getCreate() == create - perms.getAdd() == add - perms.getList() == list + perms.getReadPermission() == read + perms.getWritePermission() == write + perms.getDeletePermission() == delete + perms.getCreatePermission() == create + perms.getAddPermission() == add + perms.getListPermission() == list where: permString || read | write | delete | create | add | list @@ -780,7 +770,7 @@ class SASTest extends APISpec { def "ContainerSASPermissions parse IA"() { when: - ContainerSASPermission.parse("rwaq") + BlobContainerSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -789,7 +779,7 @@ class SASTest extends APISpec { @Unroll def "IPRange toString"() { setup: - def ip = new IPRange() + def ip = new IpRange() .setIpMin(min) .setIpMax(max) @@ -806,7 +796,7 @@ class SASTest extends APISpec { @Unroll def "IPRange parse"() { when: - def ip = IPRange.parse(rangeStr) + def ip = IpRange.parse(rangeStr) then: ip.getIpMin() == min @@ -833,14 +823,14 @@ class SASTest extends APISpec { @Unroll def "ServiceSASSignatureValues assertGenerateOk"() { when: - BlobServiceSASSignatureValues serviceSASSignatureValues = new BlobServiceSASSignatureValues() - serviceSASSignatureValues.setVersion(version) - serviceSASSignatureValues.setCanonicalName(canonicalName) - serviceSASSignatureValues.setExpiryTime(expiryTime) - serviceSASSignatureValues.setPermissions(permissions) - serviceSASSignatureValues.setIdentifier(identifier) - serviceSASSignatureValues.setResource(resource) - serviceSASSignatureValues.setSnapshotId(snapshotId) + def serviceSASSignatureValues = new BlobServiceSasSignatureValues() + .setVersion(version) + .setCanonicalName(canonicalName) + .setExpiryTime(expiryTime) + .setPermissions(permissions) + .setIdentifier(identifier) + .setResource(resource) + .setSnapshotId(snapshotId) if (usingUserDelegation) { serviceSASSignatureValues.generateSASQueryParameters(new UserDelegationKey()) @@ -850,7 +840,7 @@ class SASTest extends APISpec { then: - thrown(IllegalArgumentException) + thrown(NullPointerException) where: usingUserDelegation | version | canonicalName | expiryTime | permissions | identifier | resource | snapshotId @@ -858,7 +848,7 @@ class SASTest extends APISpec { false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | null | null | null | null | null | null false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | null | null | null | null | null false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null - false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | null | new BlobSASPermission().setReadPermission(true).toString() | null | null | null + false | Constants.HeaderConstants.TARGET_STORAGE_VERSION | "containerName/blobName" | null | new BlobSasPermission().setReadPermission(true).toString() | null | null | null false | null | null | null | null | "0000" | "c" | "id" } @@ -881,7 +871,7 @@ class SASTest extends APISpec { .setStartTime(startTime) .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) if (ipRange != null) { - def ipR = new IPRange() + def ipR = new IpRange() ipR.setIpMin("ip") v.setIpRange(ipR) } @@ -895,7 +885,7 @@ class SASTest extends APISpec { where: startTime | ipRange | protocol || expectedStringToSign OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s" + "\nr\nb\no\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | new IPRange() | null || "%s" + "\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | new IpRange() | null || "%s" + "\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" null | null | SASProtocol.HTTPS_ONLY || "%s" + "\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" } @@ -913,7 +903,7 @@ class SASTest extends APISpec { v.generateSASQueryParameters(creds) then: - def e = thrown(IllegalArgumentException) + def e = thrown(NullPointerException) e.getMessage().contains(parameter) where: @@ -1046,7 +1036,7 @@ class SASTest extends APISpec { .setContainerName("container") .setBlobName("blob") .setSnapshot("snapshot") - def sasValues = new BlobServiceSASSignatureValues() + def sasValues = new BlobServiceSasSignatureValues() .setPermissions("r") .setCanonicalName("/containerName/blobName") .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1067,12 +1057,12 @@ class SASTest extends APISpec { def "URLParser"() { when: - def parts = URLParser.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) + def parts = BlobURLParts.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) then: parts.getScheme() == "http" parts.getHost() == "host" - parts.getContainerName() == "container" + parts.getBlobContainerName() == "container" parts.getBlobName() == "blob" parts.getSnapshot() == "snapshot" parts.getSasQueryParameters().getPermissions() == "r" diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java index 07f653a09522..e6ddd5cbcd37 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java @@ -4,8 +4,10 @@ package com.azure.storage.blob; import com.azure.core.http.HttpClient; +import com.azure.storage.blob.models.BlobContainerItem; import com.azure.storage.blob.models.BlobItem; -import com.azure.storage.blob.models.ContainerItem; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.credentials.SharedKeyCredential; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -34,25 +36,25 @@ public void sample() throws IOException { .buildClient(); // create 5 containers - ContainerClient containerClient = null; + BlobContainerClient blobContainerClient = null; for (int i = 0; i < 5; i++) { String name = "uxtesting" + UUID.randomUUID(); - containerClient = serviceClient.getContainerClient(name); - containerClient.create(); + blobContainerClient = serviceClient.getBlobContainerClient(name); + blobContainerClient.create(); System.out.println("Created container: " + name); } System.out.println(); // list containers in account System.out.println("Listing containers in account:"); - for (ContainerItem item : serviceClient.listContainers()) { + for (BlobContainerItem item : serviceClient.listBlobContainers()) { System.out.println(item.getName()); } System.out.println(); // in the last container, create 5 blobs for (int i = 0; i < 5; i++) { - BlockBlobClient blobClient = containerClient.getBlockBlobClient("testblob-" + i); + BlockBlobClient blobClient = blobContainerClient.getBlobClient("testblob-" + i).getBlockBlobClient(); ByteArrayInputStream testdata = new ByteArrayInputStream(("test data" + i).getBytes(StandardCharsets.UTF_8)); blobClient.upload(testdata, testdata.available()); @@ -62,23 +64,23 @@ public void sample() throws IOException { // list blobs and download results System.out.println("Listing/downloading blobs:"); - for (BlobItem item : containerClient.listBlobsFlat()) { + for (BlobItem item : blobContainerClient.listBlobsFlat()) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); - containerClient.getBlobClient(item.getName()).download(stream); + blobContainerClient.getBlobClient(item.getName()).download(stream); System.out.println(item.getName() + ": " + new String(stream.toByteArray())); } System.out.println(); // cleanup - for (ContainerItem item : serviceClient.listContainers()) { - containerClient = serviceClient.getContainerClient(item.getName()); - containerClient.delete(); + for (BlobContainerItem item : serviceClient.listBlobContainers()) { + blobContainerClient = serviceClient.getBlobContainerClient(item.getName()); + blobContainerClient.delete(); System.out.println("Deleted container: " + item.getName()); } } //@Test - public void asyncSample() throws IOException { + public void asyncSample() { // get service client BlobServiceAsyncClient serviceClient = new BlobServiceClientBuilder().endpoint(ACCOUNT_ENDPOINT) .credential(new SharedKeyCredential(ACCOUNT_NAME, ACCOUNT_KEY)) @@ -86,24 +88,24 @@ public void asyncSample() throws IOException { .buildAsyncClient(); // create 5 containers - ContainerAsyncClient containerClient = null; + BlobContainerAsyncClient containerClient = null; Mono createContainerTask = Mono.empty(); for (int i = 0; i < 5; i++) { String name = "uxtesting" + UUID.randomUUID(); - containerClient = serviceClient.getContainerAsyncClient(name); + containerClient = serviceClient.getBlobContainerAsyncClient(name); createContainerTask = createContainerTask.and(containerClient.create().then(Mono.defer(() -> { System.out.println("Created container: " + name); return Mono.empty(); }))); } - ContainerAsyncClient finalContainerClient = containerClient; // final variable for lambda usage + BlobContainerAsyncClient finalContainerClient = containerClient; // final variable for lambda usage createContainerTask // list containers .thenMany(Flux.defer(() -> { System.out.println("Listing containers in account:"); - return serviceClient.listContainers() + return serviceClient.listBlobContainers() .flatMap(containerItem -> { System.out.println(containerItem.getName()); return Mono.empty(); @@ -113,7 +115,7 @@ public void asyncSample() throws IOException { .then(Mono.defer(() -> { Mono finished = Mono.empty(); for (int i = 0; i < 5; i++) { - BlockBlobAsyncClient blobClient = finalContainerClient.getBlockBlobAsyncClient("testblob-" + i); + BlockBlobAsyncClient blobClient = finalContainerClient.getBlobAsyncClient("testblob-" + i).getBlockBlobAsyncClient(); byte[] message = ("test data" + i).getBytes(StandardCharsets.UTF_8); Flux testdata = Flux.just(ByteBuffer.wrap(message)); @@ -136,13 +138,12 @@ public void asyncSample() throws IOException { .flatMap(listItem -> finalContainerClient.getBlobAsyncClient(listItem.getName()) .download() - .flatMapMany(flux -> flux) .map(buffer -> new String(buffer.array())) .doOnNext(string -> System.out.println(listItem.getName() + ": " + string))) // cleanup - .thenMany(serviceClient.listContainers()) + .thenMany(serviceClient.listBlobContainers()) .flatMap(containerItem -> serviceClient - .getContainerAsyncClient(containerItem.getName()) + .getBlobContainerAsyncClient(containerItem.getName()) .delete()) .blockLast(); } @@ -165,11 +166,11 @@ public void uploadDownloadFromFile() throws IOException { .buildClient(); // make container - ContainerClient containerClient = serviceClient.getContainerClient("uxstudy" + UUID.randomUUID()); - containerClient.create(); + BlobContainerClient blobContainerClient = serviceClient.getBlobContainerClient("uxstudy" + UUID.randomUUID()); + blobContainerClient.create(); // upload data - BlockBlobClient blobClient = containerClient.getBlockBlobClient("testblob_" + UUID.randomUUID()); + BlobClient blobClient = blobContainerClient.getBlobClient("testblob_" + UUID.randomUUID()); blobClient.uploadFromFile(startFile.getAbsolutePath()); // download data @@ -195,12 +196,12 @@ public void uploadDownloadFromFileAsync() throws IOException { .buildAsyncClient(); // make container - ContainerAsyncClient containerClient = serviceClient.getContainerAsyncClient("uxstudy" + UUID.randomUUID()); + BlobContainerAsyncClient containerClient = serviceClient.getBlobContainerAsyncClient("uxstudy" + UUID.randomUUID()); containerClient.create() // upload data .then(Mono.defer(() -> { - BlockBlobAsyncClient blobClient = containerClient.getBlockBlobAsyncClient("testblob_" + UUID.randomUUID()); + BlobAsyncClient blobClient = containerClient.getBlobAsyncClient("testblob_" + UUID.randomUUID()); return blobClient.uploadFromFile(startFile.getAbsolutePath()) .then(Mono.just(blobClient)); })) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy index 01689019b6db..bf77476d5d4d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy @@ -5,12 +5,12 @@ package com.azure.storage.blob import com.azure.core.http.HttpHeaders import com.azure.core.http.rest.Response -import com.azure.storage.blob.models.ContainerItem -import com.azure.storage.blob.models.ContainerListDetails +import com.azure.storage.blob.models.BlobContainerItem +import com.azure.storage.blob.models.BlobContainerListDetails import com.azure.storage.blob.models.CorsRule -import com.azure.storage.blob.models.ListContainersOptions +import com.azure.storage.blob.models.ListBlobContainersOptions import com.azure.storage.blob.models.Logging -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.Metrics import com.azure.storage.blob.models.RetentionPolicy import com.azure.storage.blob.models.StaticWebsite @@ -60,10 +60,10 @@ class ServiceAPITest extends APISpec { def "List containers"() { when: def response = - primaryBlobServiceClient.listContainers(new ListContainersOptions().setPrefix(containerPrefix + testName), null) + primaryBlobServiceClient.listBlobContainers(new ListBlobContainersOptions().setPrefix(containerPrefix + testName), null) then: - for (ContainerItem c : response) { + for (BlobContainerItem c : response) { assert c.getName().startsWith(containerPrefix) assert c.getProperties().getLastModified() != null assert c.getProperties().getEtag() != null @@ -78,7 +78,7 @@ class ServiceAPITest extends APISpec { def "List containers min"() { when: - primaryBlobServiceClient.listContainers().iterator().hasNext() + primaryBlobServiceClient.listBlobContainers().iterator().hasNext() then: notThrown(StorageException) @@ -87,10 +87,10 @@ class ServiceAPITest extends APISpec { def "List containers marker"() { setup: for (int i = 0; i < 10; i++) { - primaryBlobServiceClient.createContainer(generateContainerName()) + primaryBlobServiceClient.createBlobContainer(generateContainerName()) } - Iterator listResponse = primaryBlobServiceClient.listContainers().iterator() + Iterator listResponse = primaryBlobServiceClient.listBlobContainers().iterator() String firstContainerName = listResponse.next().getName() expect: @@ -100,13 +100,13 @@ class ServiceAPITest extends APISpec { def "List containers details"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() metadata.put("foo", "bar") - cc = primaryBlobServiceClient.createContainerWithResponse("aaa" + generateContainerName(), metadata, null, null).getValue() + cc = primaryBlobServiceClient.createBlobContainerWithResponse("aaa" + generateContainerName(), metadata, null, null).getValue() expect: - primaryBlobServiceClient.listContainers(new ListContainersOptions() - .setDetails(new ContainerListDetails().setMetadata(true)) + primaryBlobServiceClient.listBlobContainers(new ListBlobContainersOptions() + .setDetails(new BlobContainerListDetails().setRetrieveMetadata(true)) .setPrefix("aaa" + containerPrefix), null) .iterator().next().getMetadata() == metadata @@ -119,13 +119,13 @@ class ServiceAPITest extends APISpec { def NUM_CONTAINERS = 5 def PAGE_RESULTS = 3 - def containers = [] as Collection + def containers = [] as Collection for (i in (1..NUM_CONTAINERS)) { - containers << primaryBlobServiceClient.createContainer(generateContainerName()) + containers << primaryBlobServiceClient.createBlobContainer(generateContainerName()) } expect: - primaryBlobServiceClient.listContainers(new ListContainersOptions().setMaxResults(PAGE_RESULTS), null) + primaryBlobServiceClient.listBlobContainers(new ListBlobContainersOptions().setMaxResults(PAGE_RESULTS), null) .iterableByPage().iterator().next().getValue().size() == PAGE_RESULTS cleanup: @@ -134,7 +134,7 @@ class ServiceAPITest extends APISpec { def "List containers error"() { when: - primaryBlobServiceClient.listContainers().streamByPage("garbage continuation token").count() + primaryBlobServiceClient.listBlobContainers().streamByPage("garbage continuation token").count() then: thrown(StorageException) @@ -145,13 +145,13 @@ class ServiceAPITest extends APISpec { def NUM_CONTAINERS = 5 def PAGE_RESULTS = 3 - def containers = [] as Collection + def containers = [] as Collection for (i in (1..NUM_CONTAINERS)) { - containers << primaryBlobServiceClient.createContainer(generateContainerName()) + containers << primaryBlobServiceClient.createBlobContainer(generateContainerName()) } when: "Consume results by page" - primaryBlobServiceClient.listContainers(new ListContainersOptions().setMaxResults(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() + primaryBlobServiceClient.listBlobContainers(new ListBlobContainersOptions().setMaxResults(PAGE_RESULTS), Duration.ofSeconds(10)).streamByPage().count() then: "Still have paging functionality" notThrown(Exception) @@ -329,7 +329,7 @@ class ServiceAPITest extends APISpec { where: start | expiry || exception - null | null || IllegalArgumentException + null | null || NullPointerException OffsetDateTime.now() | OffsetDateTime.now().minusDays(1) || IllegalArgumentException } @@ -383,7 +383,7 @@ class ServiceAPITest extends APISpec { def "Get account info error"() { when: - BlobServiceClient serviceURL = getServiceClient((SharedKeyCredential) null, primaryBlobServiceClient.getAccountUrl().toString()) + BlobServiceClient serviceURL = getServiceClient((SharedKeyCredential) null, primaryBlobServiceClient.getAccountUrl()) serviceURL.getAccountInfo() then: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy similarity index 84% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index 422b34747d7d..31e1c30fdbff 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized -import com.azure.core.http.rest.Response import com.azure.core.exception.UnexpectedLengthException +import com.azure.core.util.Context +import com.azure.storage.blob.APISpec import com.azure.storage.blob.models.AppendBlobAccessConditions -import com.azure.storage.blob.models.AppendBlobItem import com.azure.storage.blob.models.AppendPositionAccessConditions import com.azure.storage.blob.models.BlobAccessConditions import com.azure.storage.blob.models.BlobHTTPHeaders import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.SourceModifiedAccessConditions @@ -27,13 +27,13 @@ class AppendBlobAPITest extends APISpec { def setup() { blobName = generateBlobName() - bc = cc.getAppendBlobClient(blobName) + bc = cc.getBlobClient(blobName).getAppendBlobClient() bc.create() } def "Create defaults"() { when: - Response createResponse = bc.createWithResponse(null, null, null, null, null) + def createResponse = bc.createWithResponse(null, null, null, null, null) then: createResponse.getStatusCode() == 201 @@ -49,9 +49,8 @@ class AppendBlobAPITest extends APISpec { def "Create error"() { when: - bc.create(null, null, - new BlobAccessConditions().setModifiedAccessConditions(new ModifiedAccessConditions().setIfMatch("garbage")), - null) + bc.createWithResponse(null, null, new BlobAccessConditions() + .setModifiedAccessConditions(new ModifiedAccessConditions().setIfMatch("garbage")), null, Context.NONE) then: thrown(StorageException) @@ -60,7 +59,7 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Create headers"() { setup: - BlobHTTPHeaders headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + def headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -69,7 +68,7 @@ class AppendBlobAPITest extends APISpec { when: bc.createWithResponse(headers, null, null, null, null) - Response response = bc.getPropertiesWithResponse(null, null, null) + def response = bc.getPropertiesWithResponse(null, null, null) // If the value isn't set the service will automatically set it contentType = (contentType == null) ? "application/octet-stream" : contentType @@ -86,7 +85,7 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Create metadata"() { setup: - def metadata = new Metadata() + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -95,7 +94,7 @@ class AppendBlobAPITest extends APISpec { } when: - bc.create(null, metadata, null, null) + bc.createWithResponse(null, metadata, null, null, Context.NONE) def response = bc.getProperties() then: @@ -112,7 +111,7 @@ class AppendBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) @@ -138,7 +137,7 @@ class AppendBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions().setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) @@ -146,7 +145,7 @@ class AppendBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch)) when: - bc.create(null, null, bac, null) + bc.createWithResponse(null, null, bac, null, Context.NONE) then: thrown(StorageException) @@ -162,10 +161,10 @@ class AppendBlobAPITest extends APISpec { def "Append block defaults"() { setup: - Response appendResponse = bc.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null) + def appendResponse = bc.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null) when: - ByteArrayOutputStream downloadStream = new ByteArrayOutputStream() + def downloadStream = new ByteArrayOutputStream() bc.download(downloadStream) then: @@ -219,7 +218,7 @@ class AppendBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - AppendBlobAccessConditions bac = new AppendBlobAccessConditions() + def bac = new AppendBlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(appendPosE) @@ -252,7 +251,7 @@ class AppendBlobAPITest extends APISpec { noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - AppendBlobAccessConditions bac = new AppendBlobAccessConditions() + def bac = new AppendBlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setAppendPositionAccessConditions(new AppendPositionAccessConditions() .setAppendPosition(appendPosE) @@ -286,7 +285,7 @@ class AppendBlobAPITest extends APISpec { def "Append block error"() { setup: - bc = cc.getAppendBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getAppendBlobClient() when: bc.appendBlock(defaultInputStream.get(), defaultDataSize) @@ -298,16 +297,16 @@ class AppendBlobAPITest extends APISpec { def "Append block from URL min"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - byte[] data = getRandomByteArray(1024) + def data = getRandomByteArray(1024) bc.appendBlock(new ByteArrayInputStream(data), data.length) - AppendBlobClient destURL = cc.getAppendBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() destURL.create() - BlobRange blobRange = new BlobRange(0, (long) PageBlobClient.PAGE_BYTES) + def blobRange = new BlobRange(0, (long) PageBlobClient.PAGE_BYTES) when: - Response response = destURL.appendBlockFromUrlWithResponse(bc.getBlobUrl(), blobRange, null, null, null, null, null) + def response = destURL.appendBlockFromUrlWithResponse(new URL(bc.getBlobUrl()), blobRange, null, null, null, null, null) then: response.getStatusCode() == 201 @@ -317,17 +316,17 @@ class AppendBlobAPITest extends APISpec { def "Append block from URL range"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - byte[] data = getRandomByteArray(4 * 1024) + def data = getRandomByteArray(4 * 1024) bc.appendBlock(new ByteArrayInputStream(data), data.length) - AppendBlobClient destURL = cc.getAppendBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() destURL.create() when: - destURL.appendBlockFromUrl(bc.getBlobUrl(), new BlobRange(2 * 1024, 1024)) + destURL.appendBlockFromUrl(new URL(bc.getBlobUrl()), new BlobRange(2 * 1024, 1024)) then: - ByteArrayOutputStream downloadStream = new ByteArrayOutputStream(1024) + def downloadStream = new ByteArrayOutputStream(1024) destURL.download(downloadStream) downloadStream.toByteArray() == Arrays.copyOfRange(data, 2 * 1024, 3 * 1024) } @@ -335,15 +334,15 @@ class AppendBlobAPITest extends APISpec { def "Append block from URL MD5"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - byte[] data = getRandomByteArray(1024) + def data = getRandomByteArray(1024) bc.appendBlock(new ByteArrayInputStream(data), data.length) - AppendBlobClient destURL = cc.getAppendBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() destURL.create() when: - destURL.appendBlockFromUrl(bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest(data), - null, null, null) + destURL.appendBlockFromUrlWithResponse(new URL(bc.getBlobUrl()), null, MessageDigest.getInstance("MD5").digest(data), + null, null, null, Context.NONE) then: notThrown(StorageException) @@ -352,15 +351,15 @@ class AppendBlobAPITest extends APISpec { def "Append block from URL MD5 fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - byte[] data = getRandomByteArray(1024) + def data = getRandomByteArray(1024) bc.appendBlock(new ByteArrayInputStream(data), data.length) - def destURL = cc.getAppendBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() destURL.create() when: - destURL.appendBlockFromUrl(bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest("garbage".getBytes()), - null, null, null) + destURL.appendBlockFromUrlWithResponse(new URL(bc.getBlobUrl()), null, MessageDigest.getInstance("MD5").digest("garbage".getBytes()), + null, null, null, Context.NONE) then: thrown(StorageException) @@ -383,12 +382,12 @@ class AppendBlobAPITest extends APISpec { .setIfMatch(match) .setIfNoneMatch(noneMatch)) - def sourceURL = cc.getAppendBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() expect: - bc.appendBlockFromUrlWithResponse(sourceURL.getBlobUrl(), null, null, bac, null, null, null).getStatusCode() == 201 + bc.appendBlockFromUrlWithResponse(new URL(sourceURL.getBlobUrl()), null, null, bac, null, null, null).getStatusCode() == 201 where: modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE @@ -420,12 +419,12 @@ class AppendBlobAPITest extends APISpec { .setIfMatch(match) .setIfNoneMatch(noneMatch)) - def sourceURL = cc.getAppendBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() when: - bc.appendBlockFromUrl(sourceURL.getBlobUrl(), null, null, bac, null, null) + bc.appendBlockFromUrlWithResponse(new URL(sourceURL.getBlobUrl()), null, null, bac, null, null, Context.NONE) then: thrown(StorageException) @@ -446,7 +445,7 @@ class AppendBlobAPITest extends APISpec { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getAppendBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() @@ -457,7 +456,7 @@ class AppendBlobAPITest extends APISpec { .setSourceIfNoneMatch(sourceIfNoneMatch) expect: - bc.appendBlockFromUrlWithResponse(sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.appendBlockFromUrlWithResponse(new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, null).getStatusCode() == 201 where: sourceIfModifiedSince | sourceIfUnmodifiedSince | sourceIfMatch | sourceIfNoneMatch @@ -473,7 +472,7 @@ class AppendBlobAPITest extends APISpec { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getAppendBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() sourceURL.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null).getStatusCode() @@ -484,7 +483,7 @@ class AppendBlobAPITest extends APISpec { .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: - bc.appendBlockFromUrl(sourceURL.getBlobUrl(), null, null, null, smac, null) + bc.appendBlockFromUrlWithResponse(new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, Context.NONE) then: thrown(StorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy similarity index 82% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 5fea49611a33..202fedb60c96 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -1,27 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized import com.azure.core.exception.UnexpectedLengthException -import com.azure.core.http.HttpHeaders import com.azure.core.http.HttpMethod import com.azure.core.http.HttpPipelineCallContext import com.azure.core.http.HttpPipelineNextPolicy import com.azure.core.http.HttpRequest import com.azure.core.http.policy.HttpLogDetailLevel import com.azure.core.http.policy.HttpPipelinePolicy -import com.azure.core.http.rest.Response import com.azure.core.util.Context +import com.azure.storage.blob.APISpec +import com.azure.storage.blob.BlobAsyncClient +import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.BlobAccessConditions import com.azure.storage.blob.models.BlobHTTPHeaders import com.azure.storage.blob.models.BlobRange -import com.azure.storage.blob.models.BlockItem import com.azure.storage.blob.models.BlockListType import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.ModifiedAccessConditions +import com.azure.storage.blob.models.ParallelTransferOptions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.SourceModifiedAccessConditions import com.azure.storage.blob.models.StorageErrorCode @@ -40,20 +41,22 @@ import java.security.MessageDigest class BlockBlobAPITest extends APISpec { BlockBlobClient bc BlockBlobAsyncClient bac + BlobAsyncClient blobac String blobName def setup() { blobName = generateBlobName() - bc = cc.getBlockBlobClient(blobName) + bc = cc.getBlobClient(blobName).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) - bac = ccAsync.getBlockBlobAsyncClient(generateBlobName()) + blobac = ccAsync.getBlobAsyncClient(generateBlobName()) + bac = blobac.getBlockBlobAsyncClient() bac.upload(defaultFlux, defaultDataSize) } def "Stage block"() { setup: def response = bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, null, null, null) - HttpHeaders headers = response.getHeaders() + def headers = response.getHeaders() expect: response.getStatusCode() == 201 @@ -75,18 +78,18 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Stage block illegal arguments"() { when: - String blockID = (getBlockId) ? getBlockID() : null + def blockID = (getBlockId) ? getBlockID() : null bc.stageBlock(blockID, data == null ? null : data.get(), dataSize) then: thrown(exceptionType) where: - getBlockId | data | dataSize | exceptionType - false | defaultInputStream | defaultDataSize | StorageException - true | null | defaultDataSize | NullPointerException - true | defaultInputStream | defaultDataSize + 1 | UnexpectedLengthException - true | defaultInputStream | defaultDataSize - 1 | UnexpectedLengthException + getBlockId | data | dataSize | exceptionType + false | defaultInputStream | defaultDataSize | StorageException + true | null | defaultDataSize | NullPointerException + true | defaultInputStream | defaultDataSize + 1 | UnexpectedLengthException + true | defaultInputStream | defaultDataSize - 1 | UnexpectedLengthException } def "Stage block empty body"() { @@ -107,7 +110,7 @@ class BlockBlobAPITest extends APISpec { def "Stage block lease"() { setup: - String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) + def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) expect: bc.stageBlockWithResponse(getBlockID(), defaultInputStream.get(), defaultDataSize, new LeaseAccessConditions().setLeaseId(leaseID), @@ -129,7 +132,7 @@ class BlockBlobAPITest extends APISpec { def "Stage block error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.stageBlock("id", defaultInputStream.get(), defaultDataSize) @@ -141,11 +144,11 @@ class BlockBlobAPITest extends APISpec { def "Stage block from url"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() def blockID = getBlockID() when: - def headers = bu2.stageBlockFromURLWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getHeaders() + def headers = bu2.stageBlockFromURLWithResponse(blockID, new URL(bc.getBlobUrl()), null, null, null, null, null, null).getHeaders() then: headers.getValue("x-ms-request-id") != null @@ -170,17 +173,17 @@ class BlockBlobAPITest extends APISpec { def "Stage block from url min"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def bu2 = cc.getBlockBlobClient(generateBlobName()) + def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() def blockID = getBlockID() expect: - bu2.stageBlockFromURLWithResponse(blockID, bc.getBlobUrl(), null, null, null, null, null, null).getStatusCode() == 201 + bu2.stageBlockFromURLWithResponse(blockID, new URL(bc.getBlobUrl()), null, null, null, null, null, null).getStatusCode() == 201 } @Unroll def "Stage block from URL IA"() { when: - String blockID = (getBlockId) ? getBlockID() : null + def blockID = (getBlockId) ? getBlockID() : null bc.stageBlockFromURL(blockID, sourceURL, null) then: @@ -195,25 +198,24 @@ class BlockBlobAPITest extends APISpec { def "Stage block from URL range"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getBlockBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURL(getBlockID(), bc.getBlobUrl(), new BlobRange(2, 3)) - Iterator uncommittedBlock = destURL.listBlocks(BlockListType.UNCOMMITTED).iterator() + destURL.stageBlockFromURL(getBlockID(), new URL(bc.getBlobUrl()), new BlobRange(2, 3)) + def blockList = destURL.listBlocks(BlockListType.UNCOMMITTED) then: - uncommittedBlock.hasNext() - uncommittedBlock.hasNext() - uncommittedBlock.hasNext() + blockList.getCommittedBlocks().size() == 0 + blockList.getUncommittedBlocks().size() == 1 } def "Stage block from URL MD5"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getBlockBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, + destURL.stageBlockFromURLWithResponse(getBlockID(), new URL(bc.getBlobUrl()), null, MessageDigest.getInstance("MD5").digest(defaultData.array()), null, null, null, null) then: @@ -223,10 +225,10 @@ class BlockBlobAPITest extends APISpec { def "Stage block from URL MD5 fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getBlockBlobClient(generateBlobName()) + def destURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: - destURL.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, "garbage".getBytes(), + destURL.stageBlockFromURLWithResponse(getBlockID(), new URL(bc.getBlobUrl()), null, "garbage".getBytes(), null, null, null, null) then: @@ -239,7 +241,7 @@ class BlockBlobAPITest extends APISpec { def lease = new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, receivedLeaseID)) when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, lease, null, null, null) + bc.stageBlockFromURLWithResponse(getBlockID(), new URL(bc.getBlobUrl()), null, null, lease, null, null, null) then: notThrown(StorageException) @@ -251,7 +253,7 @@ class BlockBlobAPITest extends APISpec { def lease = new LeaseAccessConditions().setLeaseId("garbage") when: - bc.stageBlockFromURLWithResponse(getBlockID(), bc.getBlobUrl(), null, null, lease, null, null, null) + bc.stageBlockFromURLWithResponse(getBlockID(), new URL(bc.getBlobUrl()), null, null, lease, null, null, null) then: thrown(StorageException) @@ -259,10 +261,12 @@ class BlockBlobAPITest extends APISpec { def "Stage block from URL error"() { setup: - bc = primaryBlobServiceClient.getContainerClient(generateContainerName()).getBlockBlobClient(generateBlobName()) + bc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) + .getBlobClient(generateBlobName()) + .getBlockBlobClient() when: - bc.stageBlockFromURL(getBlockID(), bc.getBlobUrl(), null) + bc.stageBlockFromURL(getBlockID(), new URL(bc.getBlobUrl()), null) then: thrown(StorageException) @@ -274,7 +278,7 @@ class BlockBlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def blockID = getBlockID() - def sourceURL = cc.getBlockBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() sourceURL.upload(defaultInputStream.get(), defaultDataSize) sourceIfMatch = setupBlobMatchCondition(sourceURL, sourceIfMatch) @@ -285,7 +289,7 @@ class BlockBlobAPITest extends APISpec { .setSourceIfNoneMatch(sourceIfNoneMatch) expect: - bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.stageBlockFromURLWithResponse(blockID, new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, null).getStatusCode() == 201 where: sourceIfModifiedSince | sourceIfUnmodifiedSince | sourceIfMatch | sourceIfNoneMatch @@ -302,7 +306,7 @@ class BlockBlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def blockID = getBlockID() - def sourceURL = cc.getBlockBlobClient(generateBlobName()) + def sourceURL = cc.getBlobClient(generateBlobName()).getBlockBlobClient() sourceURL.upload(defaultInputStream.get(), defaultDataSize) def smac = new SourceModifiedAccessConditions() @@ -312,7 +316,7 @@ class BlockBlobAPITest extends APISpec { .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: - bc.stageBlockFromURLWithResponse(blockID, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.stageBlockFromURLWithResponse(blockID, new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, null).getStatusCode() == 201 then: thrown(StorageException) @@ -327,10 +331,9 @@ class BlockBlobAPITest extends APISpec { def "Commit block list"() { setup: - String blockID = getBlockID() + def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - ArrayList ids = new ArrayList<>() - ids.add(blockID) + def ids = [ blockID ] as List when: def response = bc.commitBlockListWithResponse(ids, null, null, null, null, null, null) @@ -345,10 +348,9 @@ class BlockBlobAPITest extends APISpec { def "Commit block list min"() { setup: - String blockID = getBlockID() + def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - ArrayList ids = new ArrayList<>() - ids.add(blockID) + def ids = [ blockID ] as List expect: bc.commitBlockList(ids) != null @@ -362,11 +364,10 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Commit block list headers"() { setup: - String blockID = getBlockID() + def blockID = getBlockID() bc.stageBlock(blockID, defaultInputStream.get(), defaultDataSize) - ArrayList ids = new ArrayList<>() - ids.add(blockID) - BlobHTTPHeaders headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + def ids = [ blockID ] as List + def headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -392,7 +393,7 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Commit block list metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -419,7 +420,7 @@ class BlockBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -446,7 +447,7 @@ class BlockBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -472,7 +473,7 @@ class BlockBlobAPITest extends APISpec { def "Commit block list error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.commitBlockListWithResponse(new ArrayList(), null, null, null, @@ -545,7 +546,7 @@ class BlockBlobAPITest extends APISpec { def "Get block list lease"() { setup: - String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) + def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) when: bc.listBlocksWithResponse(BlockListType.ALL, new LeaseAccessConditions().setLeaseId(leaseID), null, Context.NONE) @@ -568,7 +569,7 @@ class BlockBlobAPITest extends APISpec { def "Get block list error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.listBlocks(BlockListType.ALL).iterator().hasNext() @@ -594,38 +595,34 @@ class BlockBlobAPITest extends APISpec { /* Upload From File Tests: Need to run on liveMode only since blockBlob wil generate a `UUID.randomUUID()` for getBlockID that will change every time test is run */ - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Upload from file"() { given: - URL resource = this.getClass().getResource( '/testfiles/uploadFromFileTestData.txt') - String file = resource.path - String content = resource.text + def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) def outStream = new ByteArrayOutputStream() when: - bc.uploadFromFile(file) + bc.uploadFromFile(file.getAbsolutePath()) then: bc.download(outStream) - outStream.toByteArray() == content.getBytes(StandardCharsets.UTF_8) + outStream.toByteArray() == new Scanner(file).useDelimiter("\\z").next().getBytes(StandardCharsets.UTF_8) } - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Upload from file with metadata"() { given: - Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); - URL resource = this.getClass().getResource( '/testfiles/uploadFromFileTestData.txt') - String file = resource.path - String content = resource.text + def metadata = Collections.singletonMap("metadata", "value") + def file = new File(this.getClass().getResource("/testfiles/uploadFromFileTestData.txt").getPath()) def outStream = new ByteArrayOutputStream() when: - bc.uploadFromFile(file, null, metadata, null, null, null); + bc.uploadFromFile(file.getAbsolutePath(), null, null, metadata, null, null, null) then: - BlobProperties properties = bc.getProperties() - Metadata returnedMetadata = properties.metadata; - metadata.equals(returnedMetadata); + metadata == bc.getProperties().getMetadata() + bc.download(outStream) + outStream.toByteArray() == new Scanner(file).useDelimiter("\\z").next().getBytes(StandardCharsets.UTF_8) } def "Upload min"() { @@ -669,7 +666,7 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Upload headers"() { setup: - BlobHTTPHeaders headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + def headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -696,7 +693,7 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Upload metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -723,7 +720,7 @@ class BlockBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -750,7 +747,7 @@ class BlockBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -777,7 +774,7 @@ class BlockBlobAPITest extends APISpec { def "Upload error"() { setup: - bc = cc.getBlockBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, @@ -790,7 +787,7 @@ class BlockBlobAPITest extends APISpec { def "Upload with tier"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: bc.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, AccessTier.COOL, null, null, null) @@ -801,17 +798,19 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Async buffered upload"() { when: def data = getRandomData(dataSize) - bac.upload(Flux.just(data), bufferSize, numBuffs).block() + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(bufferSize).setNumBuffers(numBuffs) + bac.upload(Flux.just(data), parallelTransferOptions).block() data.position(0) then: // Due to memory issues, this check only runs on small to medium sized data sets. if (dataSize < 100 * 1024 * 1024) { - assert collectBytesInBuffer(bac.download().block()).block() == data + assert collectBytesInBuffer(bac.download()).block() == data } bac.listBlocks(BlockListType.ALL).block().getCommittedBlocks().size() == blockCount @@ -842,19 +841,21 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Buffered upload chunked source"() { /* This test should validate that the upload should work regardless of what format the passed data is in because it will be chunked appropriately. */ setup: - List dataList = new ArrayList<>() + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(bufferSize).setNumBuffers(numBuffers) + def dataList = [] as List dataSizeList.each { size -> dataList.add(getRandomData(size)) } - bac.upload(Flux.fromIterable(dataList), bufferSize, numBuffers).block() + bac.upload(Flux.fromIterable(dataList), parallelTransferOptions).block() expect: - compareListToBuffer(dataList, collectBytesInBuffer(bac.download().block()).block()) + compareListToBuffer(dataList, collectBytesInBuffer(bac.download()).block()) bac.listBlocks(BlockListType.ALL).block().getCommittedBlocks().size() == blockCount where: @@ -868,7 +869,9 @@ class BlockBlobAPITest extends APISpec { def "Buffered upload illegal arguments null"() { when: - bac.upload(null, 4, 4) + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(4).setNumBuffers(4) + blobac.upload(null, parallelTransferOptions) then: thrown(NullPointerException) @@ -877,7 +880,9 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Buffered upload illegal args out of bounds"() { when: - bac.upload(Flux.just(defaultData), bufferSize, numBuffs) + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(bufferSize).setNumBuffers(numBuffs) + blobac.upload(Flux.just(defaultData), parallelTransferOptions) then: thrown(IllegalArgumentException) @@ -891,10 +896,12 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Buffered upload headers"() { when: - bac.uploadWithResponse(defaultFlux, 10, 2, new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(10) + blobac.uploadWithResponse(defaultFlux, parallelTransferOptions, new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -916,10 +923,10 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Buffered upload metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = [] as Map if (key1 != null) { metadata.put(key1, value1) } @@ -928,8 +935,10 @@ class BlockBlobAPITest extends APISpec { } when: - bac.uploadWithResponse(Flux.just(getRandomData(10)), 10, 10, null, metadata, null, null).block() - Response response = bac.getPropertiesWithResponse(null).block() + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(10).setNumBuffers(10) + blobac.uploadWithResponse(Flux.just(getRandomData(10)), parallelTransferOptions, null, metadata, null, null).block() + def response = bac.getPropertiesWithResponse(null).block() then: response.getStatusCode() == 200 @@ -943,7 +952,7 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Buffered upload AC"() { setup: bac.upload(defaultFlux, defaultDataSize).block() @@ -955,13 +964,15 @@ class BlockBlobAPITest extends APISpec { .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) expect: - bac.uploadWithResponse(Flux.just(getRandomData(10)), 10, 2, null, null, null, accessConditions).block().getStatusCode() == 201 + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(10) + blobac.uploadWithResponse(Flux.just(getRandomData(10)), parallelTransferOptions, null, null, null, accessConditions).block().getStatusCode() == 201 where: modified | unmodified | match | noneMatch | leaseID null | null | null | null | null - oldDate | null | null | null | null null | newDate | null | null | null + oldDate | null | null | null | null null | null | receivedEtag | null | null null | null | null | garbageEtag | null null | null | null | null | receivedLeaseID @@ -969,19 +980,21 @@ class BlockBlobAPITest extends APISpec { // Only run these tests in live mode as they use variables that can't be captured. @Unroll - @Requires({ APISpec.liveMode() }) + @Requires({ liveMode() }) def "Buffered upload AC fail"() { setup: bac.upload(defaultFlux, defaultDataSize).block() noneMatch = setupBlobMatchCondition(bac, noneMatch) leaseID = setupBlobLeaseCondition(bac, leaseID) - BlobAccessConditions accessConditions = new BlobAccessConditions().setModifiedAccessConditions( + def accessConditions = new BlobAccessConditions().setModifiedAccessConditions( new ModifiedAccessConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) .setIfMatch(match).setIfNoneMatch(noneMatch)) .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) when: - bac.uploadWithResponse(Flux.just(getRandomData(10)), 10, 2, null, null, null, accessConditions).block() + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(10) + blobac.uploadWithResponse(Flux.just(getRandomData(10)), parallelTransferOptions, null, null, null, accessConditions).block() then: def e = thrown(StorageException) @@ -1039,7 +1052,7 @@ class BlockBlobAPITest extends APISpec { buffering properly to allow for retries even given this source behavior. */ bac.upload(Flux.just(defaultData), defaultDataSize).block() - def nonReplayableFlux = bac.download().block() + def nonReplayableFlux = bac.download() // Mock a response that will always be retried. def mockHttpResponse = getStubResponse(500, new HttpRequest(HttpMethod.PUT, new URL("https://www.fake.com"))) @@ -1061,18 +1074,20 @@ class BlockBlobAPITest extends APISpec { } // Build the pipeline - bac = new BlobServiceClientBuilder() + blobac = new BlobServiceClientBuilder() .credential(primaryCredential) .endpoint(String.format(defaultEndpointTemplate, primaryCredential.getAccountName())) .httpClient(getHttpClient()) .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) .retryOptions(new RequestRetryOptions(null, 3, null, 500, 1500, null)) .addPolicy(mockPolicy).buildAsyncClient() - .getContainerAsyncClient(generateContainerName()).getBlockBlobAsyncClient(generateBlobName()) + .getBlobContainerAsyncClient(generateContainerName()).getBlobAsyncClient(generateBlobName()) when: // Try to upload the flowable, which will hit a retry. A normal upload would throw, but buffering prevents that. - bac.upload(nonReplayableFlux, 1024, 4).block() + ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions() + .setBlockSize(1024).setNumBuffers(4) + blobac.upload(nonReplayableFlux, parallelTransferOptions).block() // TODO: It could be that duplicates aren't getting made in the retry policy? Or before the retry policy? then: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseMockFlux.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java similarity index 97% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseMockFlux.java rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java index 925e8654cd96..206bd57229b8 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseMockFlux.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob; +package com.azure.storage.blob.specialized; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpResponse; +import com.azure.storage.blob.APISpec; +import com.azure.storage.blob.HTTPGetterInfo; +import com.azure.storage.blob.implementation.models.BlobsDownloadResponse; import com.azure.storage.blob.models.BlobDownloadHeaders; -import com.azure.storage.blob.models.BlobsDownloadResponse; import com.azure.storage.blob.models.StorageErrorException; import reactor.core.CoreSubscriber; import reactor.core.publisher.Flux; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy similarity index 92% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseTest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy index c6fd7f8e4843..46e78f85c301 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/DownloadResponseTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized import com.azure.core.implementation.util.FluxUtil +import com.azure.storage.blob.APISpec +import com.azure.storage.blob.HTTPGetterInfo import com.azure.storage.blob.models.ReliableDownloadOptions import com.azure.storage.blob.models.StorageErrorException import spock.lang.Unroll @@ -13,7 +15,7 @@ class DownloadResponseTest extends APISpec { BlockBlobClient bu def setup() { - bu = cc.getBlockBlobClient(generateBlobName()) + bu = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu.upload(defaultInputStream.get(), defaultText.length()) } @@ -95,12 +97,12 @@ class DownloadResponseTest extends APISpec { new DownloadAsyncResponse(flux.getter(info).block().getRawResponse(), info, { HTTPGetterInfo newInfo -> flux.getter(newInfo) }) then: - thrown(IllegalArgumentException) + thrown(NullPointerException) where: - info | _ - null | _ - new HTTPGetterInfo().setETag(null) | _ + info | _ + null | _ + new HTTPGetterInfo().setETag(null) | _ } def "Options IA"() { @@ -121,7 +123,7 @@ class DownloadResponseTest extends APISpec { response.body(null).blockFirst() then: - thrown(IllegalArgumentException) + thrown(NullPointerException) } def "Info"() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy similarity index 83% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/HelperTest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index 12446553ed42..7fa416b9809d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -1,8 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized +import com.azure.storage.blob.APISpec +import com.azure.storage.blob.BlobSasPermission +import com.azure.storage.blob.BlobURLParts +import com.azure.storage.blob.BlobContainerSasPermission import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.UserDelegationKey @@ -10,7 +14,7 @@ import com.azure.storage.common.AccountSASPermission import com.azure.storage.common.AccountSASResourceType import com.azure.storage.common.AccountSASSignatureValues import com.azure.storage.common.Constants -import com.azure.storage.common.IPRange +import com.azure.storage.common.IpRange import com.azure.storage.common.SASProtocol import com.azure.storage.common.Utility import com.azure.storage.common.credentials.SharedKeyCredential @@ -82,9 +86,9 @@ class HelperTest extends APISpec { @Unroll def "serviceSasSignatures string to sign"() { when: - BlobServiceSASSignatureValues v = new BlobServiceSASSignatureValues() + BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() if (permissions != null) { - v.setPermissions(new BlobSASPermission().setReadPermission(true).toString()) + v.setPermissions(new BlobSasPermission().setReadPermission(true).toString()) } else { v.setPermissions("") } @@ -106,7 +110,7 @@ class HelperTest extends APISpec { } if (ipRange != null) { - v.setIpRange(new IPRange().setIpMin("ip")) + v.setIpRange(new IpRange().setIpMin("ip")) } v.setIdentifier(identifier) @@ -117,7 +121,7 @@ class HelperTest extends APISpec { .setContentLanguage(language) .setContentType(type) - BlobServiceSASQueryParameters token = v.generateSASQueryParameters(primaryCredential) + BlobServiceSasQueryParameters token = v.generateSASQueryParameters(primaryCredential) if (startTime != null) { expectedStringToSign = String.format(expectedStringToSign, @@ -140,27 +144,27 @@ class HelperTest extends APISpec { Signed resource is tested elsewhere, as we work some minor magic in choosing which value to use. */ where: - permissions | startTime | expiryTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - new BlobSASPermission() | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | OffsetDateTime.now(ZoneOffset.UTC).minusDays(1) | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "\n%s\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + permissions | startTime | expiryTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign + new BlobSasPermission() | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | OffsetDateTime.now(ZoneOffset.UTC).minusDays(1) | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "\n%s\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | "id" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | new IPRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | "id" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | new IpRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | "snapId" | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | "control" | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | "disposition" | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | "encoding" | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | "language" | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } @Unroll def "serviceSasSignatures string to sign user delegation key"() { when: - BlobServiceSASSignatureValues v = new BlobServiceSASSignatureValues() + BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() if (permissions != null) { - v.setPermissions(new BlobSASPermission().setReadPermission(true).toString()) + v.setPermissions(new BlobSasPermission().setReadPermission(true).toString()) } else { v.setPermissions("") } @@ -182,7 +186,7 @@ class HelperTest extends APISpec { } if (ipRange != null) { - v.setIpRange(new IPRange().setIpMin("ip")) + v.setIpRange(new IpRange().setIpMin("ip")) } v.setProtocol(protocol) @@ -201,7 +205,7 @@ class HelperTest extends APISpec { .setSignedVersion(keyVersion) .setValue(keyValue) - BlobServiceSASQueryParameters token = v.generateSASQueryParameters(key) + BlobServiceSasQueryParameters token = v.generateSASQueryParameters(key) expectedStringToSign = String.format(expectedStringToSign, Utility.ISO_8601_UTC_DATE_FORMATTER.format(v.getExpiryTime()), primaryCredential.getAccountName()) @@ -212,8 +216,8 @@ class HelperTest extends APISpec { We test string to sign functionality directly related to user delegation sas specific parameters */ where: - permissions | startTime | expiryTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - new BlobSASPermission() | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + permissions | startTime | expiryTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign + new BlobSasPermission() | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" @@ -221,23 +225,23 @@ class HelperTest extends APISpec { null | null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new IPRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new IpRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SASProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" } @Unroll def "serviceSASSignatureValues canonicalizedResource"() { setup: - BlobServiceSASSignatureValues v = new BlobServiceSASSignatureValues() + BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() .setExpiryTime(expiryTime) - .setPermissions(new BlobSASPermission().toString()) + .setPermissions(new BlobSasPermission().toString()) .setResource(expectedResource) .setCanonicalName(String.format("/blob/%s/%s", primaryCredential.getAccountName(), containerName)) .setSnapshotId(snapId) @@ -251,7 +255,7 @@ class HelperTest extends APISpec { primaryCredential.getAccountName()) when: - BlobServiceSASQueryParameters token = v.generateSASQueryParameters(primaryCredential) + BlobServiceSasQueryParameters token = v.generateSASQueryParameters(primaryCredential) then: token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) @@ -268,7 +272,7 @@ class HelperTest extends APISpec { @Unroll def "serviceSasSignatureValues IA"() { setup: - BlobServiceSASSignatureValues v = new BlobServiceSASSignatureValues() + BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() .setPermissions(new AccountSASPermission().toString()) .setExpiryTime(OffsetDateTime.now()) .setResource(containerName) @@ -280,7 +284,7 @@ class HelperTest extends APISpec { v.generateSASQueryParameters((SharedKeyCredential)creds) then: - def e = thrown(IllegalArgumentException) + def e = thrown(NullPointerException) e.getMessage().contains(parameter) where: @@ -293,10 +297,10 @@ class HelperTest extends APISpec { @Unroll def "BlobSASPermissions toString"() { setup: - BlobSASPermission perms = new BlobSASPermission() + BlobSasPermission perms = new BlobSasPermission() .setReadPermission(read) .setWritePermission(write) - .getDeletePermission(delete) + .setDeletePermission(delete) .setCreatePermission(create) .setAddPermission(add) @@ -316,7 +320,7 @@ class HelperTest extends APISpec { @Unroll def "BlobSASPermissions parse"() { when: - BlobSASPermission perms = BlobSASPermission.parse(permString) + BlobSasPermission perms = BlobSasPermission.parse(permString) then: perms.getReadPermission() == read @@ -338,7 +342,7 @@ class HelperTest extends APISpec { def "BlobSASPermissions parse IA"() { when: - BlobSASPermission.parse("rwaq") + BlobSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -347,13 +351,13 @@ class HelperTest extends APISpec { @Unroll def "ContainerSASPermissions toString"() { setup: - ContainerSASPermission perms = new ContainerSASPermission() - .setRead(read) - .setWrite(write) - .setDelete(delete) - .setCreate(create) - .setAdd(add) - .setList(list) + BlobContainerSasPermission perms = new BlobContainerSasPermission() + .setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setCreatePermission(create) + .setAddPermission(add) + .setListPermission(list) expect: perms.toString() == expectedString @@ -372,15 +376,15 @@ class HelperTest extends APISpec { @Unroll def "ContainerSASPermissions parse"() { when: - ContainerSASPermission perms = ContainerSASPermission.parse(permString) + BlobContainerSasPermission perms = BlobContainerSasPermission.parse(permString) then: - perms.getRead() == read - perms.getWrite() == write - perms.getDelete() == delete - perms.getCreate() == create - perms.getAdd() == add - perms.getList() == list + perms.getReadPermission() == read + perms.getWritePermission() == write + perms.getDeletePermission() == delete + perms.getCreatePermission() == create + perms.getAddPermission() == add + perms.getListPermission() == list where: permString || read | write | delete | create | add | list @@ -396,7 +400,7 @@ class HelperTest extends APISpec { def "ContainerSASPermissions parse IA"() { when: - ContainerSASPermission.parse("rwaq") + BlobContainerSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -405,7 +409,7 @@ class HelperTest extends APISpec { @Unroll def "IPRange toString"() { setup: - def ip = new IPRange() + def ip = new IpRange() .setIpMin(min) .setIpMax(max) @@ -422,7 +426,7 @@ class HelperTest extends APISpec { @Unroll def "IPRange parse"() { when: - IPRange ip = IPRange.parse(rangeStr) + IpRange ip = IpRange.parse(rangeStr) then: ip.getIpMin() == min @@ -464,7 +468,7 @@ class HelperTest extends APISpec { .setProtocol(protocol) if (ipRange != null) { - v.setIpRange(new IPRange().setIpMin("ip")) + v.setIpRange(new IpRange().setIpMin("ip")) } def token = v.generateSASQueryParameters(primaryCredential) @@ -477,7 +481,7 @@ class HelperTest extends APISpec { where: startTime | ipRange | protocol || expectedStringToSign OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s\nr\nb\no\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | new IPRange() | null || "%s\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" + null | new IpRange() | null || "%s\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" null | null | SASProtocol.HTTPS_ONLY || "%s\nr\nb\no\n\n" + Utility.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SASProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" } @@ -495,7 +499,7 @@ class HelperTest extends APISpec { v.generateSASQueryParameters(creds) then: - def e = thrown(IllegalArgumentException) + def e = thrown(NullPointerException) e.getMessage().contains(parameter) where: @@ -627,9 +631,9 @@ class HelperTest extends APISpec { .setHost("host") .setContainerName("container") .setBlobName("blob") - .setSnapshot("snapshot") + .setSnapshot "snapshot" - BlobServiceSASSignatureValues sasValues = new BlobServiceSASSignatureValues() + BlobServiceSasSignatureValues sasValues = new BlobServiceSasSignatureValues() .setExpiryTime(OffsetDateTime.now(ZoneOffset.UTC).plusDays(1)) .setPermissions("r") .setCanonicalName(String.format("/blob/%s/container/blob", primaryCredential.getAccountName())) @@ -651,12 +655,12 @@ class HelperTest extends APISpec { def "URLParser"() { when: - BlobURLParts parts = URLParser.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) + BlobURLParts parts = BlobURLParts.parse(new URL("http://host/container/blob?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) then: parts.getScheme() == "http" parts.getHost() == "host" - parts.getContainerName() == "container" + parts.getBlobContainerName() == "container" parts.getBlobName() == "blob" parts.getSnapshot() == "snapshot" parts.getSasQueryParameters().getPermissions() == "r" diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LeaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy similarity index 78% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LeaseAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy index 163ef5ff5f1c..1b7c2954b735 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LeaseAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized +import com.azure.storage.blob.APISpec import com.azure.storage.blob.models.LeaseDurationType import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.ModifiedAccessConditions @@ -10,8 +11,8 @@ import com.azure.storage.blob.models.StorageException import spock.lang.Unroll class LeaseAPITest extends APISpec { - private BlobClient createBlobClient() { - def bc = cc.getBlockBlobClient(generateBlobName()) + private BlobClientBase createBlobClient() { + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bc.upload(defaultInputStream.get(), defaultDataSize) return bc @@ -88,12 +89,12 @@ class LeaseAPITest extends APISpec { .getStatusCode() == 201 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -114,16 +115,16 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch + newDate | null | null | null + null | oldDate | null | null + null | null | garbageEtag | null + null | null | null | receivedEtag } def "Acquire blob lease error"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: createLeaseClient(bc).acquireLease(20) @@ -176,12 +177,12 @@ class LeaseAPITest extends APISpec { .getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -203,16 +204,16 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch + newDate | null | null | null + null | oldDate | null | null + null | null | garbageEtag | null + null | null | null | receivedEtag } def "Renew blob lease error"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: createLeaseClient(bc, "id").renewLease() @@ -257,12 +258,12 @@ class LeaseAPITest extends APISpec { createLeaseClient(bc, leaseID).releaseLeaseWithResponse(mac, null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -284,16 +285,16 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch + newDate | null | null | null + null | oldDate | null | null + null | null | garbageEtag | null + null | null | null | receivedEtag } def "Release blob lease error"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: createLeaseClient(bc, "id").releaseLease() @@ -350,12 +351,12 @@ class LeaseAPITest extends APISpec { createLeaseClient(bc).breakLeaseWithResponse(null, mac, null, null).getStatusCode() == 202 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -377,11 +378,11 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch + newDate | null | null | null + null | oldDate | null | null + null | null | garbageEtag | null + null | null | null | receivedEtag } def "Break blob lease error"() { @@ -433,12 +434,12 @@ class LeaseAPITest extends APISpec { createLeaseClient(bc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -460,16 +461,16 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch + newDate | null | null | null + null | oldDate | null | null + null | null | garbageEtag | null + null | null | null | receivedEtag } def "Change blob lease error"() { setup: - def bc = cc.getBlockBlobClient(generateBlobName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() when: createLeaseClient(bc, "id").changeLease("id") @@ -547,12 +548,12 @@ class LeaseAPITest extends APISpec { createLeaseClient(cc).acquireLeaseWithResponse( -1, mac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch + null | null | null | null + oldDate | null | null | null + null | newDate | null | null + null | null | receivedEtag | null + null | null | null | garbageEtag } @Unroll @@ -567,14 +568,14 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified - newDate | null - null | oldDate + modified | unmodified + newDate | null + null | oldDate } def "Acquire container lease error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: createLeaseClient(cc).acquireLease(50) @@ -614,10 +615,10 @@ class LeaseAPITest extends APISpec { createLeaseClient(cc, leaseID).renewLeaseWithResponse(mac, null, null).getStatusCode() == 200 where: - modified | unmodified - null | null - oldDate | null - null | newDate + modified | unmodified + null | null + oldDate | null + null | newDate } @Unroll @@ -633,9 +634,9 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified - newDate | null - null | oldDate + modified | unmodified + newDate | null + null | oldDate } @Unroll @@ -650,14 +651,14 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - match | noneMatch + match | noneMatch receivedEtag | null - null | garbageEtag + null | garbageEtag } def "Renew container lease error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: createLeaseClient(cc, "id").renewLease() @@ -695,10 +696,10 @@ class LeaseAPITest extends APISpec { createLeaseClient(cc, leaseID).releaseLeaseWithResponse(mac, null, null).getStatusCode() == 200 where: - modified | unmodified - null | null - oldDate | null - null | newDate + modified | unmodified + null | null + oldDate | null + null | newDate } @Unroll @@ -714,9 +715,9 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified - newDate | null - null | oldDate + modified | unmodified + newDate | null + null | oldDate } @Unroll @@ -731,14 +732,14 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - match | noneMatch + match | noneMatch receivedEtag | null - null | garbageEtag + null | garbageEtag } def "Release container lease error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: createLeaseClient(cc, "id").releaseLease() @@ -791,10 +792,10 @@ class LeaseAPITest extends APISpec { createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null).getStatusCode() == 202 where: - modified | unmodified - null | null - oldDate | null - null | newDate + modified | unmodified + null | null + oldDate | null + null | newDate } @Unroll @@ -810,9 +811,9 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified - newDate | null - null | oldDate + modified | unmodified + newDate | null + null | oldDate } @Unroll @@ -827,14 +828,14 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - match | noneMatch + match | noneMatch receivedEtag | null - null | garbageEtag + null | garbageEtag } def "Break container lease error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: createLeaseClient(cc).breakLease() @@ -873,10 +874,10 @@ class LeaseAPITest extends APISpec { createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null).getStatusCode() == 200 where: - modified | unmodified - null | null - oldDate | null - null | newDate + modified | unmodified + null | null + oldDate | null + null | newDate } @Unroll @@ -892,9 +893,9 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - modified | unmodified - newDate | null - null | oldDate + modified | unmodified + newDate | null + null | oldDate } @Unroll @@ -909,14 +910,14 @@ class LeaseAPITest extends APISpec { thrown(StorageException) where: - match | noneMatch + match | noneMatch receivedEtag | null - null | garbageEtag + null | garbageEtag } def "Change container lease error"() { setup: - cc = primaryBlobServiceClient.getContainerClient(generateContainerName()) + cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) when: createLeaseClient(cc, "id").changeLease("id") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy similarity index 89% rename from sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index 4ec4edfe17ae..a3b43432d56d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -1,19 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.blob +package com.azure.storage.blob.specialized -import com.azure.core.http.rest.Response import com.azure.core.exception.UnexpectedLengthException +import com.azure.storage.blob.APISpec import com.azure.storage.blob.models.BlobAccessConditions import com.azure.storage.blob.models.BlobHTTPHeaders import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.LeaseAccessConditions -import com.azure.storage.blob.models.Metadata + import com.azure.storage.blob.models.ModifiedAccessConditions import com.azure.storage.blob.models.PageBlobAccessConditions -import com.azure.storage.blob.models.PageBlobItem import com.azure.storage.blob.models.PageRange import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.SequenceNumberAccessConditions @@ -32,14 +31,14 @@ class PageBlobAPITest extends APISpec { def setup() { blobName = generateBlobName() - bc = cc.getPageBlobClient(blobName) - bcAsync = ccAsync.getPageBlobAsyncClient(blobName) - bc.setCreate(PageBlobClient.PAGE_BYTES) + bc = cc.getBlobClient(blobName).getPageBlobClient() + bcAsync = ccAsync.getBlobAsyncClient(blobName).getPageBlobAsyncClient() + bc.create(PageBlobClient.PAGE_BYTES) } def "Create all null"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: def response = bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, null, null, null) @@ -67,7 +66,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create headers"() { setup: - BlobHTTPHeaders headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) + def headers = new BlobHTTPHeaders().setBlobCacheControl(cacheControl) .setBlobContentDisposition(contentDisposition) .setBlobContentEncoding(contentEncoding) .setBlobContentLanguage(contentLanguage) @@ -94,7 +93,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create metadata"() { setup: - Metadata metadata = new Metadata() + def metadata = new HashMap() if (key1 != null) { metadata.put(key1, value1) } @@ -120,7 +119,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create AC"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -145,7 +144,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create AC fail"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -215,7 +214,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Upload page AC"() { setup: - PageBlobAccessConditions pac = new PageBlobAccessConditions() + def pac = new PageBlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -249,7 +248,7 @@ class PageBlobAPITest extends APISpec { setup: noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, leaseID) - PageBlobAccessConditions pac = new PageBlobAccessConditions() + def pac = new PageBlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -282,7 +281,7 @@ class PageBlobAPITest extends APISpec { def "Upload page error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -297,14 +296,14 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL min"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getPageBlobClient(generateBlobName()) - destURL.setCreate(PageBlobClient.PAGE_BYTES) + def destURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + destURL.create(PageBlobClient.PAGE_BYTES) destURL.uploadPages(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) when: - Response response = bc.uploadPagesFromURLWithResponse(pageRange, destURL.getBlobUrl(), null, null, null, null, null, null) + def response = bc.uploadPagesFromURLWithResponse(pageRange, new URL(destURL.getBlobUrl()), null, null, null, null, null, null) then: response.getStatusCode() == 201 @@ -315,29 +314,29 @@ class PageBlobAPITest extends APISpec { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - byte[] data = getRandomByteArray(PageBlobClient.PAGE_BYTES * 4) + def data = getRandomByteArray(PageBlobClient.PAGE_BYTES * 4) - def sourceURL = cc.getPageBlobClient(generateBlobName()) - sourceURL.setCreate(PageBlobClient.PAGE_BYTES * 4) + def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceURL.create(PageBlobClient.PAGE_BYTES * 4) sourceURL.uploadPages(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES * 4 - 1), new ByteArrayInputStream(data)) - def destURL = cc.getPageBlobClient(generateBlobName()) - destURL.setCreate(PageBlobClient.PAGE_BYTES * 2) + def destURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + destURL.create(PageBlobClient.PAGE_BYTES * 2) when: destURL.uploadPagesFromURL(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES * 2 - 1), - sourceURL.getBlobUrl(), PageBlobClient.PAGE_BYTES * 2) + new URL(sourceURL.getBlobUrl()), PageBlobClient.PAGE_BYTES * 2) then: - ByteArrayOutputStream outputStream = new ByteArrayOutputStream() + def outputStream = new ByteArrayOutputStream() destURL.download(outputStream) outputStream.toByteArray() == Arrays.copyOfRange(data, PageBlobClient.PAGE_BYTES * 2, PageBlobClient.PAGE_BYTES * 4) } def "Upload page from URL IA"() { when: - bc.uploadPagesFromURL(null, bc.getBlobUrl(), (Long) PageBlobClient.PAGE_BYTES) + bc.uploadPagesFromURL(null, new URL(bc.getBlobUrl()), (Long) PageBlobClient.PAGE_BYTES) then: thrown(IllegalArgumentException) @@ -346,14 +345,14 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL MD5"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getPageBlobClient(generateBlobName()) - destURL.setCreate(PageBlobClient.PAGE_BYTES) + def destURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + destURL.create(PageBlobClient.PAGE_BYTES) def data = getRandomByteArray(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) bc.uploadPages(pageRange, new ByteArrayInputStream(data)) when: - destURL.uploadPagesFromURLWithResponse(pageRange, bc.getBlobUrl(), null, MessageDigest.getInstance("MD5").digest(data), + destURL.uploadPagesFromURLWithResponse(pageRange, new URL(bc.getBlobUrl()), null, MessageDigest.getInstance("MD5").digest(data), null, null, null, null) then: @@ -363,13 +362,13 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL MD5 fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def destURL = cc.getPageBlobClient(generateBlobName()) - destURL.setCreate(PageBlobClient.PAGE_BYTES) + def destURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + destURL.create(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) bc.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) when: - destURL.uploadPagesFromURLWithResponse(pageRange, bc.getBlobUrl(), null, + destURL.uploadPagesFromURLWithResponse(pageRange, new URL(bc.getBlobUrl()), null, MessageDigest.getInstance("MD5").digest("garbage".getBytes()), null, null, null, null) then: @@ -380,8 +379,8 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL destination AC"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getPageBlobClient(generateBlobName()) - sourceURL.setCreate(PageBlobClient.PAGE_BYTES) + def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceURL.create(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) @@ -398,7 +397,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberEqualTo(sequenceNumberEqual)) expect: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null).getStatusCode() == 201 + bc.uploadPagesFromURLWithResponse(pageRange, new URL(sourceURL.getBlobUrl()), null, null, pac, null, null, null).getStatusCode() == 201 where: modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual @@ -418,8 +417,8 @@ class PageBlobAPITest extends APISpec { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getPageBlobClient(generateBlobName()) - sourceURL.setCreate(PageBlobClient.PAGE_BYTES) + def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceURL.create(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) @@ -437,7 +436,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberEqualTo(sequenceNumberEqual)) when: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null) + bc.uploadPagesFromURLWithResponse(pageRange, new URL(sourceURL.getBlobUrl()), null, null, pac, null, null, null) then: thrown(StorageException) @@ -458,8 +457,8 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL source AC"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getPageBlobClient(generateBlobName()) - sourceURL.setCreate(PageBlobClient.PAGE_BYTES) + def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceURL.create(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) @@ -471,7 +470,7 @@ class PageBlobAPITest extends APISpec { .setSourceIfNoneMatch(sourceIfNoneMatch) expect: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null).getStatusCode() == 201 + bc.uploadPagesFromURLWithResponse(pageRange, new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, null).getStatusCode() == 201 where: sourceIfModifiedSince | sourceIfUnmodifiedSince | sourceIfMatch | sourceIfNoneMatch @@ -486,8 +485,8 @@ class PageBlobAPITest extends APISpec { def "Upload page from URL source AC fail"() { setup: cc.setAccessPolicy(PublicAccessType.CONTAINER, null) - def sourceURL = cc.getPageBlobClient(generateBlobName()) - sourceURL.setCreate(PageBlobClient.PAGE_BYTES) + def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() + sourceURL.create(PageBlobClient.PAGE_BYTES) def pageRange = new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1) sourceURL.uploadPages(pageRange, new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) @@ -498,7 +497,7 @@ class PageBlobAPITest extends APISpec { .setSourceIfNoneMatch(setupBlobMatchCondition(sourceURL, sourceIfNoneMatch)) when: - bc.uploadPagesFromURLWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, null, smac, null, null) + bc.uploadPagesFromURLWithResponse(pageRange, new URL(sourceURL.getBlobUrl()), null, null, null, smac, null, null) then: thrown(StorageException) @@ -516,7 +515,7 @@ class PageBlobAPITest extends APISpec { new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES)), null, null, null) when: - Response response = bc.clearPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), null, null, null) + def response = bc.clearPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), null, null, null) then: bc.getPageRanges(new BlobRange(0)).getPageRange().size() == 0 @@ -606,7 +605,7 @@ class PageBlobAPITest extends APISpec { def "Clear page error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.clearPages(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1)) @@ -643,7 +642,7 @@ class PageBlobAPITest extends APISpec { setup: match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(leaseID)) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -671,7 +670,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Get page ranges AC fail"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -696,7 +695,7 @@ class PageBlobAPITest extends APISpec { def "Get page ranges error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.getPageRanges(null) @@ -707,7 +706,7 @@ class PageBlobAPITest extends APISpec { def "Get page ranges diff"() { setup: - bc.setCreate(PageBlobClient.PAGE_BYTES * 2) + bc.create(PageBlobClient.PAGE_BYTES * 2) bc.uploadPages(new PageRange().setStart(PageBlobClient.PAGE_BYTES).setEnd(PageBlobClient.PAGE_BYTES * 2 - 1), new ByteArrayInputStream(getRandomByteArray(PageBlobClient.PAGE_BYTES))) @@ -748,7 +747,7 @@ class PageBlobAPITest extends APISpec { def "Get page ranges diff AC"() { setup: def snapId = bc.createSnapshot().getSnapshotId() - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -777,7 +776,7 @@ class PageBlobAPITest extends APISpec { setup: def snapId = bc.createSnapshot().getSnapshotId() - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -802,7 +801,7 @@ class PageBlobAPITest extends APISpec { def "Get page ranges diff error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.getPageRangesDiff(null, "snapshot") @@ -850,7 +849,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Resize AC"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -874,7 +873,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Resize AC fail"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -899,7 +898,7 @@ class PageBlobAPITest extends APISpec { def "Resize error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.resize(0) @@ -911,7 +910,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Sequence number"() { setup: - Response response = bc.updateSequenceNumberWithResponse(action, number, null, null, null) + def response = bc.updateSequenceNumberWithResponse(action, number, null, null, null) expect: bc.getProperties().getBlobSequenceNumber() == result @@ -933,7 +932,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Sequence number AC"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -958,7 +957,7 @@ class PageBlobAPITest extends APISpec { @Unroll def "Sequence number AC fail"() { setup: - BlobAccessConditions bac = new BlobAccessConditions() + def bac = new BlobAccessConditions() .setLeaseAccessConditions(new LeaseAccessConditions().setLeaseId(setupBlobLeaseCondition(bc, leaseID))) .setModifiedAccessConditions(new ModifiedAccessConditions() .setIfModifiedSince(modified) @@ -983,7 +982,7 @@ class PageBlobAPITest extends APISpec { def "Sequence number error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.updateSequenceNumber(SequenceNumberActionType.UPDATE, 0) @@ -995,16 +994,16 @@ class PageBlobAPITest extends APISpec { def "Start incremental copy"() { setup: cc.setAccessPolicy(PublicAccessType.BLOB, null) - def bc2 = cc.getPageBlobClient(generateBlobName()) + def bc2 = cc.getBlobClient(generateBlobName()).getPageBlobClient() def snapId = bc.createSnapshot().getSnapshotId() - def copyResponse = bc2.copyIncrementalWithResponse(bc.getBlobUrl(), snapId, null, null, null) + def copyResponse = bc2.copyIncrementalWithResponse(new URL(bc.getBlobUrl()), snapId, null, null, null) def status = copyResponse.getValue() def start = OffsetDateTime.now() while (status != CopyStatusType.SUCCESS) { status = bc2.getProperties().getCopyStatus() - OffsetDateTime currentTime = OffsetDateTime.now() + def currentTime = OffsetDateTime.now() if (status == CopyStatusType.FAILED || currentTime.minusMinutes(1) == start) { throw new Exception("Copy failed or took too long") } @@ -1023,27 +1022,27 @@ class PageBlobAPITest extends APISpec { def "Start incremental copy min"() { setup: cc.setAccessPolicy(PublicAccessType.BLOB, null) - def bc2 = cc.getPageBlobClient(generateBlobName()) - String snapshot = bc.createSnapshot().getSnapshotId() + def bc2 = cc.getBlobClient(generateBlobName()).getPageBlobClient() + def snapshot = bc.createSnapshot().getSnapshotId() expect: - bc2.copyIncrementalWithResponse(bc.getBlobUrl(), snapshot, null, null, null).getStatusCode() == 202 + bc2.copyIncrementalWithResponse(new URL(bc.getBlobUrl()), snapshot, null, null, null).getStatusCode() == 202 } @Unroll def "Start incremental copy AC"() { setup: cc.setAccessPolicy(PublicAccessType.BLOB, null) - PageBlobClient bu2 = cc.getPageBlobClient(generateBlobName()) - String snapshot = bc.createSnapshot().getSnapshotId() + def bu2 = cc.getBlobClient(generateBlobName()).getPageBlobClient() + def snapshot = bc.createSnapshot().getSnapshotId() - def copyResponse = bu2.copyIncrementalWithResponse(bc.getBlobUrl(), snapshot, null, null, null) + def copyResponse = bu2.copyIncrementalWithResponse(new URL(bc.getBlobUrl()), snapshot, null, null, null) def status = copyResponse.getValue() def start = OffsetDateTime.now() while (status != CopyStatusType.SUCCESS) { status = bu2.getProperties().getCopyStatus() - OffsetDateTime currentTime = OffsetDateTime.now() + def currentTime = OffsetDateTime.now() if (status == CopyStatusType.FAILED || currentTime.minusMinutes(1) == start) { throw new Exception("Copy failed or took too long") } @@ -1059,7 +1058,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) expect: - bu2.copyIncrementalWithResponse(bc.getBlobUrl(), snapshot, mac, null, null).getStatusCode() == 202 + bu2.copyIncrementalWithResponse(new URL(bc.getBlobUrl()), snapshot, mac, null, null).getStatusCode() == 202 where: modified | unmodified | match | noneMatch @@ -1074,9 +1073,9 @@ class PageBlobAPITest extends APISpec { def "Start incremental copy AC fail"() { setup: cc.setAccessPolicy(PublicAccessType.BLOB, null) - PageBlobClient bu2 = cc.getPageBlobClient(generateBlobName()) - String snapshot = bc.createSnapshot().getSnapshotId() - bu2.copyIncremental(bc.getBlobUrl(), snapshot) + def bu2 = cc.getBlobClient(generateBlobName()).getPageBlobClient() + def snapshot = bc.createSnapshot().getSnapshotId() + bu2.copyIncremental(new URL(bc.getBlobUrl()), snapshot) snapshot = bc.createSnapshot().getSnapshotId() noneMatch = setupBlobMatchCondition(bu2, noneMatch) def mac = new ModifiedAccessConditions() @@ -1086,7 +1085,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) when: - bu2.copyIncrementalWithResponse(bc.getBlobUrl(), snapshot, mac, null, null) + bu2.copyIncrementalWithResponse(new URL(bc.getBlobUrl()), snapshot, mac, null, null) then: thrown(StorageException) @@ -1101,7 +1100,7 @@ class PageBlobAPITest extends APISpec { def "Start incremental copy error"() { setup: - bc = cc.getPageBlobClient(generateBlobName()) + bc = cc.getBlobClient(generateBlobName()).getPageBlobClient() when: bc.copyIncremental(new URL("https://www.error.com"), "snapshot") diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadtofiledoesnotexist.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadtofiledoesnotexist.json index d950d3a79c9b..8fda748c15e2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadtofiledoesnotexist.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadtofiledoesnotexist.json @@ -1,57 +1,57 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://jaschrepragrs.blob.core.windows.net/jtcdownloadtofiledoesnotexist094554e56f6041f44840?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdownloadtofiledoesnotexist05887140b09ca91ead48?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1cc4ee14-eb38-4dd9-8b7c-cb0dcf8a9ccb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b508b486-65fb-4cdc-aca9-f2506e39a5df" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D73560EE36CA5B\"", - "Last-Modified" : "Mon, 09 Sep 2019 20:04:32 GMT", + "ETag" : "\"0x8D745F332A44FB6\"", + "Last-Modified" : "Mon, 30 Sep 2019 22:11:52 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "c5ca32dc-301e-0042-7c49-67cbbf000000", - "Date" : "Mon, 09 Sep 2019 20:04:32 GMT", - "x-ms-client-request-id" : "1cc4ee14-eb38-4dd9-8b7c-cb0dcf8a9ccb" + "x-ms-request-id" : "3e8dd97e-a01e-011d-19dc-77afc9000000", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", + "x-ms-client-request-id" : "b508b486-65fb-4cdc-aca9-f2506e39a5df" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://jaschrepragrs.blob.core.windows.net/jtcdownloadtofiledoesnotexist094554e56f6041f44840/javablobdownloadtofiledoesnotexist1216166a1f95cb9af", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdownloadtofiledoesnotexist05887140b09ca91ead48/javablobdownloadtofiledoesnotexist1671371cfd859468d", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9aeb81c7-5ae7-4d23-a7b5-ea0ea560e860", + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b0aea802-e87f-4707-8276-8ad04790a021", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Last-Modified" : "Mon, 30 Sep 2019 22:11:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "\"0x8D73560EE4371C9\"", + "ETag" : "\"0x8D745F332EFD016\"", "Content-Length" : "0", - "x-ms-request-id" : "c5ca3304-301e-0042-2149-67cbbf000000", - "x-ms-client-request-id" : "9aeb81c7-5ae7-4d23-a7b5-ea0ea560e860" + "x-ms-request-id" : "3e8dda45-a01e-011d-45dc-77afc9000000", + "x-ms-client-request-id" : "b0aea802-e87f-4707-8276-8ad04790a021" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://jaschrepragrs.blob.core.windows.net/jtcdownloadtofiledoesnotexist094554e56f6041f44840/javablobdownloadtofiledoesnotexist1216166a1f95cb9af", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdownloadtofiledoesnotexist05887140b09ca91ead48/javablobdownloadtofiledoesnotexist1671371cfd859468d", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b6b86751-89b1-44a1-9156-90ffb277bc13" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f3235a78-202e-4c6e-99f5-9636a15be86e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -59,31 +59,31 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-tag-count" : "0", "x-ms-lease-state" : "available", - "Last-Modified" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Last-Modified" : "Mon, 30 Sep 2019 22:11:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "\"0x8D73560EE4371C9\"", - "x-ms-creation-time" : "Mon, 09 Sep 2019 20:04:32 GMT", + "ETag" : "\"0x8D745F332EFD016\"", + "x-ms-creation-time" : "Mon, 30 Sep 2019 22:11:53 GMT", "Content-Length" : "7", - "x-ms-request-id" : "c5ca3317-301e-0042-3449-67cbbf000000", - "x-ms-client-request-id" : "b6b86751-89b1-44a1-9156-90ffb277bc13", + "x-ms-request-id" : "3e8dda7b-a01e-011d-70dc-77afc9000000", + "x-ms-client-request-id" : "f3235a78-202e-4c6e-99f5-9636a15be86e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://jaschrepragrs.blob.core.windows.net/jtcdownloadtofiledoesnotexist094554e56f6041f44840/javablobdownloadtofiledoesnotexist1216166a1f95cb9af", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdownloadtofiledoesnotexist05887140b09ca91ead48/javablobdownloadtofiledoesnotexist1671371cfd859468d", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "01b7685a-fc96-4a40-ad4f-9a9cf655658a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "10a97596-cd07-4594-be34-113288501da5" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -93,29 +93,29 @@ "Content-Range" : "bytes 0-6/7", "x-ms-lease-state" : "available", "x-ms-blob-content-md5" : "wh+Wm18D0z1D4E+PE252gg==", - "Last-Modified" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Last-Modified" : "Mon, 30 Sep 2019 22:11:53 GMT", "retry-after" : "0", "StatusCode" : "206", - "Date" : "Mon, 09 Sep 2019 20:04:32 GMT", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "\"0x8D73560EE4371C9\"", - "x-ms-creation-time" : "Mon, 09 Sep 2019 20:04:32 GMT", + "ETag" : "\"0x8D745F332EFD016\"", + "x-ms-creation-time" : "Mon, 30 Sep 2019 22:11:53 GMT", "Content-Length" : "7", - "x-ms-request-id" : "c5ca3326-301e-0042-4249-67cbbf000000", + "x-ms-request-id" : "3e8dda8e-a01e-011d-01dc-77afc9000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "01b7685a-fc96-4a40-ad4f-9a9cf655658a", + "x-ms-client-request-id" : "10a97596-cd07-4594-be34-113288501da5", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://jaschrepragrs.blob.core.windows.net?prefix=jtcdownloadtofiledoesnotexist&comp=list", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net?prefix=jtcdownloadtofiledoesnotexist&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "24775563-10b2-4dfd-b021-289e4c8ae4df" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b653f4bd-3743-431e-84fc-35670ccbd6e2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -123,20 +123,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "c5ca3347-301e-0042-5f49-67cbbf000000", - "Body" : "jtcdownloadtofiledoesnotexistjtcdownloadtofiledoesnotexist094554e56f6041f44840Mon, 09 Sep 2019 20:04:32 GMT\"0x8D73560EE36CA5B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Mon, 09 Sep 2019 20:04:32 GMT", - "x-ms-client-request-id" : "24775563-10b2-4dfd-b021-289e4c8ae4df", + "x-ms-request-id" : "3e8ddab5-a01e-011d-24dc-77afc9000000", + "Body" : "jtcdownloadtofiledoesnotexistjtcdownloadtofiledoesnotexist05887140b09ca91ead48Mon, 30 Sep 2019 22:11:52 GMT\"0x8D745F332A44FB6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", + "x-ms-client-request-id" : "b653f4bd-3743-431e-84fc-35670ccbd6e2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://jaschrepragrs.blob.core.windows.net/jtcdownloadtofiledoesnotexist094554e56f6041f44840?restype=container", + "Uri" : "https://azstoragesdkaccount.blob.core.windows.net/jtcdownloadtofiledoesnotexist05887140b09ca91ead48?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "926b4a6c-7e67-4f64-bea1-749969798ab0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "3ec9e56c-06d2-4820-818e-23c6fd4639e4" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -144,11 +144,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "c5ca3373-301e-0042-0949-67cbbf000000", - "Date" : "Mon, 09 Sep 2019 20:04:33 GMT", - "x-ms-client-request-id" : "926b4a6c-7e67-4f64-bea1-749969798ab0" + "x-ms-request-id" : "3e8ddadb-a01e-011d-46dc-77afc9000000", + "Date" : "Mon, 30 Sep 2019 22:11:52 GMT", + "x-ms-client-request-id" : "3ec9e56c-06d2-4820-818e-23c6fd4639e4" }, "Exception" : null } ], - "variables" : [ "jtcdownloadtofiledoesnotexist094554e56f6041f44840", "javablobdownloadtofiledoesnotexist1216166a1f95cb9af" ] + "variables" : [ "jtcdownloadtofiledoesnotexist05887140b09ca91ead48", "javablobdownloadtofiledoesnotexist1671371cfd859468d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index b049a86441d3..f1efd1cbec5a 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -33,6 +33,9 @@ generate-client-interfaces: false sync-methods: none license-header: MICROSOFT_MIT_SMALL add-context-parameter: true +models-subpackage: implementation.models +custom-types: AccessPolicy,AccessTier,AccountKind,AppendPositionAccessConditions,ArchiveStatus,BlobDownloadHeaders,BlobHTTPHeaders,BlobItem,BlobProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,BlobPrefix,ClearRange,ContainerItem,ContainerProperties,CopyStatusType,CorsRule,CpkInfo,CustomerProvidedKeyInfo,DataLakeStorageError,DataLakeStorageErrorError,DataLakeStorageErrorException,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseAccessConditions,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobsIncludeItem,ListContainersIncludeType,Logging,Metrics,ModifiedAccessConditions,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,RetentionPolicy,SequenceNumberAccessConditions,SequenceNumberActionType,SignedIdentifier,SkuName,SourceModifiedAccessConditions,StaticWebsite,StorageError,StorageErrorCode,StorageErrorException,StorageServiceProperties,StorageServiceStats,SyncCopyStatusType,UserDelegationKey +custom-types-subpackage: models ``` ### /{containerName}?restype=container diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 378996c8856e..03a3b055c4b1 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -46,6 +46,11 @@ org.slf4j slf4j-api + + com.azure + azure-core-http-netty + 1.0.0-preview.5 + + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + + + + com.azure + azure-core-test + 1.0.0-preview.5 + test + + + com.azure + azure-core-http-netty + 1.0.0-preview.5 + test + + + org.slf4j + slf4j-simple + test + + + io.projectreactor + reactor-test + test + + + org.spockframework + spock-core + test + + + + + + java8 + + [1.8,9) + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + test-compile + process-test-sources + + testCompile + + + groovy-eclipse-compiler + -Xlint:unchecked + + + + default-testCompile + process-test-sources + + testCompile + + + groovy-eclipse-compiler + -Xlint:unchecked + + + + + + org.codehaus.groovy + groovy-eclipse-compiler + ${groovy-eclipse-compiler.version} + + + org.codehaus.groovy + groovy-eclipse-batch + ${groovy-eclipse-batch.version} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + + + + + java9plus + + [9,) + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 9 + 9 + + + + test-compile + process-test-sources + + testCompile + + + groovy-eclipse-compiler + -Xlint:unchecked + 8 + + + + default-testCompile + process-test-sources + + testCompile + + + groovy-eclipse-compiler + -Xlint:unchecked + 8 + + + + + + org.codehaus.groovy + groovy-eclipse-compiler + ${groovy-eclipse-compiler.version} + + + org.codehaus.groovy + groovy-eclipse-batch + ${groovy-eclipse-batch.version} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + --add-opens com.azure.storage.file.datalake/com.azure.storage.file.datalake=ALL-UNNAMED + --add-opens com.azure.storage.file.datalake/com.azure.storage.file.datalake.implementation=ALL-UNNAMED + --add-opens com.azure.storage.file.datalake/com.azure.storage.file.datalake.models=ALL-UNNAMED + + + + + + + + diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java new file mode 100644 index 000000000000..fc32992df5e9 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.implementation.RestProxy; + +/** + * A builder for creating a new instance of the DataLakeStorageClient type. + */ +@ServiceClientBuilder(serviceClients = DataLakeStorageClientImpl.class) +public final class DataLakeStorageClientBuilder { + /* + * Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. + */ + private String xMsVersion; + + /** + * Sets Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. + * + * @param xMsVersion the xMsVersion value. + * @return the DataLakeStorageClientBuilder. + */ + public DataLakeStorageClientBuilder xMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /* + * The Azure Storage account name. + */ + private String accountName; + + /** + * Sets The Azure Storage account name. + * + * @param accountName the accountName value. + * @return the DataLakeStorageClientBuilder. + */ + public DataLakeStorageClientBuilder accountName(String accountName) { + this.accountName = accountName; + return this; + } + + /* + * The DNS suffix for the Azure Data Lake Storage endpoint. + */ + private String dnsSuffix; + + /** + * Sets The DNS suffix for the Azure Data Lake Storage endpoint. + * + * @param dnsSuffix the dnsSuffix value. + * @return the DataLakeStorageClientBuilder. + */ + public DataLakeStorageClientBuilder dnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the DataLakeStorageClientBuilder. + */ + public DataLakeStorageClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /** + * Builds an instance of DataLakeStorageClientImpl with the provided parameters. + * + * @return an instance of DataLakeStorageClientImpl. + */ + public DataLakeStorageClientImpl build() { + if (pipeline == null) { + this.pipeline = RestProxy.createDefaultPipeline(); + } + DataLakeStorageClientImpl client = new DataLakeStorageClientImpl(pipeline); + if (this.xMsVersion != null) { + client.setXMsVersion(this.xMsVersion); + } + if (this.accountName != null) { + client.setAccountName(this.accountName); + } + if (this.dnsSuffix != null) { + client.setDnsSuffix(this.dnsSuffix); + } else { + client.setDnsSuffix("dfs.core.windows.net"); + } + return client; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java new file mode 100644 index 000000000000..928696c461ea --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.implementation.RestProxy; + +/** + * Initializes a new instance of the DataLakeStorageClient type. + */ +public final class DataLakeStorageClientImpl { + /** + * Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. + */ + private String xMsVersion; + + /** + * Gets Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Sets Specifies the version of the REST protocol used for processing the request. This is required when using shared key authorization. + * + * @param xMsVersion the xMsVersion value. + */ + DataLakeStorageClientImpl setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * The Azure Storage account name. + */ + private String accountName; + + /** + * Gets The Azure Storage account name. + * + * @return the accountName value. + */ + public String getAccountName() { + return this.accountName; + } + + /** + * Sets The Azure Storage account name. + * + * @param accountName the accountName value. + */ + DataLakeStorageClientImpl setAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * The DNS suffix for the Azure Data Lake Storage endpoint. + */ + private String dnsSuffix; + + /** + * Gets The DNS suffix for the Azure Data Lake Storage endpoint. + * + * @return the dnsSuffix value. + */ + public String getDnsSuffix() { + return this.dnsSuffix; + } + + /** + * Sets The DNS suffix for the Azure Data Lake Storage endpoint. + * + * @param dnsSuffix the dnsSuffix value. + */ + DataLakeStorageClientImpl setDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * The HTTP pipeline to send requests through. + */ + private HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The FilesystemsImpl object to access its operations. + */ + private FilesystemsImpl filesystems; + + /** + * Gets the FilesystemsImpl object to access its operations. + * + * @return the FilesystemsImpl object. + */ + public FilesystemsImpl filesystems() { + return this.filesystems; + } + + /** + * The PathsImpl object to access its operations. + */ + private PathsImpl paths; + + /** + * Gets the PathsImpl object to access its operations. + * + * @return the PathsImpl object. + */ + public PathsImpl paths() { + return this.paths; + } + + /** + * Initializes an instance of DataLakeStorageClient client. + */ + public DataLakeStorageClientImpl() { + this(RestProxy.createDefaultPipeline()); + } + + /** + * Initializes an instance of DataLakeStorageClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + public DataLakeStorageClientImpl(HttpPipeline httpPipeline) { + this.httpPipeline = httpPipeline; + this.filesystems = new FilesystemsImpl(this); + this.paths = new PathsImpl(this); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FilesystemsImpl.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FilesystemsImpl.java new file mode 100644 index 000000000000..d09a8017e4c1 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FilesystemsImpl.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.implementation; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Head; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; +import com.azure.core.util.Context; +import com.azure.storage.file.datalake.models.DataLakeStorageErrorException; +import com.azure.storage.file.datalake.models.FilesystemsCreateResponse; +import com.azure.storage.file.datalake.models.FilesystemsDeleteResponse; +import com.azure.storage.file.datalake.models.FilesystemsGetPropertiesResponse; +import com.azure.storage.file.datalake.models.FilesystemsListResponse; +import com.azure.storage.file.datalake.models.FilesystemsSetPropertiesResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * Filesystems. + */ +public final class FilesystemsImpl { + /** + * The proxy service used to perform REST calls. + */ + private FilesystemsService service; + + /** + * The service client containing this operation class. + */ + private DataLakeStorageClientImpl client; + + /** + * Initializes an instance of FilesystemsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + public FilesystemsImpl(DataLakeStorageClientImpl client) { + this.service = RestProxy.create(FilesystemsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for + * DataLakeStorageClientFilesystems to be used by the proxy service to + * perform REST calls. + */ + @Host("http://{accountName}.{dnsSuffix}") + @ServiceInterface(name = "DataLakeStorageClientFilesystems") + private interface FilesystemsService { + @Get("") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono list(@HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("resource") String resource, @QueryParam("prefix") String prefix, @QueryParam("continuation") String continuation, @QueryParam("maxResults") Integer maxResults, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Put("{filesystem}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono create(@PathParam("filesystem") String filesystem, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @HeaderParam("x-ms-properties") String xMsProperties, @QueryParam("resource") String resource, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Patch("{filesystem}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono setProperties(@PathParam("filesystem") String filesystem, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @HeaderParam("x-ms-properties") String xMsProperties, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @QueryParam("resource") String resource, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Head("{filesystem}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono getProperties(@PathParam("filesystem") String filesystem, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("resource") String resource, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Delete("{filesystem}") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono delete(@PathParam("filesystem") String filesystem, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @QueryParam("resource") String resource, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + } + + /** + * List Filesystems + * List filesystems and their properties in given account. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listWithRestResponseAsync(Context context) { + final String resource = "account"; + final String prefix = null; + final String continuation = null; + final Integer maxResults = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.list(this.client.getAccountName(), this.client.getDnsSuffix(), resource, prefix, continuation, maxResults, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * List Filesystems + * List filesystems and their properties in given account. + * + * @param prefix Filters results to filesystems within the specified prefix. + * @param continuation The number of filesystems returned with each invocation is limited. If the number of filesystems to be returned exceeds this limit, a continuation token is returned in the response header x-ms-continuation. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the filesystems. + * @param maxResults An optional value that specifies the maximum number of items to return. If omitted or greater than 5,000, the response will include up to 5,000 items. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listWithRestResponseAsync(String prefix, String continuation, Integer maxResults, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "account"; + return service.list(this.client.getAccountName(), this.client.getDnsSuffix(), resource, prefix, continuation, maxResults, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Create Filesystem + * Create a filesystem rooted at the specified location. If the filesystem already exists, the operation fails. This operation does not support conditional HTTP requests. + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithRestResponseAsync(String filesystem, Context context) { + final String xMsProperties = null; + final String resource = "filesystem"; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.create(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), xMsProperties, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Create Filesystem + * Create a filesystem rooted at the specified location. If the filesystem already exists, the operation fails. This operation does not support conditional HTTP requests. + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param xMsProperties User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 encoded string. Note that the string may only contain ASCII characters in the ISO-8859-1 character set. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithRestResponseAsync(String filesystem, String xMsProperties, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "filesystem"; + return service.create(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), xMsProperties, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Set Filesystem Properties + * Set properties for the filesystem. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setPropertiesWithRestResponseAsync(String filesystem, Context context) { + final String xMsProperties = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String resource = "filesystem"; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.setProperties(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), xMsProperties, ifModifiedSince, ifUnmodifiedSince, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Set Filesystem Properties + * Set properties for the filesystem. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param xMsProperties Optional. User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 encoded string. Note that the string may only contain ASCII characters in the ISO-8859-1 character set. If the filesystem exists, any properties not included in the list will be removed. All properties are removed if the header is omitted. To merge new and existing properties, first get all existing properties and the current E-Tag, then make a conditional request with the E-Tag and include values for all properties. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setPropertiesWithRestResponseAsync(String filesystem, String xMsProperties, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "filesystem"; + return service.setProperties(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), xMsProperties, ifModifiedSince, ifUnmodifiedSince, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Get Filesystem Properties. + * All system and user-defined filesystem properties are specified in the response headers. + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithRestResponseAsync(String filesystem, Context context) { + final String resource = "filesystem"; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.getProperties(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Get Filesystem Properties. + * All system and user-defined filesystem properties are specified in the response headers. + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithRestResponseAsync(String filesystem, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "filesystem"; + return service.getProperties(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Delete Filesystem + * Marks the filesystem for deletion. When a filesystem is deleted, a filesystem with the same identifier cannot be created for at least 30 seconds. While the filesystem is being deleted, attempts to create a filesystem with the same identifier will fail with status code 409 (Conflict), with the service returning additional error information indicating that the filesystem is being deleted. All other operations, including operations on any files or directories within the filesystem, will fail with status code 404 (Not Found) while the filesystem is being deleted. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithRestResponseAsync(String filesystem, Context context) { + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String resource = "filesystem"; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.delete(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), ifModifiedSince, ifUnmodifiedSince, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Delete Filesystem + * Marks the filesystem for deletion. When a filesystem is deleted, a filesystem with the same identifier cannot be created for at least 30 seconds. While the filesystem is being deleted, attempts to create a filesystem with the same identifier will fail with status code 409 (Conflict), with the service returning additional error information indicating that the filesystem is being deleted. All other operations, including operations on any files or directories within the filesystem, will fail with status code 404 (Not Found) while the filesystem is being deleted. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithRestResponseAsync(String filesystem, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "filesystem"; + return service.delete(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), ifModifiedSince, ifUnmodifiedSince, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/PathsImpl.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/PathsImpl.java new file mode 100644 index 000000000000..352aabe497f0 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/PathsImpl.java @@ -0,0 +1,530 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Head; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; +import com.azure.core.util.Context; +import com.azure.storage.file.datalake.models.DataLakeStorageErrorException; +import com.azure.storage.file.datalake.models.PathGetPropertiesAction; +import com.azure.storage.file.datalake.models.PathLeaseAction; +import com.azure.storage.file.datalake.models.PathRenameMode; +import com.azure.storage.file.datalake.models.PathResourceType; +import com.azure.storage.file.datalake.models.PathsCreateResponse; +import com.azure.storage.file.datalake.models.PathsDeleteResponse; +import com.azure.storage.file.datalake.models.PathsGetPropertiesResponse; +import com.azure.storage.file.datalake.models.PathsLeaseResponse; +import com.azure.storage.file.datalake.models.PathsListResponse; +import com.azure.storage.file.datalake.models.PathsReadResponse; +import com.azure.storage.file.datalake.models.PathsUpdateResponse; +import com.azure.storage.file.datalake.models.PathUpdateAction; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * Paths. + */ +public final class PathsImpl { + /** + * The proxy service used to perform REST calls. + */ + private PathsService service; + + /** + * The service client containing this operation class. + */ + private DataLakeStorageClientImpl client; + + /** + * Initializes an instance of PathsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + public PathsImpl(DataLakeStorageClientImpl client) { + this.service = RestProxy.create(PathsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for DataLakeStorageClientPaths + * to be used by the proxy service to perform REST calls. + */ + @Host("http://{accountName}.{dnsSuffix}") + @ServiceInterface(name = "DataLakeStorageClientPaths") + private interface PathsService { + @Get("{filesystem}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono list(@PathParam("filesystem") String filesystem, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("directory") String directory, @QueryParam("recursive") boolean recursive, @QueryParam("continuation") String continuation, @QueryParam("maxResults") Integer maxResults, @QueryParam("upn") Boolean upn, @QueryParam("resource") String resource, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Put("{filesystem}/{path}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono create(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("resource") PathResourceType resource, @QueryParam("continuation") String continuation, @QueryParam("mode") PathRenameMode mode, @HeaderParam("Cache-Control") String cacheControl, @HeaderParam("Content-Encoding") String contentEncoding, @HeaderParam("Content-Language") String contentLanguage, @HeaderParam("Content-Disposition") String contentDisposition, @HeaderParam("x-ms-cache-control") String xMsCacheControl, @HeaderParam("x-ms-content-type") String xMsContentType, @HeaderParam("x-ms-content-encoding") String xMsContentEncoding, @HeaderParam("x-ms-content-language") String xMsContentLanguage, @HeaderParam("x-ms-content-disposition") String xMsContentDisposition, @HeaderParam("x-ms-rename-source") String xMsRenameSource, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("x-ms-source-lease-id") String xMsSourceLeaseId, @HeaderParam("x-ms-properties") String xMsProperties, @HeaderParam("x-ms-permissions") String xMsPermissions, @HeaderParam("x-ms-umask") String xMsUmask, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String xMsSourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String xMsSourceIfNoneMatch, @HeaderParam("x-ms-source-if-modified-since") String xMsSourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") String xMsSourceIfUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Patch("{filesystem}/{path}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono update(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("action") PathUpdateAction action, @QueryParam("position") Long position, @QueryParam("retainUncommittedData") Boolean retainUncommittedData, @QueryParam("close") Boolean close, @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Content-MD5") String contentMD5, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("x-ms-cache-control") String xMsCacheControl, @HeaderParam("x-ms-content-type") String xMsContentType, @HeaderParam("x-ms-content-disposition") String xMsContentDisposition, @HeaderParam("x-ms-content-encoding") String xMsContentEncoding, @HeaderParam("x-ms-content-language") String xMsContentLanguage, @HeaderParam("x-ms-content-md5") String xMsContentMd5, @HeaderParam("x-ms-properties") String xMsProperties, @HeaderParam("x-ms-owner") String xMsOwner, @HeaderParam("x-ms-group") String xMsGroup, @HeaderParam("x-ms-permissions") String xMsPermissions, @HeaderParam("x-ms-acl") String xMsAcl, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @BodyParam("application/octet-stream") Flux requestBody, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Post("{filesystem}/{path}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono lease(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @HeaderParam("x-ms-lease-action") PathLeaseAction xMsLeaseAction, @HeaderParam("x-ms-lease-duration") Integer xMsLeaseDuration, @HeaderParam("x-ms-lease-break-period") Integer xMsLeaseBreakPeriod, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("x-ms-proposed-lease-id") String xMsProposedLeaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Get("{filesystem}/{path}") + @ExpectedResponses({200, 206}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono read(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @HeaderParam("Range") String range, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("x-ms-range-get-content-md5") Boolean xMsRangeGetContentMd5, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Head("{filesystem}/{path}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono getProperties(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("action") PathGetPropertiesAction action, @QueryParam("upn") Boolean upn, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + + @Delete("{filesystem}/{path}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DataLakeStorageErrorException.class) + Mono delete(@PathParam("filesystem") String filesystem, @PathParam("path") String path, @HostParam("accountName") String accountName, @HostParam("dnsSuffix") String dnsSuffix, @QueryParam("recursive") Boolean recursive, @QueryParam("continuation") String continuation, @HeaderParam("x-ms-lease-id") String xMsLeaseId, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-date") String xMsDate, @HeaderParam("x-ms-version") String xMsVersion, Context context); + } + + /** + * List Paths + * List filesystem paths and their properties. + * + * @param recursive If "true", all paths are listed; otherwise, only paths at the root of the filesystem are listed. If "directory" is specified, the list will only include paths that share the same root. + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listWithRestResponseAsync(boolean recursive, String filesystem, Context context) { + final String directory = null; + final String continuation = null; + final Integer maxResults = null; + final Boolean upn = null; + final String resource = "filesystem"; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.list(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), directory, recursive, continuation, maxResults, upn, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * List Paths + * List filesystem paths and their properties. + * + * @param recursive If "true", all paths are listed; otherwise, only paths at the root of the filesystem are listed. If "directory" is specified, the list will only include paths that share the same root. + * @param filesystem The filesystem identifier. The value must start and end with a letter or number and must contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted. All letters must be lowercase. The value must have between 3 and 63 characters. + * @param directory Filters results to paths within the specified directory. An error occurs if the directory does not exist. + * @param continuation The number of paths returned with each invocation is limited. If the number of paths to be returned exceeds this limit, a continuation token is returned in the response header x-ms-continuation. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the paths. + * @param maxResults An optional value that specifies the maximum number of items to return. If omitted or greater than 5,000, the response will include up to 5,000 items. + * @param upn Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true", the user identity values returned in the owner and group fields of each list entry will be transformed from Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translated because they do not have unique friendly names. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listWithRestResponseAsync(boolean recursive, String filesystem, String directory, String continuation, Integer maxResults, Boolean upn, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + final String resource = "filesystem"; + return service.list(filesystem, this.client.getAccountName(), this.client.getDnsSuffix(), directory, recursive, continuation, maxResults, upn, resource, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Create File | Create Directory | Rename File | Rename Directory + * Create or rename a file or directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). To fail if the destination already exists, use a conditional request with If-None-Match: "*". + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithRestResponseAsync(String filesystem, String path, Context context) { + final PathResourceType resource = null; + final String continuation = null; + final PathRenameMode mode = null; + final String cacheControl = null; + final String contentEncoding = null; + final String contentLanguage = null; + final String contentDisposition = null; + final String xMsCacheControl = null; + final String xMsContentType = null; + final String xMsContentEncoding = null; + final String xMsContentLanguage = null; + final String xMsContentDisposition = null; + final String xMsRenameSource = null; + final String xMsLeaseId = null; + final String xMsSourceLeaseId = null; + final String xMsProperties = null; + final String xMsPermissions = null; + final String xMsUmask = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String xMsSourceIfMatch = null; + final String xMsSourceIfNoneMatch = null; + final String xMsSourceIfModifiedSince = null; + final String xMsSourceIfUnmodifiedSince = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.create(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), resource, continuation, mode, cacheControl, contentEncoding, contentLanguage, contentDisposition, xMsCacheControl, xMsContentType, xMsContentEncoding, xMsContentLanguage, xMsContentDisposition, xMsRenameSource, xMsLeaseId, xMsSourceLeaseId, xMsProperties, xMsPermissions, xMsUmask, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsSourceIfMatch, xMsSourceIfNoneMatch, xMsSourceIfModifiedSince, xMsSourceIfUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Create File | Create Directory | Rename File | Rename Directory + * Create or rename a file or directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). To fail if the destination already exists, use a conditional request with If-None-Match: "*". + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param resource Required only for Create File and Create Directory. The value must be "file" or "directory". Possible values include: 'directory', 'file'. + * @param continuation Optional. When renaming a directory, the number of paths that are renamed with each invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the rename operation to continue renaming the directory. + * @param mode Optional. Valid only when namespace is enabled. This parameter determines the behavior of the rename operation. The value must be "legacy" or "posix", and the default value will be "posix". Possible values include: 'legacy', 'posix'. + * @param cacheControl Optional. The service stores this value and includes it in the "Cache-Control" response header for "Read File" operations for "Read File" operations. + * @param contentEncoding Optional. Specifies which content encodings have been applied to the file. This value is returned to the client when the "Read File" operation is performed. + * @param contentLanguage Optional. Specifies the natural language used by the intended audience for the file. + * @param contentDisposition Optional. The service stores this value and includes it in the "Content-Disposition" response header for "Read File" operations. + * @param xMsCacheControl Optional. The service stores this value and includes it in the "Cache-Control" response header for "Read File" operations. + * @param xMsContentType Optional. The service stores this value and includes it in the "Content-Type" response header for "Read File" operations. + * @param xMsContentEncoding Optional. The service stores this value and includes it in the "Content-Encoding" response header for "Read File" operations. + * @param xMsContentLanguage Optional. The service stores this value and includes it in the "Content-Language" response header for "Read File" operations. + * @param xMsContentDisposition Optional. The service stores this value and includes it in the "Content-Disposition" response header for "Read File" operations. + * @param xMsRenameSource An optional file or directory to be renamed. The value must have the following format: "/{filesystem}/{path}". If "x-ms-properties" is specified, the properties will overwrite the existing properties; otherwise, the existing properties will be preserved. This value must be a URL percent-encoded string. Note that the string may only contain ASCII characters in the ISO-8859-1 character set. + * @param xMsLeaseId Optional. A lease ID for the path specified in the URI. The path to be overwritten must have an active lease and the lease ID must match. + * @param xMsSourceLeaseId Optional for rename operations. A lease ID for the source path. The source path must have an active lease and the lease ID must match. + * @param xMsProperties Optional. User-defined properties to be stored with the file or directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 encoded string. Note that the string may only contain ASCII characters in the ISO-8859-1 character set. + * @param xMsPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. + * @param xMsUmask Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. The resulting permission is given by p & ^u, where p is the permission and u is the umask. For example, if p is 0777 and u is 0057, then the resulting permission is 0720. The default permission is 0777 for a directory and 0666 for a file. The default umask is 0027. The umask must be specified in 4-digit octal notation (e.g. 0766). + * @param ifMatch Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsSourceIfMatch Optional. An ETag value. Specify this header to perform the rename operation only if the source's ETag matches the value specified. The ETag must be specified in quotes. + * @param xMsSourceIfNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the rename operation only if the source's ETag does not match the value specified. The ETag must be specified in quotes. + * @param xMsSourceIfModifiedSince Optional. A date and time value. Specify this header to perform the rename operation only if the source has been modified since the specified date and time. + * @param xMsSourceIfUnmodifiedSince Optional. A date and time value. Specify this header to perform the rename operation only if the source has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithRestResponseAsync(String filesystem, String path, PathResourceType resource, String continuation, PathRenameMode mode, String cacheControl, String contentEncoding, String contentLanguage, String contentDisposition, String xMsCacheControl, String xMsContentType, String xMsContentEncoding, String xMsContentLanguage, String xMsContentDisposition, String xMsRenameSource, String xMsLeaseId, String xMsSourceLeaseId, String xMsProperties, String xMsPermissions, String xMsUmask, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, String xMsSourceIfMatch, String xMsSourceIfNoneMatch, String xMsSourceIfModifiedSince, String xMsSourceIfUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.create(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), resource, continuation, mode, cacheControl, contentEncoding, contentLanguage, contentDisposition, xMsCacheControl, xMsContentType, xMsContentEncoding, xMsContentLanguage, xMsContentDisposition, xMsRenameSource, xMsLeaseId, xMsSourceLeaseId, xMsProperties, xMsPermissions, xMsUmask, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsSourceIfMatch, xMsSourceIfNoneMatch, xMsSourceIfModifiedSince, xMsSourceIfUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Append Data | Flush Data | Set Properties | Set Access Control + * Uploads data to be appended to a file, flushes (writes) previously uploaded data to a file, sets properties for a file or directory, or sets access control for a file or directory. Data can only be appended to a file. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param action The action must be "append" to upload data to be appended to a file, "flush" to flush previously uploaded data to a file, "setProperties" to set the properties of a file or directory, or "setAccessControl" to set the owner, group, permissions, or access control list for a file or directory. Note that Hierarchical Namespace must be enabled for the account in order to use access control. Also note that the Access Control List (ACL) includes permissions for the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl'. + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateWithRestResponseAsync(PathUpdateAction action, String filesystem, String path, Context context) { + final Long position = null; + final Boolean retainUncommittedData = null; + final Boolean close = null; + final Long contentLength = null; + final String contentMD5 = null; + final String xMsLeaseId = null; + final String xMsCacheControl = null; + final String xMsContentType = null; + final String xMsContentDisposition = null; + final String xMsContentEncoding = null; + final String xMsContentLanguage = null; + final String xMsContentMd5 = null; + final String xMsProperties = null; + final String xMsOwner = null; + final String xMsGroup = null; + final String xMsPermissions = null; + final String xMsAcl = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final Flux requestBody = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.update(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), action, position, retainUncommittedData, close, contentLength, contentMD5, xMsLeaseId, xMsCacheControl, xMsContentType, xMsContentDisposition, xMsContentEncoding, xMsContentLanguage, xMsContentMd5, xMsProperties, xMsOwner, xMsGroup, xMsPermissions, xMsAcl, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, requestBody, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Append Data | Flush Data | Set Properties | Set Access Control + * Uploads data to be appended to a file, flushes (writes) previously uploaded data to a file, sets properties for a file or directory, or sets access control for a file or directory. Data can only be appended to a file. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param action The action must be "append" to upload data to be appended to a file, "flush" to flush previously uploaded data to a file, "setProperties" to set the properties of a file or directory, or "setAccessControl" to set the owner, group, permissions, or access control list for a file or directory. Note that Hierarchical Namespace must be enabled for the account in order to use access control. Also note that the Access Control List (ACL) includes permissions for the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl'. + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param position This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. It is required when uploading data to be appended to the file and when flushing previously uploaded data to the file. The value must be the position where the data is to be appended. Uploaded data is not immediately flushed, or written, to the file. To flush, the previously uploaded data must be contiguous, the position parameter must be specified and equal to the length of the file after all data has been written, and there must not be a request entity body included with the request. + * @param retainUncommittedData Valid only for flush operations. If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation. The default is false. Data at offsets less than the specified position are written to the file when flush succeeds, but this optional parameter allows data after the flush position to be retained for a future flush operation. + * @param close Azure Storage Events allow applications to receive notifications when files change. When Azure Storage Events are enabled, a file changed event is raised. This event has a property indicating whether this is the final change to distinguish the difference between an intermediate flush to a file stream and the final close of a file stream. The close query parameter is valid only when the action is "flush" and change notifications are enabled. If the value of close is "true" and the flush operation completes successfully, the service raises a file change notification with a property indicating that this is the final update (the file stream has been closed). If "false" a change notification is raised indicating the file has changed. The default is false. This query parameter is set to true by the Hadoop ABFS driver to indicate that the file stream has been closed.". + * @param contentLength Required for "Append Data" and "Flush Data". Must be 0 for "Flush Data". Must be the length of the request content in bytes for "Append Data". + * @param contentMD5 Optional. An MD5 hash of the request content. This header is valid on "Append" and "Flush" operations. This hash is used to verify the integrity of the request content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). Note that this MD5 hash is not stored with the file. This header is associated with the request content, and not with the stored content of the file itself. + * @param xMsLeaseId The lease ID must be specified if there is an active lease. + * @param xMsCacheControl Optional and only valid for flush and set properties operations. The service stores this value and includes it in the "Cache-Control" response header for "Read File" operations. + * @param xMsContentType Optional and only valid for flush and set properties operations. The service stores this value and includes it in the "Content-Type" response header for "Read File" operations. + * @param xMsContentDisposition Optional and only valid for flush and set properties operations. The service stores this value and includes it in the "Content-Disposition" response header for "Read File" operations. + * @param xMsContentEncoding Optional and only valid for flush and set properties operations. The service stores this value and includes it in the "Content-Encoding" response header for "Read File" operations. + * @param xMsContentLanguage Optional and only valid for flush and set properties operations. The service stores this value and includes it in the "Content-Language" response header for "Read File" operations. + * @param xMsContentMd5 Optional and only valid for "Flush & Set Properties" operations. The service stores this value and includes it in the "Content-Md5" response header for "Read & Get Properties" operations. If this property is not specified on the request, then the property will be cleared for the file. Subsequent calls to "Read & Get Properties" will not return this property unless it is explicitly set on that file again. + * @param xMsProperties Optional. User-defined properties to be stored with the file or directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 encoded string. Note that the string may only contain ASCII characters in the ISO-8859-1 character set. Valid only for the setProperties operation. If the file or directory exists, any properties not included in the list will be removed. All properties are removed if the header is omitted. To merge new and existing properties, first get all existing properties and the current E-Tag, then make a conditional request with the E-Tag and include values for all properties. + * @param xMsOwner Optional and valid only for the setAccessControl operation. Sets the owner of the file or directory. + * @param xMsGroup Optional and valid only for the setAccessControl operation. Sets the owning group of the file or directory. + * @param xMsPermissions Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. Invalid in conjunction with x-ms-acl. + * @param xMsAcl Optional and valid only for the setAccessControl operation. Sets POSIX access control rights on files and directories. The value is a comma-separated list of access control entries that fully replaces the existing access control list (ACL). Each access control entry (ACE) consists of a scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". The scope must be "default" to indicate the ACE belongs to the default ACL for a directory; otherwise scope is implicit and the ACE belongs to the access ACL. There are four ACE types: "user" grants rights to the owner or a named user, "group" grants rights to the owning group or a named group, "mask" restricts rights granted to named users and the members of groups, and "other" grants rights to all users not found in any of the other entries. The user or group identifier is omitted for entries of type "mask" and "other". The user or group identifier is also omitted for the owner and owning group. The permission field is a 3-character sequence where the first character is 'r' to grant read access, the second character is 'w' to grant write access, and the third character is 'x' to grant execute permission. If access is not granted, the '-' character is used to denote that the permission is denied. For example, the following ACL grants read, write, and execute rights to the file owner and john.doe@contoso, the read right to the owning group, and nothing to everyone else: "user::rwx,user:john.doe@contoso:rwx,group::r--,other::---,mask=rwx". Invalid in conjunction with x-ms-permissions. + * @param ifMatch Optional for Flush Data and Set Properties, but invalid for Append Data. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional for Flush Data and Set Properties, but invalid for Append Data. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional for Flush Data and Set Properties, but invalid for Append Data. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional for Flush Data and Set Properties, but invalid for Append Data. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param requestBody Valid only for append operations. The data to be uploaded and appended to the file. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateWithRestResponseAsync(PathUpdateAction action, String filesystem, String path, Long position, Boolean retainUncommittedData, Boolean close, Long contentLength, String contentMD5, String xMsLeaseId, String xMsCacheControl, String xMsContentType, String xMsContentDisposition, String xMsContentEncoding, String xMsContentLanguage, String xMsContentMd5, String xMsProperties, String xMsOwner, String xMsGroup, String xMsPermissions, String xMsAcl, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, Flux requestBody, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.update(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), action, position, retainUncommittedData, close, contentLength, contentMD5, xMsLeaseId, xMsCacheControl, xMsContentType, xMsContentDisposition, xMsContentEncoding, xMsContentLanguage, xMsContentMd5, xMsProperties, xMsOwner, xMsGroup, xMsPermissions, xMsAcl, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, requestBody, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Lease Path + * Create and manage a lease to restrict write and delete access to the path. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param xMsLeaseAction There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break" to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease operation except break and release can be performed on the file. When a lease is successfully broken, the response indicates the interval in seconds until a new lease can be acquired. Use "change" and specify the current lease ID in "x-ms-lease-id" and the new lease ID in "x-ms-proposed-lease-id" to change the lease ID of an active lease. Use "renew" and specify the "x-ms-lease-id" to renew an existing lease. Use "release" and specify the "x-ms-lease-id" to release a lease. Possible values include: 'acquire', 'break', 'change', 'renew', 'release'. + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono leaseWithRestResponseAsync(PathLeaseAction xMsLeaseAction, String filesystem, String path, Context context) { + final Integer xMsLeaseDuration = null; + final Integer xMsLeaseBreakPeriod = null; + final String xMsLeaseId = null; + final String xMsProposedLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.lease(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), xMsLeaseAction, xMsLeaseDuration, xMsLeaseBreakPeriod, xMsLeaseId, xMsProposedLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Lease Path + * Create and manage a lease to restrict write and delete access to the path. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param xMsLeaseAction There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" to acquire a new lease. Use "break" to break an existing lease. When a lease is broken, the lease break period is allowed to elapse, during which time no lease operation except break and release can be performed on the file. When a lease is successfully broken, the response indicates the interval in seconds until a new lease can be acquired. Use "change" and specify the current lease ID in "x-ms-lease-id" and the new lease ID in "x-ms-proposed-lease-id" to change the lease ID of an active lease. Use "renew" and specify the "x-ms-lease-id" to renew an existing lease. Use "release" and specify the "x-ms-lease-id" to release a lease. Possible values include: 'acquire', 'break', 'change', 'renew', 'release'. + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param xMsLeaseDuration The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease. + * @param xMsLeaseBreakPeriod The lease break period duration is optional to break a lease, and specifies the break period of the lease in seconds. The lease break duration must be between 0 and 60 seconds. + * @param xMsLeaseId Required when "x-ms-lease-action" is "renew", "change" or "release". For the renew and release actions, this must match the current lease ID. + * @param xMsProposedLeaseId Required when "x-ms-lease-action" is "acquire" or "change". A lease will be acquired with this lease ID if the operation is successful. + * @param ifMatch Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono leaseWithRestResponseAsync(PathLeaseAction xMsLeaseAction, String filesystem, String path, Integer xMsLeaseDuration, Integer xMsLeaseBreakPeriod, String xMsLeaseId, String xMsProposedLeaseId, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.lease(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), xMsLeaseAction, xMsLeaseDuration, xMsLeaseBreakPeriod, xMsLeaseId, xMsProposedLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Read File + * Read the contents of a file. For read operations, range requests are supported. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono readWithRestResponseAsync(String filesystem, String path, Context context) { + final String range = null; + final String xMsLeaseId = null; + final Boolean xMsRangeGetContentMd5 = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.read(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), range, xMsLeaseId, xMsRangeGetContentMd5, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Read File + * Read the contents of a file. For read operations, range requests are supported. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param range The HTTP Range request header specifies one or more byte ranges of the resource to be retrieved. + * @param xMsLeaseId Optional. If this header is specified, the operation will be performed only if both of the following conditions are met: i) the path's lease is currently active and ii) the lease ID specified in the request matches that of the path. + * @param xMsRangeGetContentMd5 Optional. When this header is set to "true" and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4MB in size. If this header is specified without the Range header, the service returns status code 400 (Bad Request). If this header is set to true when the range exceeds 4 MB in size, the service returns status code 400 (Bad Request). + * @param ifMatch Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono readWithRestResponseAsync(String filesystem, String path, String range, String xMsLeaseId, Boolean xMsRangeGetContentMd5, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.read(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), range, xMsLeaseId, xMsRangeGetContentMd5, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Get Properties | Get Status | Get Access Control List + * Get Properties returns all system and user defined properties for a path. Get Status returns all system defined properties for a path. Get Access Control List returns the access control list for a path. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithRestResponseAsync(String filesystem, String path, Context context) { + final PathGetPropertiesAction action = null; + final Boolean upn = null; + final String xMsLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.getProperties(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), action, upn, xMsLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Get Properties | Get Status | Get Access Control List + * Get Properties returns all system and user defined properties for a path. Get Status returns all system defined properties for a path. Get Access Control List returns the access control list for a path. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param action Optional. If the value is "getStatus" only the system defined properties for the path are returned. If the value is "getAccessControl" the access control list is returned in the response headers (Hierarchical Namespace must be enabled for the account), otherwise the properties are returned. Possible values include: 'getAccessControl', 'getStatus'. + * @param upn Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translated because they do not have unique friendly names. + * @param xMsLeaseId Optional. If this header is specified, the operation will be performed only if both of the following conditions are met: i) the path's lease is currently active and ii) the lease ID specified in the request matches that of the path. + * @param ifMatch Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithRestResponseAsync(String filesystem, String path, PathGetPropertiesAction action, Boolean upn, String xMsLeaseId, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.getProperties(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), action, upn, xMsLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Delete File | Delete Directory + * Delete the file or directory. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithRestResponseAsync(String filesystem, String path, Context context) { + final Boolean recursive = null; + final String continuation = null; + final String xMsLeaseId = null; + final String ifMatch = null; + final String ifNoneMatch = null; + final String ifModifiedSince = null; + final String ifUnmodifiedSince = null; + final String xMsClientRequestId = null; + final Integer timeout = null; + final String xMsDate = null; + return service.delete(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), recursive, continuation, xMsLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } + + /** + * Delete File | Delete Directory + * Delete the file or directory. This operation supports conditional HTTP requests. For more information, see [Specifying Conditional Headers for Blob Service Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations). + * + * @param filesystem The filesystem identifier. + * @param path The file or directory path. + * @param recursive Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted. If "false" and the directory is non-empty, an error occurs. + * @param continuation Optional. When deleting a directory, the number of paths that are deleted with each invocation is limited. If the number of paths to be deleted exceeds this limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the delete operation to continue deleting the directory. + * @param xMsLeaseId The lease ID must be specified if there is an active lease. + * @param ifMatch Optional. An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + * @param ifNoneMatch Optional. An ETag value or the special wildcard ("*") value. Specify this header to perform the operation only if the resource's ETag does not match the value specified. The ETag must be specified in quotes. + * @param ifModifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has been modified since the specified date and time. + * @param ifUnmodifiedSince Optional. A date and time value. Specify this header to perform the operation only if the resource has not been modified since the specified date and time. + * @param xMsClientRequestId A UUID recorded in the analytics logs for troubleshooting and correlation. + * @param timeout An optional operation timeout value in seconds. The period begins when the request is received by the service. If the timeout value elapses before the operation completes, the operation fails. + * @param xMsDate Specifies the Coordinated Universal Time (UTC) for the request. This is required when using shared key authorization. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @return a Mono which performs the network request upon subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithRestResponseAsync(String filesystem, String path, Boolean recursive, String continuation, String xMsLeaseId, String ifMatch, String ifNoneMatch, String ifModifiedSince, String ifUnmodifiedSince, String xMsClientRequestId, Integer timeout, String xMsDate, Context context) { + return service.delete(filesystem, path, this.client.getAccountName(), this.client.getDnsSuffix(), recursive, continuation, xMsLeaseId, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince, xMsClientRequestId, timeout, xMsDate, this.client.getXMsVersion(), context); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/package-info.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/package-info.java new file mode 100644 index 000000000000..27df243a9213 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations and inner classes for + * DataLakeStorageClient. + * Azure Data Lake Storage provides storage for Hadoop and other big data + * workloads. + */ +package com.azure.storage.file.datalake.implementation; diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageError.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageError.java new file mode 100644 index 000000000000..648b4fd63591 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageError.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The DataLakeStorageError model. + */ +@Fluent +public final class DataLakeStorageError { + /* + * The service error response object. + */ + @JsonProperty(value = "error") + private DataLakeStorageErrorError error; + + /** + * Get the error property: The service error response object. + * + * @return the error value. + */ + public DataLakeStorageErrorError getError() { + return this.error; + } + + /** + * Set the error property: The service error response object. + * + * @param error the error value to set. + * @return the DataLakeStorageError object itself. + */ + public DataLakeStorageError setError(DataLakeStorageErrorError error) { + this.error = error; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorError.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorError.java new file mode 100644 index 000000000000..5f302241e661 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorError.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The service error response object. + */ +@Fluent +public final class DataLakeStorageErrorError { + /* + * The service error code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The service error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the code property: The service error code. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: The service error code. + * + * @param code the code value to set. + * @return the DataLakeStorageErrorError object itself. + */ + public DataLakeStorageErrorError setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The service error message. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The service error message. + * + * @param message the message value to set. + * @return the DataLakeStorageErrorError object itself. + */ + public DataLakeStorageErrorError setMessage(String message) { + this.message = message; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorException.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorException.java new file mode 100644 index 000000000000..6045cbc2e2fa --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/DataLakeStorageErrorException.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.storage.file.datalake.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** + * Exception thrown for an invalid response with DataLakeStorageError information. + */ +public final class DataLakeStorageErrorException extends HttpResponseException { + /** + * Initializes a new instance of the DataLakeStorageErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public DataLakeStorageErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the DataLakeStorageErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public DataLakeStorageErrorException(String message, HttpResponse response, DataLakeStorageError value) { + super(message, response, value); + } + + @Override + public DataLakeStorageError getValue() { + return (DataLakeStorageError) super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Filesystem.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Filesystem.java new file mode 100644 index 000000000000..8db976f13efe --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Filesystem.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Filesystem model. + */ +@Fluent +public final class Filesystem { + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The lastModified property. + */ + @JsonProperty(value = "lastModified") + private String lastModified; + + /* + * The eTag property. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the Filesystem object itself. + */ + public Filesystem setName(String name) { + this.name = name; + return this; + } + + /** + * Get the lastModified property: The lastModified property. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The lastModified property. + * + * @param lastModified the lastModified value to set. + * @return the Filesystem object itself. + */ + public Filesystem setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the eTag property: The eTag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The eTag property. + * + * @param eTag the eTag value to set. + * @return the Filesystem object itself. + */ + public Filesystem setETag(String eTag) { + this.eTag = eTag; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemCreateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemCreateHeaders.java new file mode 100644 index 000000000000..6a7674ad590c --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemCreateHeaders.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Create operation. + */ +@Fluent +public final class FilesystemCreateHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the filesystem. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the filesystem was last modified. Operations on files + * and directories do not affect the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * A bool string indicates whether the namespace feature is enabled. If + * "true", the namespace is enabled for the filesystem. + */ + @JsonProperty(value = "x-ms-namespace-enabled") + private String xMsNamespaceEnabled; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the + * filesystem. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the + * filesystem. + * + * @param eTag the eTag value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the filesystem was last + * modified. Operations on files and directories do not affect the last + * modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the filesystem was last + * modified. Operations on files and directories do not affect the last + * modified time. + * + * @param lastModified the lastModified value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsNamespaceEnabled property: A bool string indicates whether + * the namespace feature is enabled. If "true", the namespace is enabled + * for the filesystem. + * + * @return the xMsNamespaceEnabled value. + */ + public String getXMsNamespaceEnabled() { + return this.xMsNamespaceEnabled; + } + + /** + * Set the xMsNamespaceEnabled property: A bool string indicates whether + * the namespace feature is enabled. If "true", the namespace is enabled + * for the filesystem. + * + * @param xMsNamespaceEnabled the xMsNamespaceEnabled value to set. + * @return the FilesystemCreateHeaders object itself. + */ + public FilesystemCreateHeaders setXMsNamespaceEnabled(String xMsNamespaceEnabled) { + this.xMsNamespaceEnabled = xMsNamespaceEnabled; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemDeleteHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemDeleteHeaders.java new file mode 100644 index 000000000000..8950c157c142 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemDeleteHeaders.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +@Fluent +public final class FilesystemDeleteHeaders { + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the FilesystemDeleteHeaders object itself. + */ + public FilesystemDeleteHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the FilesystemDeleteHeaders object itself. + */ + public FilesystemDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesystemDeleteHeaders object itself. + */ + public FilesystemDeleteHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemGetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemGetPropertiesHeaders.java new file mode 100644 index 000000000000..646e3ee26b39 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemGetPropertiesHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for GetProperties operation. + */ +@Fluent +public final class FilesystemGetPropertiesHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the filesystem. Changes to + * filesystem properties affect the entity tag, but operations on files and + * directories do not. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the filesystem was last modified. Changes to + * filesystem properties update the last modified time, but operations on + * files and directories do not. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The user-defined properties associated with the filesystem. A + * comma-separated list of name and value pairs in the format "n1=v1, + * n2=v2, ...", where each value is a base64 encoded string. Note that the + * string may only contain ASCII characters in the ISO-8859-1 character + * set. + */ + @JsonProperty(value = "x-ms-properties") + private String xMsProperties; + + /* + * A bool string indicates whether the namespace feature is enabled. If + * "true", the namespace is enabled for the filesystem. + */ + @JsonProperty(value = "x-ms-namespace-enabled") + private String xMsNamespaceEnabled; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @param eTag the eTag value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @param lastModified the lastModified value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsProperties property: The user-defined properties associated + * with the filesystem. A comma-separated list of name and value pairs in + * the format "n1=v1, n2=v2, ...", where each value is a base64 encoded + * string. Note that the string may only contain ASCII characters in the + * ISO-8859-1 character set. + * + * @return the xMsProperties value. + */ + public String getXMsProperties() { + return this.xMsProperties; + } + + /** + * Set the xMsProperties property: The user-defined properties associated + * with the filesystem. A comma-separated list of name and value pairs in + * the format "n1=v1, n2=v2, ...", where each value is a base64 encoded + * string. Note that the string may only contain ASCII characters in the + * ISO-8859-1 character set. + * + * @param xMsProperties the xMsProperties value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setXMsProperties(String xMsProperties) { + this.xMsProperties = xMsProperties; + return this; + } + + /** + * Get the xMsNamespaceEnabled property: A bool string indicates whether + * the namespace feature is enabled. If "true", the namespace is enabled + * for the filesystem. + * + * @return the xMsNamespaceEnabled value. + */ + public String getXMsNamespaceEnabled() { + return this.xMsNamespaceEnabled; + } + + /** + * Set the xMsNamespaceEnabled property: A bool string indicates whether + * the namespace feature is enabled. If "true", the namespace is enabled + * for the filesystem. + * + * @param xMsNamespaceEnabled the xMsNamespaceEnabled value to set. + * @return the FilesystemGetPropertiesHeaders object itself. + */ + public FilesystemGetPropertiesHeaders setXMsNamespaceEnabled(String xMsNamespaceEnabled) { + this.xMsNamespaceEnabled = xMsNamespaceEnabled; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemList.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemList.java new file mode 100644 index 000000000000..0a178366730b --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemList.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The FilesystemList model. + */ +@Fluent +public final class FilesystemList { + /* + * The filesystems property. + */ + @JsonProperty(value = "filesystems") + private List filesystems; + + /** + * Get the filesystems property: The filesystems property. + * + * @return the filesystems value. + */ + public List getFilesystems() { + return this.filesystems; + } + + /** + * Set the filesystems property: The filesystems property. + * + * @param filesystems the filesystems value to set. + * @return the FilesystemList object itself. + */ + public FilesystemList setFilesystems(List filesystems) { + this.filesystems = filesystems; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemListHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemListHeaders.java new file mode 100644 index 000000000000..193aeea5f3af --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemListHeaders.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for List operation. + */ +@Fluent +public final class FilesystemListHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * If the number of filesystems to be listed exceeds the maxResults limit, + * a continuation token is returned in this response header. When a + * continuation token is returned in the response, it must be specified in + * a subsequent invocation of the list operation to continue listing the + * filesystems. + */ + @JsonProperty(value = "x-ms-continuation") + private String xMsContinuation; + + /* + * The content type of list filesystem response. The default content type + * is application/json. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesystemListHeaders object itself. + */ + public FilesystemListHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the FilesystemListHeaders object itself. + */ + public FilesystemListHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the FilesystemListHeaders object itself. + */ + public FilesystemListHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuation property: If the number of filesystems to be + * listed exceeds the maxResults limit, a continuation token is returned in + * this response header. When a continuation token is returned in the + * response, it must be specified in a subsequent invocation of the list + * operation to continue listing the filesystems. + * + * @return the xMsContinuation value. + */ + public String getXMsContinuation() { + return this.xMsContinuation; + } + + /** + * Set the xMsContinuation property: If the number of filesystems to be + * listed exceeds the maxResults limit, a continuation token is returned in + * this response header. When a continuation token is returned in the + * response, it must be specified in a subsequent invocation of the list + * operation to continue listing the filesystems. + * + * @param xMsContinuation the xMsContinuation value to set. + * @return the FilesystemListHeaders object itself. + */ + public FilesystemListHeaders setXMsContinuation(String xMsContinuation) { + this.xMsContinuation = xMsContinuation; + return this; + } + + /** + * Get the contentType property: The content type of list filesystem + * response. The default content type is application/json. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type of list filesystem + * response. The default content type is application/json. + * + * @param contentType the contentType value to set. + * @return the FilesystemListHeaders object itself. + */ + public FilesystemListHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemSetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemSetPropertiesHeaders.java new file mode 100644 index 000000000000..7cefffede86f --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemSetPropertiesHeaders.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for SetProperties operation. + */ +@Fluent +public final class FilesystemSetPropertiesHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the filesystem. Changes to + * filesystem properties affect the entity tag, but operations on files and + * directories do not. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the filesystem was last modified. Changes to + * filesystem properties update the last modified time, but operations on + * files and directories do not. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesystemSetPropertiesHeaders object itself. + */ + public FilesystemSetPropertiesHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @param eTag the eTag value to set. + * @return the FilesystemSetPropertiesHeaders object itself. + */ + public FilesystemSetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @param lastModified the lastModified value to set. + * @return the FilesystemSetPropertiesHeaders object itself. + */ + public FilesystemSetPropertiesHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the FilesystemSetPropertiesHeaders object itself. + */ + public FilesystemSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the FilesystemSetPropertiesHeaders object itself. + */ + public FilesystemSetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsCreateResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsCreateResponse.java new file mode 100644 index 000000000000..2bb9ff6a9453 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsCreateResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the create operation. + */ +public final class FilesystemsCreateResponse extends ResponseBase { + /** + * Creates an instance of FilesystemsCreateResponse. + * + * @param request the request which resulted in this FilesystemsCreateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FilesystemsCreateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, FilesystemCreateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsDeleteResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsDeleteResponse.java new file mode 100644 index 000000000000..09ca6bc474fb --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsDeleteResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the delete operation. + */ +public final class FilesystemsDeleteResponse extends ResponseBase { + /** + * Creates an instance of FilesystemsDeleteResponse. + * + * @param request the request which resulted in this FilesystemsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FilesystemsDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, FilesystemDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsGetPropertiesResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsGetPropertiesResponse.java new file mode 100644 index 000000000000..daee39a896be --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsGetPropertiesResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the getProperties operation. + */ +public final class FilesystemsGetPropertiesResponse extends ResponseBase { + /** + * Creates an instance of FilesystemsGetPropertiesResponse. + * + * @param request the request which resulted in this FilesystemsGetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FilesystemsGetPropertiesResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, FilesystemGetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsListResponse.java similarity index 57% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsResponse.java rename to sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsListResponse.java index 34efeb8b2c62..2361ba0e0cb6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsResponse.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsListResponse.java @@ -2,26 +2,26 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.file.datalake.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; /** - * Contains all response data for the filterBlobs operation. + * Contains all response data for the list operation. */ -public final class ServicesFilterBlobsResponse extends ResponseBase { +public final class FilesystemsListResponse extends ResponseBase { /** - * Creates an instance of ServicesFilterBlobsResponse. + * Creates an instance of FilesystemsListResponse. * - * @param request the request which resulted in this ServicesFilterBlobsResponse. + * @param request the request which resulted in this FilesystemsListResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public ServicesFilterBlobsResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, FilterBlobsResponse value, ServiceFilterBlobsHeaders headers) { + public FilesystemsListResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, FilesystemList value, FilesystemListHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } @@ -29,7 +29,7 @@ public ServicesFilterBlobsResponse(HttpRequest request, int statusCode, HttpHead * @return the deserialized response body. */ @Override - public FilterBlobsResponse getValue() { + public FilesystemList getValue() { return super.getValue(); } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsSetPropertiesResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsSetPropertiesResponse.java new file mode 100644 index 000000000000..5d841632e936 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FilesystemsSetPropertiesResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the setProperties operation. + */ +public final class FilesystemsSetPropertiesResponse extends ResponseBase { + /** + * Creates an instance of FilesystemsSetPropertiesResponse. + * + * @param request the request which resulted in this FilesystemsSetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public FilesystemsSetPropertiesResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, FilesystemSetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Path.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Path.java new file mode 100644 index 000000000000..ab7cd9161da7 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/Path.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Path model. + */ +@Fluent +public final class Path { + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The isDirectory property. + */ + @JsonProperty(value = "isDirectory") + private Boolean isDirectory; + + /* + * The lastModified property. + */ + @JsonProperty(value = "lastModified") + private String lastModified; + + /* + * The eTag property. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * The contentLength property. + */ + @JsonProperty(value = "contentLength") + private Long contentLength; + + /* + * The owner property. + */ + @JsonProperty(value = "owner") + private String owner; + + /* + * The group property. + */ + @JsonProperty(value = "group") + private String group; + + /* + * The permissions property. + */ + @JsonProperty(value = "permissions") + private String permissions; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the Path object itself. + */ + public Path setName(String name) { + this.name = name; + return this; + } + + /** + * Get the isDirectory property: The isDirectory property. + * + * @return the isDirectory value. + */ + public Boolean isDirectory() { + return this.isDirectory; + } + + /** + * Set the isDirectory property: The isDirectory property. + * + * @param isDirectory the isDirectory value to set. + * @return the Path object itself. + */ + public Path setIsDirectory(Boolean isDirectory) { + this.isDirectory = isDirectory; + return this; + } + + /** + * Get the lastModified property: The lastModified property. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The lastModified property. + * + * @param lastModified the lastModified value to set. + * @return the Path object itself. + */ + public Path setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the eTag property: The eTag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The eTag property. + * + * @param eTag the eTag value to set. + * @return the Path object itself. + */ + public Path setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentLength property: The contentLength property. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The contentLength property. + * + * @param contentLength the contentLength value to set. + * @return the Path object itself. + */ + public Path setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the owner property: The owner property. + * + * @return the owner value. + */ + public String getOwner() { + return this.owner; + } + + /** + * Set the owner property: The owner property. + * + * @param owner the owner value to set. + * @return the Path object itself. + */ + public Path setOwner(String owner) { + this.owner = owner; + return this; + } + + /** + * Get the group property: The group property. + * + * @return the group value. + */ + public String getGroup() { + return this.group; + } + + /** + * Set the group property: The group property. + * + * @param group the group value to set. + * @return the Path object itself. + */ + public Path setGroup(String group) { + this.group = group; + return this; + } + + /** + * Get the permissions property: The permissions property. + * + * @return the permissions value. + */ + public String getPermissions() { + return this.permissions; + } + + /** + * Set the permissions property: The permissions property. + * + * @param permissions the permissions value to set. + * @return the Path object itself. + */ + public Path setPermissions(String permissions) { + this.permissions = permissions; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathCreateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathCreateHeaders.java new file mode 100644 index 000000000000..82f0bd4df16e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathCreateHeaders.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Create operation. + */ +@Fluent +public final class PathCreateHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the file or directory. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the file or directory was last modified. Write + * operations on the file or directory update the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * When renaming a directory, the number of paths that are renamed with + * each invocation is limited. If the number of paths to be renamed + * exceeds this limit, a continuation token is returned in this response + * header. When a continuation token is returned in the response, it must + * be specified in a subsequent invocation of the rename operation to + * continue renaming the directory. + */ + @JsonProperty(value = "x-ms-continuation") + private String xMsContinuation; + + /* + * The size of the resource in bytes. + */ + @JsonProperty(value = "Content-Length") + private Long contentLength; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @param eTag the eTag value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @param lastModified the lastModified value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuation property: When renaming a directory, the number + * of paths that are renamed with each invocation is limited. If the + * number of paths to be renamed exceeds this limit, a continuation token + * is returned in this response header. When a continuation token is + * returned in the response, it must be specified in a subsequent + * invocation of the rename operation to continue renaming the directory. + * + * @return the xMsContinuation value. + */ + public String getXMsContinuation() { + return this.xMsContinuation; + } + + /** + * Set the xMsContinuation property: When renaming a directory, the number + * of paths that are renamed with each invocation is limited. If the + * number of paths to be renamed exceeds this limit, a continuation token + * is returned in this response header. When a continuation token is + * returned in the response, it must be specified in a subsequent + * invocation of the rename operation to continue renaming the directory. + * + * @param xMsContinuation the xMsContinuation value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setXMsContinuation(String xMsContinuation) { + this.xMsContinuation = xMsContinuation; + return this; + } + + /** + * Get the contentLength property: The size of the resource in bytes. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The size of the resource in bytes. + * + * @param contentLength the contentLength value to set. + * @return the PathCreateHeaders object itself. + */ + public PathCreateHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathDeleteHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathDeleteHeaders.java new file mode 100644 index 000000000000..d9934fc71361 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathDeleteHeaders.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +@Fluent +public final class PathDeleteHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * When deleting a directory, the number of paths that are deleted with + * each invocation is limited. If the number of paths to be deleted + * exceeds this limit, a continuation token is returned in this response + * header. When a continuation token is returned in the response, it must + * be specified in a subsequent invocation of the delete operation to + * continue deleting the directory. + */ + @JsonProperty(value = "x-ms-continuation") + private String xMsContinuation; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathDeleteHeaders object itself. + */ + public PathDeleteHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathDeleteHeaders object itself. + */ + public PathDeleteHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathDeleteHeaders object itself. + */ + public PathDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuation property: When deleting a directory, the number + * of paths that are deleted with each invocation is limited. If the + * number of paths to be deleted exceeds this limit, a continuation token + * is returned in this response header. When a continuation token is + * returned in the response, it must be specified in a subsequent + * invocation of the delete operation to continue deleting the directory. + * + * @return the xMsContinuation value. + */ + public String getXMsContinuation() { + return this.xMsContinuation; + } + + /** + * Set the xMsContinuation property: When deleting a directory, the number + * of paths that are deleted with each invocation is limited. If the + * number of paths to be deleted exceeds this limit, a continuation token + * is returned in this response header. When a continuation token is + * returned in the response, it must be specified in a subsequent + * invocation of the delete operation to continue deleting the directory. + * + * @param xMsContinuation the xMsContinuation value to set. + * @return the PathDeleteHeaders object itself. + */ + public PathDeleteHeaders setXMsContinuation(String xMsContinuation) { + this.xMsContinuation = xMsContinuation; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesAction.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesAction.java new file mode 100644 index 000000000000..8e9d28d5e579 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesAction.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PathGetPropertiesAction. + */ +public enum PathGetPropertiesAction { + /** + * Enum value getAccessControl. + */ + GET_ACCESS_CONTROL("getAccessControl"), + + /** + * Enum value getStatus. + */ + GET_STATUS("getStatus"); + + /** + * The actual serialized value for a PathGetPropertiesAction instance. + */ + private final String value; + + PathGetPropertiesAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PathGetPropertiesAction instance. + * + * @param value the serialized value to parse. + * @return the parsed PathGetPropertiesAction object, or null if unable to parse. + */ + @JsonCreator + public static PathGetPropertiesAction fromString(String value) { + PathGetPropertiesAction[] items = PathGetPropertiesAction.values(); + for (PathGetPropertiesAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesHeaders.java new file mode 100644 index 000000000000..54aa241c4b50 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathGetPropertiesHeaders.java @@ -0,0 +1,710 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for GetProperties operation. + */ +@Fluent +public final class PathGetPropertiesHeaders { + /* + * Indicates that the service supports requests for partial file content. + */ + @JsonProperty(value = "Accept-Ranges") + private String acceptRanges; + + /* + * If the Cache-Control request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Cache-Control") + private String cacheControl; + + /* + * If the Content-Disposition request header has previously been set for + * the resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Disposition") + private String contentDisposition; + + /* + * If the Content-Encoding request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Encoding") + private String contentEncoding; + + /* + * If the Content-Language request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Language") + private String contentLanguage; + + /* + * The size of the resource in bytes. + */ + @JsonProperty(value = "Content-Length") + private Long contentLength; + + /* + * Indicates the range of bytes returned in the event that the client + * requested a subset of the file by setting the Range request header. + */ + @JsonProperty(value = "Content-Range") + private String contentRange; + + /* + * The content type specified for the resource. If no content type was + * specified, the default content type is application/octet-stream. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /* + * The MD5 hash of complete file stored in storage. This header is returned + * only for "GetProperties" operation. If the Content-MD5 header has been + * set for the file, this response header is returned for GetProperties + * call so that the client can check for message content integrity. + */ + @JsonProperty(value = "Content-MD5") + private String contentMD5; + + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the file or directory. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the file or directory was last modified. Write + * operations on the file or directory update the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The type of the resource. The value may be "file" or "directory". If + * not set, the value is "file". + */ + @JsonProperty(value = "x-ms-resource-type") + private String xMsResourceType; + + /* + * The user-defined properties associated with the file or directory, in + * the format of a comma-separated list of name and value pairs "n1=v1, + * n2=v2, ...", where each value is a base64 encoded string. Note that the + * string may only contain ASCII characters in the ISO-8859-1 character + * set. + */ + @JsonProperty(value = "x-ms-properties") + private String xMsProperties; + + /* + * The owner of the file or directory. Included in the response if + * Hierarchical Namespace is enabled for the account. + */ + @JsonProperty(value = "x-ms-owner") + private String xMsOwner; + + /* + * The owning group of the file or directory. Included in the response if + * Hierarchical Namespace is enabled for the account. + */ + @JsonProperty(value = "x-ms-group") + private String xMsGroup; + + /* + * The POSIX access permissions for the file owner, the file owning group, + * and others. Included in the response if Hierarchical Namespace is + * enabled for the account. + */ + @JsonProperty(value = "x-ms-permissions") + private String xMsPermissions; + + /* + * The POSIX access control list for the file or directory. Included in + * the response only if the action is "getAccessControl" and Hierarchical + * Namespace is enabled for the account. + */ + @JsonProperty(value = "x-ms-acl") + private String xMsAcl; + + /* + * When a resource is leased, specifies whether the lease is of infinite or + * fixed duration. + */ + @JsonProperty(value = "x-ms-lease-duration") + private String xMsLeaseDuration; + + /* + * Lease state of the resource. + */ + @JsonProperty(value = "x-ms-lease-state") + private String xMsLeaseState; + + /* + * The lease status of the resource. + */ + @JsonProperty(value = "x-ms-lease-status") + private String xMsLeaseStatus; + + /** + * Get the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @param acceptRanges the acceptRanges value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @param cacheControl the cacheControl value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @param contentDisposition the contentDisposition value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentEncoding the contentEncoding value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentLanguage the contentLanguage value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the contentLength property: The size of the resource in bytes. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The size of the resource in bytes. + * + * @param contentLength the contentLength value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @return the contentRange value. + */ + public String getContentRange() { + return this.contentRange; + } + + /** + * Set the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @param contentRange the contentRange value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + /** + * Get the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @param contentType the contentType value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentMD5 property: The MD5 hash of complete file stored in + * storage. This header is returned only for "GetProperties" operation. If + * the Content-MD5 header has been set for the file, this response header + * is returned for GetProperties call so that the client can check for + * message content integrity. + * + * @return the contentMD5 value. + */ + public String getContentMD5() { + return this.contentMD5; + } + + /** + * Set the contentMD5 property: The MD5 hash of complete file stored in + * storage. This header is returned only for "GetProperties" operation. If + * the Content-MD5 header has been set for the file, this response header + * is returned for GetProperties call so that the client can check for + * message content integrity. + * + * @param contentMD5 the contentMD5 value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setContentMD5(String contentMD5) { + this.contentMD5 = contentMD5; + return this; + } + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @param eTag the eTag value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @param lastModified the lastModified value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsResourceType property: The type of the resource. The value + * may be "file" or "directory". If not set, the value is "file". + * + * @return the xMsResourceType value. + */ + public String getXMsResourceType() { + return this.xMsResourceType; + } + + /** + * Set the xMsResourceType property: The type of the resource. The value + * may be "file" or "directory". If not set, the value is "file". + * + * @param xMsResourceType the xMsResourceType value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsResourceType(String xMsResourceType) { + this.xMsResourceType = xMsResourceType; + return this; + } + + /** + * Get the xMsProperties property: The user-defined properties associated + * with the file or directory, in the format of a comma-separated list of + * name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @return the xMsProperties value. + */ + public String getXMsProperties() { + return this.xMsProperties; + } + + /** + * Set the xMsProperties property: The user-defined properties associated + * with the file or directory, in the format of a comma-separated list of + * name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @param xMsProperties the xMsProperties value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsProperties(String xMsProperties) { + this.xMsProperties = xMsProperties; + return this; + } + + /** + * Get the xMsOwner property: The owner of the file or directory. Included + * in the response if Hierarchical Namespace is enabled for the account. + * + * @return the xMsOwner value. + */ + public String getXMsOwner() { + return this.xMsOwner; + } + + /** + * Set the xMsOwner property: The owner of the file or directory. Included + * in the response if Hierarchical Namespace is enabled for the account. + * + * @param xMsOwner the xMsOwner value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsOwner(String xMsOwner) { + this.xMsOwner = xMsOwner; + return this; + } + + /** + * Get the xMsGroup property: The owning group of the file or directory. + * Included in the response if Hierarchical Namespace is enabled for the + * account. + * + * @return the xMsGroup value. + */ + public String getXMsGroup() { + return this.xMsGroup; + } + + /** + * Set the xMsGroup property: The owning group of the file or directory. + * Included in the response if Hierarchical Namespace is enabled for the + * account. + * + * @param xMsGroup the xMsGroup value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsGroup(String xMsGroup) { + this.xMsGroup = xMsGroup; + return this; + } + + /** + * Get the xMsPermissions property: The POSIX access permissions for the + * file owner, the file owning group, and others. Included in the response + * if Hierarchical Namespace is enabled for the account. + * + * @return the xMsPermissions value. + */ + public String getXMsPermissions() { + return this.xMsPermissions; + } + + /** + * Set the xMsPermissions property: The POSIX access permissions for the + * file owner, the file owning group, and others. Included in the response + * if Hierarchical Namespace is enabled for the account. + * + * @param xMsPermissions the xMsPermissions value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsPermissions(String xMsPermissions) { + this.xMsPermissions = xMsPermissions; + return this; + } + + /** + * Get the xMsAcl property: The POSIX access control list for the file or + * directory. Included in the response only if the action is + * "getAccessControl" and Hierarchical Namespace is enabled for the + * account. + * + * @return the xMsAcl value. + */ + public String getXMsAcl() { + return this.xMsAcl; + } + + /** + * Set the xMsAcl property: The POSIX access control list for the file or + * directory. Included in the response only if the action is + * "getAccessControl" and Hierarchical Namespace is enabled for the + * account. + * + * @param xMsAcl the xMsAcl value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsAcl(String xMsAcl) { + this.xMsAcl = xMsAcl; + return this; + } + + /** + * Get the xMsLeaseDuration property: When a resource is leased, specifies + * whether the lease is of infinite or fixed duration. + * + * @return the xMsLeaseDuration value. + */ + public String getXMsLeaseDuration() { + return this.xMsLeaseDuration; + } + + /** + * Set the xMsLeaseDuration property: When a resource is leased, specifies + * whether the lease is of infinite or fixed duration. + * + * @param xMsLeaseDuration the xMsLeaseDuration value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsLeaseDuration(String xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + return this; + } + + /** + * Get the xMsLeaseState property: Lease state of the resource. + * + * @return the xMsLeaseState value. + */ + public String getXMsLeaseState() { + return this.xMsLeaseState; + } + + /** + * Set the xMsLeaseState property: Lease state of the resource. + * + * @param xMsLeaseState the xMsLeaseState value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsLeaseState(String xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + return this; + } + + /** + * Get the xMsLeaseStatus property: The lease status of the resource. + * + * @return the xMsLeaseStatus value. + */ + public String getXMsLeaseStatus() { + return this.xMsLeaseStatus; + } + + /** + * Set the xMsLeaseStatus property: The lease status of the resource. + * + * @param xMsLeaseStatus the xMsLeaseStatus value to set. + * @return the PathGetPropertiesHeaders object itself. + */ + public PathGetPropertiesHeaders setXMsLeaseStatus(String xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseAction.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseAction.java new file mode 100644 index 000000000000..7a1262fd2ca1 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseAction.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PathLeaseAction. + */ +public enum PathLeaseAction { + /** + * Enum value acquire. + */ + ACQUIRE("acquire"), + + /** + * Enum value break. + */ + BREAK("break"), + + /** + * Enum value change. + */ + CHANGE("change"), + + /** + * Enum value renew. + */ + RENEW("renew"), + + /** + * Enum value release. + */ + RELEASE("release"); + + /** + * The actual serialized value for a PathLeaseAction instance. + */ + private final String value; + + PathLeaseAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PathLeaseAction instance. + * + * @param value the serialized value to parse. + * @return the parsed PathLeaseAction object, or null if unable to parse. + */ + @JsonCreator + public static PathLeaseAction fromString(String value) { + PathLeaseAction[] items = PathLeaseAction.values(); + for (PathLeaseAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseHeaders.java new file mode 100644 index 000000000000..49fd0548b465 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathLeaseHeaders.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Lease operation. + */ +@Fluent +public final class PathLeaseHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the file or directory. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the file or directory was last modified. Write + * operations on the file or directory update the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * A successful "acquire" action returns the lease ID. + */ + @JsonProperty(value = "x-ms-lease-id") + private String xMsLeaseId; + + /* + * The time remaining in the lease period in seconds. + */ + @JsonProperty(value = "x-ms-lease-time") + private String xMsLeaseTime; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @param eTag the eTag value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @param lastModified the lastModified value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsLeaseId property: A successful "acquire" action returns the + * lease ID. + * + * @return the xMsLeaseId value. + */ + public String getXMsLeaseId() { + return this.xMsLeaseId; + } + + /** + * Set the xMsLeaseId property: A successful "acquire" action returns the + * lease ID. + * + * @param xMsLeaseId the xMsLeaseId value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + return this; + } + + /** + * Get the xMsLeaseTime property: The time remaining in the lease period in + * seconds. + * + * @return the xMsLeaseTime value. + */ + public String getXMsLeaseTime() { + return this.xMsLeaseTime; + } + + /** + * Set the xMsLeaseTime property: The time remaining in the lease period in + * seconds. + * + * @param xMsLeaseTime the xMsLeaseTime value to set. + * @return the PathLeaseHeaders object itself. + */ + public PathLeaseHeaders setXMsLeaseTime(String xMsLeaseTime) { + this.xMsLeaseTime = xMsLeaseTime; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathList.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathList.java new file mode 100644 index 000000000000..95a36be86f60 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathList.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The PathList model. + */ +@Fluent +public final class PathList { + /* + * The paths property. + */ + @JsonProperty(value = "paths") + private List paths; + + /** + * Get the paths property: The paths property. + * + * @return the paths value. + */ + public List getPaths() { + return this.paths; + } + + /** + * Set the paths property: The paths property. + * + * @param paths the paths value to set. + * @return the PathList object itself. + */ + public PathList setPaths(List paths) { + this.paths = paths; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathListHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathListHeaders.java new file mode 100644 index 000000000000..6d1608a5c8dc --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathListHeaders.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for List operation. + */ +@Fluent +public final class PathListHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the filesystem. Changes to + * filesystem properties affect the entity tag, but operations on files and + * directories do not. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the filesystem was last modified. Changes to + * filesystem properties update the last modified time, but operations on + * files and directories do not. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * If the number of paths to be listed exceeds the maxResults limit, a + * continuation token is returned in this response header. When a + * continuation token is returned in the response, it must be specified in + * a subsequent invocation of the list operation to continue listing the + * paths. + */ + @JsonProperty(value = "x-ms-continuation") + private String xMsContinuation; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the + * filesystem. Changes to filesystem properties affect the entity tag, but + * operations on files and directories do not. + * + * @param eTag the eTag value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the filesystem was last + * modified. Changes to filesystem properties update the last modified + * time, but operations on files and directories do not. + * + * @param lastModified the lastModified value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuation property: If the number of paths to be listed + * exceeds the maxResults limit, a continuation token is returned in this + * response header. When a continuation token is returned in the response, + * it must be specified in a subsequent invocation of the list operation to + * continue listing the paths. + * + * @return the xMsContinuation value. + */ + public String getXMsContinuation() { + return this.xMsContinuation; + } + + /** + * Set the xMsContinuation property: If the number of paths to be listed + * exceeds the maxResults limit, a continuation token is returned in this + * response header. When a continuation token is returned in the response, + * it must be specified in a subsequent invocation of the list operation to + * continue listing the paths. + * + * @param xMsContinuation the xMsContinuation value to set. + * @return the PathListHeaders object itself. + */ + public PathListHeaders setXMsContinuation(String xMsContinuation) { + this.xMsContinuation = xMsContinuation; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathReadHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathReadHeaders.java new file mode 100644 index 000000000000..9f8c50c35080 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathReadHeaders.java @@ -0,0 +1,622 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Read operation. + */ +@Fluent +public final class PathReadHeaders { + /* + * Indicates that the service supports requests for partial file content. + */ + @JsonProperty(value = "Accept-Ranges") + private String acceptRanges; + + /* + * If the Cache-Control request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Cache-Control") + private String cacheControl; + + /* + * If the Content-Disposition request header has previously been set for + * the resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Disposition") + private String contentDisposition; + + /* + * If the Content-Encoding request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Encoding") + private String contentEncoding; + + /* + * If the Content-Language request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Language") + private String contentLanguage; + + /* + * The size of the resource in bytes. + */ + @JsonProperty(value = "Content-Length") + private Long contentLength; + + /* + * Indicates the range of bytes returned in the event that the client + * requested a subset of the file by setting the Range request header. + */ + @JsonProperty(value = "Content-Range") + private String contentRange; + + /* + * The content type specified for the resource. If no content type was + * specified, the default content type is application/octet-stream. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /* + * The MD5 hash of read range. If the request is to read a specified range + * and the "x-ms-range-get-content-md5" is set to true, then the request + * returns an MD5 hash for the range, as long as the range size is less + * than or equal to 4 MB. + */ + @JsonProperty(value = "Content-MD5") + private String contentMD5; + + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the file or directory. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the file or directory was last modified. Write + * operations on the file or directory update the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The type of the resource. The value may be "file" or "directory". If + * not set, the value is "file". + */ + @JsonProperty(value = "x-ms-resource-type") + private String xMsResourceType; + + /* + * The user-defined properties associated with the file or directory, in + * the format of a comma-separated list of name and value pairs "n1=v1, + * n2=v2, ...", where each value is a base64 encoded string. Note that the + * string may only contain ASCII characters in the ISO-8859-1 character + * set. + */ + @JsonProperty(value = "x-ms-properties") + private String xMsProperties; + + /* + * When a resource is leased, specifies whether the lease is of infinite or + * fixed duration. + */ + @JsonProperty(value = "x-ms-lease-duration") + private String xMsLeaseDuration; + + /* + * Lease state of the resource. + */ + @JsonProperty(value = "x-ms-lease-state") + private String xMsLeaseState; + + /* + * The lease status of the resource. + */ + @JsonProperty(value = "x-ms-lease-status") + private String xMsLeaseStatus; + + /* + * The MD5 hash of complete file stored in storage. If the file has a MD5 + * hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the complete file's MD5 + * value. This value may or may not be equal to the value returned in + * Content-MD5 header, with the latter calculated from the requested range. + */ + @JsonProperty(value = "x-ms-content-md5") + private String xMsContentMd5; + + /** + * Get the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @param acceptRanges the acceptRanges value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @param cacheControl the cacheControl value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @param contentDisposition the contentDisposition value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentEncoding the contentEncoding value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentLanguage the contentLanguage value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the contentLength property: The size of the resource in bytes. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The size of the resource in bytes. + * + * @param contentLength the contentLength value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @return the contentRange value. + */ + public String getContentRange() { + return this.contentRange; + } + + /** + * Set the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @param contentRange the contentRange value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + /** + * Get the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @param contentType the contentType value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentMD5 property: The MD5 hash of read range. If the request + * is to read a specified range and the "x-ms-range-get-content-md5" is set + * to true, then the request returns an MD5 hash for the range, as long as + * the range size is less than or equal to 4 MB. + * + * @return the contentMD5 value. + */ + public String getContentMD5() { + return this.contentMD5; + } + + /** + * Set the contentMD5 property: The MD5 hash of read range. If the request + * is to read a specified range and the "x-ms-range-get-content-md5" is set + * to true, then the request returns an MD5 hash for the range, as long as + * the range size is less than or equal to 4 MB. + * + * @param contentMD5 the contentMD5 value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setContentMD5(String contentMD5) { + this.contentMD5 = contentMD5; + return this; + } + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @param eTag the eTag value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @param lastModified the lastModified value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsResourceType property: The type of the resource. The value + * may be "file" or "directory". If not set, the value is "file". + * + * @return the xMsResourceType value. + */ + public String getXMsResourceType() { + return this.xMsResourceType; + } + + /** + * Set the xMsResourceType property: The type of the resource. The value + * may be "file" or "directory". If not set, the value is "file". + * + * @param xMsResourceType the xMsResourceType value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsResourceType(String xMsResourceType) { + this.xMsResourceType = xMsResourceType; + return this; + } + + /** + * Get the xMsProperties property: The user-defined properties associated + * with the file or directory, in the format of a comma-separated list of + * name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @return the xMsProperties value. + */ + public String getXMsProperties() { + return this.xMsProperties; + } + + /** + * Set the xMsProperties property: The user-defined properties associated + * with the file or directory, in the format of a comma-separated list of + * name and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @param xMsProperties the xMsProperties value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsProperties(String xMsProperties) { + this.xMsProperties = xMsProperties; + return this; + } + + /** + * Get the xMsLeaseDuration property: When a resource is leased, specifies + * whether the lease is of infinite or fixed duration. + * + * @return the xMsLeaseDuration value. + */ + public String getXMsLeaseDuration() { + return this.xMsLeaseDuration; + } + + /** + * Set the xMsLeaseDuration property: When a resource is leased, specifies + * whether the lease is of infinite or fixed duration. + * + * @param xMsLeaseDuration the xMsLeaseDuration value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsLeaseDuration(String xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + return this; + } + + /** + * Get the xMsLeaseState property: Lease state of the resource. + * + * @return the xMsLeaseState value. + */ + public String getXMsLeaseState() { + return this.xMsLeaseState; + } + + /** + * Set the xMsLeaseState property: Lease state of the resource. + * + * @param xMsLeaseState the xMsLeaseState value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsLeaseState(String xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + return this; + } + + /** + * Get the xMsLeaseStatus property: The lease status of the resource. + * + * @return the xMsLeaseStatus value. + */ + public String getXMsLeaseStatus() { + return this.xMsLeaseStatus; + } + + /** + * Set the xMsLeaseStatus property: The lease status of the resource. + * + * @param xMsLeaseStatus the xMsLeaseStatus value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsLeaseStatus(String xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + return this; + } + + /** + * Get the xMsContentMd5 property: The MD5 hash of complete file stored in + * storage. If the file has a MD5 hash, and if request contains range + * header (Range or x-ms-range), this response header is returned with the + * value of the complete file's MD5 value. This value may or may not be + * equal to the value returned in Content-MD5 header, with the latter + * calculated from the requested range. + * + * @return the xMsContentMd5 value. + */ + public String getXMsContentMd5() { + return this.xMsContentMd5; + } + + /** + * Set the xMsContentMd5 property: The MD5 hash of complete file stored in + * storage. If the file has a MD5 hash, and if request contains range + * header (Range or x-ms-range), this response header is returned with the + * value of the complete file's MD5 value. This value may or may not be + * equal to the value returned in Content-MD5 header, with the latter + * calculated from the requested range. + * + * @param xMsContentMd5 the xMsContentMd5 value to set. + * @return the PathReadHeaders object itself. + */ + public PathReadHeaders setXMsContentMd5(String xMsContentMd5) { + this.xMsContentMd5 = xMsContentMd5; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathRenameMode.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathRenameMode.java new file mode 100644 index 000000000000..58991934d2dc --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathRenameMode.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PathRenameMode. + */ +public enum PathRenameMode { + /** + * Enum value legacy. + */ + LEGACY("legacy"), + + /** + * Enum value posix. + */ + POSIX("posix"); + + /** + * The actual serialized value for a PathRenameMode instance. + */ + private final String value; + + PathRenameMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PathRenameMode instance. + * + * @param value the serialized value to parse. + * @return the parsed PathRenameMode object, or null if unable to parse. + */ + @JsonCreator + public static PathRenameMode fromString(String value) { + PathRenameMode[] items = PathRenameMode.values(); + for (PathRenameMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathResourceType.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathResourceType.java new file mode 100644 index 000000000000..e9bd61206101 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathResourceType.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PathResourceType. + */ +public enum PathResourceType { + /** + * Enum value directory. + */ + DIRECTORY("directory"), + + /** + * Enum value file. + */ + FILE("file"); + + /** + * The actual serialized value for a PathResourceType instance. + */ + private final String value; + + PathResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PathResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed PathResourceType object, or null if unable to parse. + */ + @JsonCreator + public static PathResourceType fromString(String value) { + PathResourceType[] items = PathResourceType.values(); + for (PathResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateAction.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateAction.java new file mode 100644 index 000000000000..c87af882dcf7 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateAction.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PathUpdateAction. + */ +public enum PathUpdateAction { + /** + * Enum value append. + */ + APPEND("append"), + + /** + * Enum value flush. + */ + FLUSH("flush"), + + /** + * Enum value setProperties. + */ + SET_PROPERTIES("setProperties"), + + /** + * Enum value setAccessControl. + */ + SET_ACCESS_CONTROL("setAccessControl"); + + /** + * The actual serialized value for a PathUpdateAction instance. + */ + private final String value; + + PathUpdateAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PathUpdateAction instance. + * + * @param value the serialized value to parse. + * @return the parsed PathUpdateAction object, or null if unable to parse. + */ + @JsonCreator + public static PathUpdateAction fromString(String value) { + PathUpdateAction[] items = PathUpdateAction.values(); + for (PathUpdateAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateHeaders.java new file mode 100644 index 000000000000..b07ffdada529 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathUpdateHeaders.java @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Update operation. + */ +@Fluent +public final class PathUpdateHeaders { + /* + * A UTC date/time value generated by the service that indicates the time + * at which the response was initiated. + */ + @JsonProperty(value = "Date") + private String dateProperty; + + /* + * An HTTP entity tag associated with the file or directory. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The data and time the file or directory was last modified. Write + * operations on the file or directory update the last modified time. + */ + @JsonProperty(value = "Last-Modified") + private String lastModified; + + /* + * Indicates that the service supports requests for partial file content. + */ + @JsonProperty(value = "Accept-Ranges") + private String acceptRanges; + + /* + * If the Cache-Control request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Cache-Control") + private String cacheControl; + + /* + * If the Content-Disposition request header has previously been set for + * the resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Disposition") + private String contentDisposition; + + /* + * If the Content-Encoding request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Encoding") + private String contentEncoding; + + /* + * If the Content-Language request header has previously been set for the + * resource, that value is returned in this header. + */ + @JsonProperty(value = "Content-Language") + private String contentLanguage; + + /* + * The size of the resource in bytes. + */ + @JsonProperty(value = "Content-Length") + private Long contentLength; + + /* + * Indicates the range of bytes returned in the event that the client + * requested a subset of the file by setting the Range request header. + */ + @JsonProperty(value = "Content-Range") + private String contentRange; + + /* + * The content type specified for the resource. If no content type was + * specified, the default content type is application/octet-stream. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /* + * An MD5 hash of the request content. This header is only returned for + * "Append" operation. This header is returned so that the client can check + * for message content integrity. The value of this header is computed by + * the service; it is not necessarily the same value specified in the + * request headers. + */ + @JsonProperty(value = "Content-MD5") + private String contentMD5; + + /* + * User-defined properties associated with the file or directory, in the + * format of a comma-separated list of name and value pairs "n1=v1, n2=v2, + * ...", where each value is a base64 encoded string. Note that the string + * may only contain ASCII characters in the ISO-8859-1 character set. + */ + @JsonProperty(value = "x-ms-properties") + private String xMsProperties; + + /* + * A server-generated UUID recorded in the analytics logs for + * troubleshooting and correlation. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The version of the REST protocol used to process the request. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /** + * Get the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @return the dateProperty value. + */ + public String getDateProperty() { + return this.dateProperty; + } + + /** + * Set the dateProperty property: A UTC date/time value generated by the + * service that indicates the time at which the response was initiated. + * + * @param dateProperty the dateProperty value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setDateProperty(String dateProperty) { + this.dateProperty = dateProperty; + return this; + } + + /** + * Get the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: An HTTP entity tag associated with the file or + * directory. + * + * @param eTag the eTag value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @return the lastModified value. + */ + public String getLastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: The data and time the file or directory + * was last modified. Write operations on the file or directory update the + * last modified time. + * + * @param lastModified the lastModified value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Get the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: Indicates that the service supports + * requests for partial file content. + * + * @param acceptRanges the acceptRanges value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: If the Cache-Control request header has + * previously been set for the resource, that value is returned in this + * header. + * + * @param cacheControl the cacheControl value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: If the Content-Disposition request + * header has previously been set for the resource, that value is returned + * in this header. + * + * @param contentDisposition the contentDisposition value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: If the Content-Encoding request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentEncoding the contentEncoding value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: If the Content-Language request header + * has previously been set for the resource, that value is returned in this + * header. + * + * @param contentLanguage the contentLanguage value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the contentLength property: The size of the resource in bytes. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The size of the resource in bytes. + * + * @param contentLength the contentLength value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @return the contentRange value. + */ + public String getContentRange() { + return this.contentRange; + } + + /** + * Set the contentRange property: Indicates the range of bytes returned in + * the event that the client requested a subset of the file by setting the + * Range request header. + * + * @param contentRange the contentRange value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + /** + * Get the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type specified for the + * resource. If no content type was specified, the default content type is + * application/octet-stream. + * + * @param contentType the contentType value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentMD5 property: An MD5 hash of the request content. This + * header is only returned for "Append" operation. This header is returned + * so that the client can check for message content integrity. The value of + * this header is computed by the service; it is not necessarily the same + * value specified in the request headers. + * + * @return the contentMD5 value. + */ + public String getContentMD5() { + return this.contentMD5; + } + + /** + * Set the contentMD5 property: An MD5 hash of the request content. This + * header is only returned for "Append" operation. This header is returned + * so that the client can check for message content integrity. The value of + * this header is computed by the service; it is not necessarily the same + * value specified in the request headers. + * + * @param contentMD5 the contentMD5 value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setContentMD5(String contentMD5) { + this.contentMD5 = contentMD5; + return this; + } + + /** + * Get the xMsProperties property: User-defined properties associated with + * the file or directory, in the format of a comma-separated list of name + * and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @return the xMsProperties value. + */ + public String getXMsProperties() { + return this.xMsProperties; + } + + /** + * Set the xMsProperties property: User-defined properties associated with + * the file or directory, in the format of a comma-separated list of name + * and value pairs "n1=v1, n2=v2, ...", where each value is a base64 + * encoded string. Note that the string may only contain ASCII characters + * in the ISO-8859-1 character set. + * + * @param xMsProperties the xMsProperties value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setXMsProperties(String xMsProperties) { + this.xMsProperties = xMsProperties; + return this; + } + + /** + * Get the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: A server-generated UUID recorded in the + * analytics logs for troubleshooting and correlation. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The version of the REST protocol used to + * process the request. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PathUpdateHeaders object itself. + */ + public PathUpdateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsCreateResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsCreateResponse.java new file mode 100644 index 000000000000..eacff86e98df --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsCreateResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the create operation. + */ +public final class PathsCreateResponse extends ResponseBase { + /** + * Creates an instance of PathsCreateResponse. + * + * @param request the request which resulted in this PathsCreateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsCreateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, PathCreateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsDeleteResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsDeleteResponse.java new file mode 100644 index 000000000000..79e8b5be04f4 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsDeleteResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the delete operation. + */ +public final class PathsDeleteResponse extends ResponseBase { + /** + * Creates an instance of PathsDeleteResponse. + * + * @param request the request which resulted in this PathsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, PathDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsGetPropertiesResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsGetPropertiesResponse.java new file mode 100644 index 000000000000..b297bd3e9fd6 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsGetPropertiesResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the getProperties operation. + */ +public final class PathsGetPropertiesResponse extends ResponseBase { + /** + * Creates an instance of PathsGetPropertiesResponse. + * + * @param request the request which resulted in this PathsGetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsGetPropertiesResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, PathGetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsLeaseResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsLeaseResponse.java new file mode 100644 index 000000000000..9869bcba9f6d --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsLeaseResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the lease operation. + */ +public final class PathsLeaseResponse extends ResponseBase { + /** + * Creates an instance of PathsLeaseResponse. + * + * @param request the request which resulted in this PathsLeaseResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsLeaseResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, PathLeaseHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsListResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsListResponse.java new file mode 100644 index 000000000000..b61f71e35b5f --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsListResponse.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the list operation. + */ +public final class PathsListResponse extends ResponseBase { + /** + * Creates an instance of PathsListResponse. + * + * @param request the request which resulted in this PathsListResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsListResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, PathList value, PathListHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * @return the deserialized response body. + */ + @Override + public PathList getValue() { + return super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsReadResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsReadResponse.java new file mode 100644 index 000000000000..ef1d1e6532bf --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsReadResponse.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import java.io.Closeable; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; + +/** + * Contains all response data for the read operation. + */ +public final class PathsReadResponse extends ResponseBase> implements Closeable { + /** + * Creates an instance of PathsReadResponse. + * + * @param request the request which resulted in this PathsReadResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the content stream. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsReadResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Flux value, PathReadHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * @return the response content stream. + */ + @Override + public Flux getValue() { + return super.getValue(); + } + + /** + * Disposes of the connection associated with this stream response. + */ + @Override + public void close() { + getValue().subscribe(bb -> { }, t -> { }).dispose(); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsUpdateResponse.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsUpdateResponse.java new file mode 100644 index 000000000000..65b0500199dc --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathsUpdateResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.datalake.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the update operation. + */ +public final class PathsUpdateResponse extends ResponseBase { + /** + * Creates an instance of PathsUpdateResponse. + * + * @param request the request which resulted in this PathsUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PathsUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, PathUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java new file mode 100644 index 000000000000..23286f8025c6 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for DataLakeStorageClient. + * Azure Data Lake Storage provides storage for Hadoop and other big data + * workloads. + */ +package com.azure.storage.file.datalake.models; diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/package-info.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/package-info.java new file mode 100644 index 000000000000..77d02b6a2876 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the class required for DataLakeStorageClient. + * Azure Data Lake Storage provides storage for Hadoop and other big data + * workloads. + */ +package com.azure.storage.file.datalake; diff --git a/sdk/storage/azure-storage-file-datalake/swagger/README.md b/sdk/storage/azure-storage-file-datalake/swagger/README.md new file mode 100644 index 000000000000..c1cbf9c5d59e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/swagger/README.md @@ -0,0 +1,37 @@ +# Azure File Data Lake Storage for Java + +> see https://aka.ms/autorest + +### Setup +```ps +cd C:\work +git clone --recursive https://github.com/Azure/autorest.java/ +cd autorest.java +git checkout v3 +npm install +cd .. +git clone --recursive https://github.com/jianghaolu/autorest.modeler/ +cd autorest.modeler +git checkout headerprefixfix +npm install +``` + +### Generation +```ps +cd +autorest --use=C:/work/autorest.java --use=C:/work/autorest.modeler --version=2.0.4280 +``` + +### Code generation settings +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2018-11-09/DataLakeStorage.json +java: true +output-folder: ../ +namespace: com.azure.storage.file.datalake +enable-xml: true +generate-client-interfaces: false +sync-methods: none +license-header: MICROSOFT_MIT_SMALL +add-context-parameter: true +``` + diff --git a/sdk/storage/azure-storage-file/README.md b/sdk/storage/azure-storage-file/README.md index a09aa7ef82b1..83a9c33cc44f 100644 --- a/sdk/storage/azure-storage-file/README.md +++ b/sdk/storage/azure-storage-file/README.md @@ -23,26 +23,33 @@ Shares provide a way to organize sets of files and also can be mounted as an SMB com.azure azure-storage-file - 12.0.0-preview.3 + 12.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +Storage File to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-storage-file + 12.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. - -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/storage/azure-storage-file/pom.xml b/sdk/storage/azure-storage-file/pom.xml index 450af22d2303..e37f1f09a8db 100644 --- a/sdk/storage/azure-storage-file/pom.xml +++ b/sdk/storage/azure-storage-file/pom.xml @@ -96,13 +96,25 @@ - org.apache.maven.plugins maven-compiler-plugin + ${maven-compiler-plugin.version} 1.8 1.8 + true + true + + -Xlint:all + -Xlint:-serial + -Xlint:-deprecation + -Xlint:-processing + + + module-info.java + + test-compile @@ -112,7 +124,6 @@ groovy-eclipse-compiler - -Xlint:unchecked @@ -123,7 +134,6 @@ groovy-eclipse-compiler - -Xlint:unchecked @@ -140,7 +150,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -174,7 +183,6 @@ groovy-eclipse-compiler - -Xlint:unchecked 8 @@ -186,7 +194,6 @@ groovy-eclipse-compiler - -Xlint:unchecked 8 diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BaseFileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BaseFileClientBuilder.java index 0677c6715ef3..29f63ff1b8ea 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BaseFileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/BaseFileClientBuilder.java @@ -33,6 +33,7 @@ protected final String getServiceUrlMidfix() { * @return the updated builder * @throws NullPointerException If {@code credential} is {@code null}. */ + @Override public final T credential(TokenCredential credential) { throw logger.logExceptionAsError(new UnsupportedOperationException( "Azure Storage file service does not support token authorization.")); @@ -44,6 +45,7 @@ public final T credential(TokenCredential credential) { * * @return the updated builder */ + @Override public final T setAnonymousCredential() { throw logger.logExceptionAsError(new UnsupportedOperationException( "Azure Storage file service does not support anonymous access.")); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java index 233843efae69..75b24c890530 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java @@ -3,12 +3,12 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; @@ -17,22 +17,20 @@ import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; +import com.azure.storage.file.implementation.models.DirectorysCreateResponse; +import com.azure.storage.file.implementation.models.DirectorysGetPropertiesResponse; +import com.azure.storage.file.implementation.models.DirectorysListFilesAndDirectoriesSegmentResponse; +import com.azure.storage.file.implementation.models.DirectorysSetMetadataResponse; +import com.azure.storage.file.implementation.models.DirectorysSetPropertiesResponse; import com.azure.storage.file.models.DirectoryInfo; import com.azure.storage.file.models.DirectoryProperties; import com.azure.storage.file.models.DirectorySetMetadataInfo; -import com.azure.storage.file.models.DirectorysCreateResponse; -import com.azure.storage.file.models.DirectorysGetPropertiesResponse; -import com.azure.storage.file.models.DirectorysListFilesAndDirectoriesSegmentResponse; -import com.azure.storage.file.models.DirectorysSetMetadataResponse; -import com.azure.storage.file.models.DirectorysSetPropertiesResponse; import com.azure.storage.file.models.FileHTTPHeaders; -import com.azure.storage.file.models.FileRef; +import com.azure.storage.file.models.FileReference; import com.azure.storage.file.models.HandleItem; import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -98,16 +96,14 @@ public class DirectoryAsyncClient { * Get the url of the storage directory client. * * @return the URL of the storage directory client - * @throws RuntimeException If the directory is using a malformed URL. */ - public URL getDirectoryUrl() { - try { - return new URL(azureFileStorageClient.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), - azureFileStorageClient.getUrl()), e)); + public String getDirectoryUrl() { + StringBuilder directoryUrlString = new StringBuilder(azureFileStorageClient.getUrl()).append("/") + .append(shareName).append("/").append(directoryPath); + if (snapshot != null) { + directoryUrlString.append("?snapshot=").append(snapshot); } + return directoryUrlString.toString(); } /** @@ -427,9 +423,9 @@ Mono> setMetadataWithResponse(MapAzure * Docs.

    * - * @return {@link FileRef File info} in the storage directory + * @return {@link FileReference File info} in the storage directory */ - public PagedFlux listFilesAndDirectories() { + public PagedFlux listFilesAndDirectories() { return listFilesAndDirectories(null, null); } @@ -450,15 +446,15 @@ public PagedFlux listFilesAndDirectories() { * with. * @param maxResults Optional maximum number of files and/or directories to return per page. If the request does not * specify maxresults or specifies a value greater than 5,000, the server will return up to 5,000 items. - * @return {@link FileRef File info} in this directory with prefix and max number of return results. + * @return {@link FileReference File info} in this directory with prefix and max number of return results. */ - public PagedFlux listFilesAndDirectories(String prefix, Integer maxResults) { + public PagedFlux listFilesAndDirectories(String prefix, Integer maxResults) { return listFilesAndDirectoriesWithOptionalTimeout(prefix, maxResults, null, Context.NONE); } - PagedFlux listFilesAndDirectoriesWithOptionalTimeout(String prefix, Integer maxResults, Duration timeout, - Context context) { - Function>> retriever = + PagedFlux listFilesAndDirectoriesWithOptionalTimeout(String prefix, Integer maxResults, + Duration timeout, Context context) { + Function>> retriever = marker -> postProcessResponse(Utility.applyOptionalTimeout(this.azureFileStorageClient.directorys() .listFilesAndDirectoriesSegmentWithRestResponseAsync(shareName, directoryPath, prefix, snapshot, marker, maxResults, null, context), timeout) @@ -567,7 +563,8 @@ PagedFlux forceCloseHandlesWithOptionalTimeout(String handleId, boolean * directory is an invalid resource name. */ public Mono createSubDirectory(String subDirectoryName) { - return createSubDirectoryWithResponse(subDirectoryName, null, null, null).flatMap(FluxUtil::toMono); + return createSubDirectoryWithResponse(subDirectoryName, null, null, null) + .flatMap(FluxUtil::toMono); } /** @@ -671,7 +668,8 @@ Mono> deleteSubDirectoryWithResponse(String subDirectoryName, Con * invalid resource name. */ public Mono createFile(String fileName, long maxSize) { - return createFileWithResponse(fileName, maxSize, null, null, null, null).flatMap(FluxUtil::toMono); + return createFileWithResponse(fileName, maxSize, null, null, null, null) + .flatMap(FluxUtil::toMono); } /** @@ -834,15 +832,18 @@ private Response setMetadataResponse(final DirectorysS return new SimpleResponse<>(response, directorySetMetadataInfo); } - private List convertResponseAndGetNumOfResults(DirectorysListFilesAndDirectoriesSegmentResponse response) { - Set fileRefs = new TreeSet<>(Comparator.comparing(FileRef::getName)); + private List convertResponseAndGetNumOfResults( + DirectorysListFilesAndDirectoriesSegmentResponse response) { + Set fileReferences = new TreeSet<>(Comparator.comparing(FileReference::getName)); if (response.getValue().getSegment() != null) { response.getValue().getSegment().getDirectoryItems() - .forEach(directoryItem -> fileRefs.add(new FileRef(directoryItem.getName(), true, null))); + .forEach(directoryItem -> fileReferences.add(new FileReference(directoryItem.getName(), + true, null))); response.getValue().getSegment().getFileItems() - .forEach(fileItem -> fileRefs.add(new FileRef(fileItem.getName(), false, fileItem.getProperties()))); + .forEach(fileItem -> fileReferences.add(new FileReference(fileItem.getName(), false, + fileItem.getProperties()))); } - return new ArrayList<>(fileRefs); + return new ArrayList<>(fileReferences); } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java index 284387bd90a4..5bcd44864e08 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java @@ -3,10 +3,10 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -16,12 +16,11 @@ import com.azure.storage.file.models.DirectorySetMetadataInfo; import com.azure.storage.file.models.FileHTTPHeaders; import com.azure.storage.file.models.FileInfo; -import com.azure.storage.file.models.FileRef; +import com.azure.storage.file.models.FileReference; import com.azure.storage.file.models.HandleItem; import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.util.Map; @@ -59,9 +58,8 @@ public class DirectoryClient { * Get the url of the storage directory client. * * @return the URL of the storage directory client. - * @throws RuntimeException If the directory is using a malformed URL. */ - public URL getDirectoryUrl() { + public String getDirectoryUrl() { return directoryAsyncClient.getDirectoryUrl(); } @@ -345,9 +343,9 @@ public Response setMetadataWithResponse(MapAzure * Docs.

    * - * @return {@link FileRef File info} in the storage directory + * @return {@link FileReference File info} in the storage directory */ - public PagedIterable listFilesAndDirectories() { + public PagedIterable listFilesAndDirectories() { return listFilesAndDirectories(null, null, null, Context.NONE); } @@ -372,11 +370,11 @@ public PagedIterable listFilesAndDirectories() { * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout * concludes a {@link RuntimeException} will be thrown. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return {@link FileRef File info} in this directory with prefix and max number of return results. + * @return {@link FileReference File info} in this directory with prefix and max number of return results. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ - public PagedIterable listFilesAndDirectories(String prefix, Integer maxResults, Duration timeout, - Context context) { + public PagedIterable listFilesAndDirectories(String prefix, Integer maxResults, Duration timeout, + Context context) { return new PagedIterable<>(directoryAsyncClient .listFilesAndDirectoriesWithOptionalTimeout(prefix, maxResults, timeout, context)); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index 9bbb715b9d72..bff2f488bde1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -3,45 +3,45 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; +import com.azure.storage.file.implementation.models.FileGetPropertiesHeaders; +import com.azure.storage.file.implementation.models.FileRangeWriteType; +import com.azure.storage.file.implementation.models.FileUploadRangeFromURLHeaders; +import com.azure.storage.file.implementation.models.FileUploadRangeHeaders; +import com.azure.storage.file.implementation.models.FilesCreateResponse; +import com.azure.storage.file.implementation.models.FilesDownloadResponse; +import com.azure.storage.file.implementation.models.FilesGetPropertiesResponse; +import com.azure.storage.file.implementation.models.FilesSetHTTPHeadersResponse; +import com.azure.storage.file.implementation.models.FilesSetMetadataResponse; +import com.azure.storage.file.implementation.models.FilesStartCopyResponse; +import com.azure.storage.file.implementation.models.FilesUploadRangeFromURLResponse; +import com.azure.storage.file.implementation.models.FilesUploadRangeResponse; import com.azure.storage.file.models.CopyStatusType; import com.azure.storage.file.models.FileCopyInfo; import com.azure.storage.file.models.FileDownloadInfo; -import com.azure.storage.file.models.FileGetPropertiesHeaders; import com.azure.storage.file.models.FileHTTPHeaders; import com.azure.storage.file.models.FileInfo; import com.azure.storage.file.models.FileMetadataInfo; import com.azure.storage.file.models.FileProperties; import com.azure.storage.file.models.FileRange; -import com.azure.storage.file.models.FileRangeWriteType; import com.azure.storage.file.models.FileUploadInfo; -import com.azure.storage.file.models.FileUploadRangeFromURLHeaders; -import com.azure.storage.file.models.FileUploadRangeFromURLInfo; -import com.azure.storage.file.models.FileUploadRangeHeaders; -import com.azure.storage.file.models.FilesCreateResponse; -import com.azure.storage.file.models.FilesDownloadResponse; -import com.azure.storage.file.models.FilesGetPropertiesResponse; -import com.azure.storage.file.models.FilesSetHTTPHeadersResponse; -import com.azure.storage.file.models.FilesSetMetadataResponse; -import com.azure.storage.file.models.FilesStartCopyResponse; -import com.azure.storage.file.models.FilesUploadRangeFromURLResponse; -import com.azure.storage.file.models.FilesUploadRangeResponse; +import com.azure.storage.file.models.FileUploadRangeFromUrlInfo; import com.azure.storage.file.models.HandleItem; import com.azure.storage.file.models.StorageException; import reactor.core.Exceptions; @@ -52,9 +52,7 @@ import java.io.File; import java.io.IOException; import java.io.UncheckedIOException; -import java.net.MalformedURLException; import java.net.URI; -import java.net.URL; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousFileChannel; import java.nio.file.FileAlreadyExistsException; @@ -125,16 +123,14 @@ public class FileAsyncClient { * Get the url of the storage file client. * * @return the URL of the storage file client - * @throws RuntimeException If the file is using a malformed URL. */ - public URL getFileUrl() { - try { - return new URL(azureFileStorageClient.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), - azureFileStorageClient.getUrl()), e)); + public String getFileUrl() { + StringBuilder fileUrlstring = new StringBuilder(azureFileStorageClient.getUrl()).append("/") + .append(shareName).append("/").append(filePath); + if (snapshot != null) { + fileUrlstring.append("?snapshot=").append(snapshot); } + return fileUrlstring.toString(); } /** @@ -319,8 +315,8 @@ Mono> abortCopyWithResponse(String copyId, Context context) { * @param downloadFilePath The path where store the downloaded file * @return An empty response. */ - public Mono downloadToFile(String downloadFilePath) { - return downloadToFile(downloadFilePath, null); + public Mono downloadToFile(String downloadFilePath) { + return downloadToFileWithResponse(downloadFilePath, null).flatMap(FluxUtil::toMono); } /** @@ -333,7 +329,7 @@ public Mono downloadToFile(String downloadFilePath) { * *

    Download the file from 1024 to 2048 bytes to current folder.

    * - * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadToFile#string-filerange} + * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadToFileWithResponse#string-filerange} * *

    For more information, see the * Azure Docs.

    @@ -342,19 +338,43 @@ public Mono downloadToFile(String downloadFilePath) { * @param range Optional byte range which returns file data only from the specified range. * @return An empty response. */ - public Mono downloadToFile(String downloadFilePath, FileRange range) { + public Mono> downloadToFileWithResponse(String downloadFilePath, FileRange range) { + return withContext(context -> downloadToFileWithResponse(downloadFilePath, range, context)); + } + + Mono> downloadToFileWithResponse(String downloadFilePath, FileRange range, + Context context) { return Mono.using(() -> channelSetup(downloadFilePath, StandardOpenOption.WRITE, StandardOpenOption.CREATE_NEW), - channel -> sliceFileRange(range) - .flatMap(chunk -> downloadWithPropertiesWithResponse(chunk, false) - .map(dar -> dar.getValue().getBody()) + channel -> getPropertiesWithResponse(context).flatMap(response -> + downloadResponseInChunk(response, channel, range, context)), this::channelCleanUp); + } + + private Mono> downloadResponseInChunk(Response response, + AsynchronousFileChannel channel, + FileRange range, Context context) { + return Mono.justOrEmpty(range).switchIfEmpty(Mono.just(new FileRange(0, response.getValue() + .getContentLength()))) + .map(currentRange -> { + List chunks = new ArrayList<>(); + for (long pos = currentRange.getStart(); pos < currentRange.getEnd(); pos += FILE_DEFAULT_BLOCK_SIZE) { + long count = FILE_DEFAULT_BLOCK_SIZE; + if (pos + count > currentRange.getEnd()) { + count = currentRange.getEnd() - pos; + } + chunks.add(new FileRange(pos, pos + count - 1)); + } + return chunks; + }).flatMapMany(Flux::fromIterable).flatMap(chunk -> + downloadWithPropertiesWithResponse(chunk, false, context) + .map(dar -> dar.getValue().getBody()) + .subscribeOn(Schedulers.elastic()) + .flatMap(fbb -> FluxUtil + .writeFile(fbb, channel, chunk.getStart() - (range == null ? 0 : range.getStart())) .subscribeOn(Schedulers.elastic()) - .flatMap(fbb -> FluxUtil - .writeFile(fbb, channel, chunk.getStart() - (range == null ? 0 : range.getStart())) - .subscribeOn(Schedulers.elastic()) - .timeout(Duration.ofSeconds(DOWNLOAD_UPLOAD_CHUNK_TIMEOUT)) - .retry(3, throwable -> throwable instanceof IOException - || throwable instanceof TimeoutException))) - .then(), this::channelCleanUp); + .timeout(Duration.ofSeconds(DOWNLOAD_UPLOAD_CHUNK_TIMEOUT)) + .retry(3, throwable -> throwable instanceof IOException + || throwable instanceof TimeoutException))) + .then(Mono.just(response)); } private AsynchronousFileChannel channelSetup(String filePath, OpenOption... options) { @@ -373,30 +393,6 @@ private void channelCleanUp(AsynchronousFileChannel channel) { } } - private Flux sliceFileRange(FileRange fileRange) { - long offset = fileRange == null ? 0L : fileRange.getStart(); - Mono end; - if (fileRange != null) { - end = Mono.just(fileRange.getEnd()); - } else { - end = Mono.empty(); - } - end = end.switchIfEmpty(getProperties().map(FileProperties::getContentLength)); - return end - .map(e -> { - List chunks = new ArrayList<>(); - for (long pos = offset; pos < e; pos += FILE_DEFAULT_BLOCK_SIZE) { - long count = FILE_DEFAULT_BLOCK_SIZE; - if (pos + count > e) { - count = e - pos; - } - chunks.add(new FileRange(pos, pos + count - 1)); - } - return chunks; - }) - .flatMapMany(Flux::fromIterable); - } - /** * Downloads a file from the system, including its metadata and properties * @@ -800,7 +796,7 @@ Mono> uploadWithResponse(Flux data, long le * *

    Upload a number of bytes from a file at defined source and destination offsets

    * - * {@codesnippet com.azure.storage.file.fileAsyncClient.uploadRangeFromURL#long-long-long-uri} + * {@codesnippet com.azure.storage.file.fileAsyncClient.uploadRangeFromUrl#long-long-long-uri} * *

    For more information, see the * Azure Docs.

    @@ -809,12 +805,12 @@ Mono> uploadWithResponse(Flux data, long le * @param destinationOffset Starting point of the upload range on the destination. * @param sourceOffset Starting point of the upload range on the source. * @param sourceURI Specifies the URL of the source file. - * @return The {@link FileUploadRangeFromURLInfo file upload range from url info} + * @return The {@link FileUploadRangeFromUrlInfo file upload range from url info} */ // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API - public Mono uploadRangeFromURL(long length, long destinationOffset, long sourceOffset, - URI sourceURI) { - return uploadRangeFromURLWithResponse(length, destinationOffset, sourceOffset, sourceURI) + public Mono uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, + URI sourceURI) { + return uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceURI) .flatMap(FluxUtil::toMono); } @@ -825,7 +821,7 @@ public Mono uploadRangeFromURL(long length, long des * *

    Upload a number of bytes from a file at defined source and destination offsets

    * - * {@codesnippet com.azure.storage.file.fileAsyncClient.uploadRangeFromURLWithResponse#long-long-long-uri} + * {@codesnippet com.azure.storage.file.fileAsyncClient.uploadRangeFromUrlWithResponse#long-long-long-uri} * *

    For more information, see the * Azure Docs.

    @@ -834,17 +830,17 @@ public Mono uploadRangeFromURL(long length, long des * @param destinationOffset Starting point of the upload range on the destination. * @param sourceOffset Starting point of the upload range on the source. * @param sourceURI Specifies the URL of the source file. - * @return A response containing the {@link FileUploadRangeFromURLInfo file upload range from url info} with headers + * @return A response containing the {@link FileUploadRangeFromUrlInfo file upload range from url info} with headers * and response status code. */ // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API - public Mono> uploadRangeFromURLWithResponse(long length, - long destinationOffset, long sourceOffset, URI sourceURI) { + public Mono> uploadRangeFromUrlWithResponse(long length, + long destinationOffset, long sourceOffset, URI sourceURI) { return withContext(context -> - uploadRangeFromURLWithResponse(length, destinationOffset, sourceOffset, sourceURI, context)); + uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceURI, context)); } - Mono> uploadRangeFromURLWithResponse(long length, long destinationOffset, + Mono> uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, URI sourceURI, Context context) { FileRange destinationRange = new FileRange(destinationOffset, destinationOffset + length - 1); FileRange sourceRange = new FileRange(sourceOffset, sourceOffset + length - 1); @@ -852,7 +848,7 @@ Mono> uploadRangeFromURLWithResponse(long l return postProcessResponse(azureFileStorageClient.files() .uploadRangeFromURLWithRestResponseAsync(shareName, filePath, destinationRange.toString(), sourceURI.toString(), 0, null, sourceRange.toString(), null, null, context)) - .map(this::uploadRangeFromURLResponse); + .map(this::uploadRangeFromUrlResponse); } /** @@ -1106,11 +1102,12 @@ public String getShareSnapshotId() { /** * Generates a SAS token with the specified parameters * - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(FileSASPermission permissions, OffsetDateTime expiryTime) { + public String generateSAS(FileSasPermission permissions, OffsetDateTime expiryTime) { return this.generateSAS(null, permissions, expiryTime, null /* startTime */, /* identifier */ null /* version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); @@ -1121,6 +1118,7 @@ public String generateSAS(FileSASPermission permissions, OffsetDateTime expiryTi * * @param identifier The {@code String} name of the access policy on the share this SAS references if any * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ public String generateSAS(String identifier) { return this.generateSAS(identifier, null /* permissions */, null /* expiryTime */, null /* startTime */, @@ -1132,16 +1130,17 @@ public String generateSAS(String identifier) { * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(String identifier, FileSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, FileSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); @@ -1152,30 +1151,32 @@ public String generateSAS(String identifier, FileSASPermission permissions, Offs * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. * @param contentLanguage An optional {@code String} content-language header for the SAS. * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(String identifier, FileSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + public String generateSAS(String identifier, FileSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, + String cacheControl, String contentDisposition, String contentEncoding, + String contentLanguage, String contentType) { - FileServiceSASSignatureValues fileServiceSASSignatureValues = new FileServiceSASSignatureValues(version, + FileServiceSasSignatureValues fileServiceSASSignatureValues = new FileServiceSasSignatureValues(version, sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, identifier, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); @@ -1184,10 +1185,10 @@ public String generateSAS(String identifier, FileSASPermission permissions, Offs Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); - FileServiceSASSignatureValues values = configureServiceSASSignatureValues(fileServiceSASSignatureValues, + FileServiceSasSignatureValues values = configureServiceSASSignatureValues(fileServiceSASSignatureValues, sharedKeyCredential.getAccountName()); - FileServiceSASQueryParameters fileServiceSasQueryParameters = + FileServiceSasQueryParameters fileServiceSasQueryParameters = values.generateSASQueryParameters(sharedKeyCredential); return fileServiceSasQueryParameters.encode(); @@ -1196,8 +1197,8 @@ public String generateSAS(String identifier, FileSASPermission permissions, Offs /** * Sets fileServiceSASSignatureValues parameters dependent on the current file type */ - FileServiceSASSignatureValues configureServiceSASSignatureValues( - FileServiceSASSignatureValues fileServiceSASSignatureValues, String accountName) { + FileServiceSasSignatureValues configureServiceSASSignatureValues( + FileServiceSasSignatureValues fileServiceSASSignatureValues, String accountName) { // Set canonical name fileServiceSASSignatureValues.setCanonicalName(this.shareName, this.filePath, accountName); @@ -1321,20 +1322,20 @@ private Response uploadResponse(final FilesUploadRangeResponse r return new SimpleResponse<>(response, fileUploadInfo); } - private Response uploadRangeFromURLResponse( + private Response uploadRangeFromUrlResponse( final FilesUploadRangeFromURLResponse response) { FileUploadRangeFromURLHeaders headers = response.getDeserializedHeaders(); String eTag = headers.getETag(); OffsetDateTime lastModified = headers.getLastModified(); Boolean isServerEncrypted = headers.isServerEncrypted(); - FileUploadRangeFromURLInfo fileUploadRangeFromURLInfo = - new FileUploadRangeFromURLInfo(eTag, lastModified, isServerEncrypted); - return new SimpleResponse<>(response, fileUploadRangeFromURLInfo); + FileUploadRangeFromUrlInfo fileUploadRangeFromUrlInfo = + new FileUploadRangeFromUrlInfo(eTag, lastModified, isServerEncrypted); + return new SimpleResponse<>(response, fileUploadRangeFromUrlInfo); } private Response setMetadataResponse(final FilesSetMetadataResponse response) { String eTag = response.getDeserializedHeaders().getETag(); - boolean isServerEncrypted = response.getDeserializedHeaders().isServerEncrypted(); + Boolean isServerEncrypted = response.getDeserializedHeaders().isServerEncrypted(); FileMetadataInfo fileMetadataInfo = new FileMetadataInfo(eTag, isServerEncrypted); return new SimpleResponse<>(response, fileMetadataInfo); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index 3bba26613d94..59ad4102ee4d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -3,11 +3,11 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -20,14 +20,13 @@ import com.azure.storage.file.models.FileProperties; import com.azure.storage.file.models.FileRange; import com.azure.storage.file.models.FileUploadInfo; -import com.azure.storage.file.models.FileUploadRangeFromURLInfo; +import com.azure.storage.file.models.FileUploadRangeFromUrlInfo; import com.azure.storage.file.models.HandleItem; import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.net.URI; -import java.net.URL; import java.nio.ByteBuffer; import java.nio.file.FileAlreadyExistsException; import java.time.Duration; @@ -66,9 +65,8 @@ public class FileClient { * Get the url of the storage file client. * * @return the URL of the storage file client. - * @throws RuntimeException If the file is using a malformed URL. */ - public URL getFileUrl() { + public String getFileUrl() { return fileAsyncClient.getFileUrl(); } @@ -235,9 +233,10 @@ public Response abortCopyWithResponse(String copyId, Duration timeout, Con * Azure Docs.

    * * @param downloadFilePath The path where store the downloaded file + * @return The properties of the file. */ - public void downloadToFile(String downloadFilePath) { - downloadToFile(downloadFilePath, null); + public FileProperties downloadToFile(String downloadFilePath) { + return downloadToFileWithResponse(downloadFilePath, null, null, Context.NONE).getValue(); } /** @@ -250,16 +249,23 @@ public void downloadToFile(String downloadFilePath) { * *

    Download the file from 1024 to 2048 bytes to current folder.

    * - * {@codesnippet com.azure.storage.file.fileClient.downloadToFile#string-filerange} + * {@codesnippet com.azure.storage.file.fileClient.downloadToFileWithResponse#string-filerange-duration-context} * *

    For more information, see the * Azure Docs.

    * * @param downloadFilePath The path where store the downloaded file * @param range Optional byte range which returns file data only from the specified range. + * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout + * concludes a {@link RuntimeException} will be thrown. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The response of the file properties. */ - public void downloadToFile(String downloadFilePath, FileRange range) { - fileAsyncClient.downloadToFile(downloadFilePath, range).block(); + public Response downloadToFileWithResponse(String downloadFilePath, FileRange range, + Duration timeout, Context context) { + Mono> response = fileAsyncClient.downloadToFileWithResponse(downloadFilePath, range, + context); + return Utility.blockWithOptionalTimeout(response, timeout); } /** @@ -612,7 +618,7 @@ public Response uploadWithResponse(ByteBuffer data, long length, * *

    Upload a number of bytes from a file at defined source and destination offsets

    * - * {@codesnippet com.azure.storage.file.fileClient.uploadRangeFromURL#long-long-long-uri} + * {@codesnippet com.azure.storage.file.fileClient.uploadRangeFromUrl#long-long-long-uri} * *

    For more information, see the * Azure Docs.

    @@ -621,12 +627,12 @@ public Response uploadWithResponse(ByteBuffer data, long length, * @param destinationOffset Starting point of the upload range on the destination. * @param sourceOffset Starting point of the upload range on the source. * @param sourceURI Specifies the URL of the source file. - * @return The {@link FileUploadRangeFromURLInfo file upload range from url info} + * @return The {@link FileUploadRangeFromUrlInfo file upload range from url info} */ // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API - public FileUploadRangeFromURLInfo uploadRangeFromURL(long length, long destinationOffset, long sourceOffset, - URI sourceURI) { - return uploadRangeFromURLWithResponse(length, destinationOffset, sourceOffset, sourceURI, null, Context.NONE) + public FileUploadRangeFromUrlInfo uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, + URI sourceURI) { + return uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceURI, null, Context.NONE) .getValue(); } @@ -637,7 +643,7 @@ public FileUploadRangeFromURLInfo uploadRangeFromURL(long length, long destinati * *

    Upload a number of bytes from a file at defined source and destination offsets

    * - * {@codesnippet com.azure.storage.file.fileClient.uploadRangeFromURLWithResponse#long-long-long-uri-duration-context} + * {@codesnippet com.azure.storage.file.fileClient.uploadRangeFromUrlWithResponse#long-long-long-uri-duration-context} * *

    For more information, see the * Azure Docs.

    @@ -649,14 +655,14 @@ public FileUploadRangeFromURLInfo uploadRangeFromURL(long length, long destinati * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout * concludes a {@link RuntimeException} will be thrown. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing the {@link FileUploadRangeFromURLInfo file upload range from url info} with headers + * @return A response containing the {@link FileUploadRangeFromUrlInfo file upload range from url info} with headers * and response status code. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API - public Response uploadRangeFromURLWithResponse(long length, long destinationOffset, - long sourceOffset, URI sourceURI, Duration timeout, Context context) { - Mono> response = fileAsyncClient.uploadRangeFromURLWithResponse(length, + public Response uploadRangeFromUrlWithResponse(long length, long destinationOffset, + long sourceOffset, URI sourceURI, Duration timeout, Context context) { + Mono> response = fileAsyncClient.uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceURI, context); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -856,10 +862,10 @@ public String getShareSnapshotId() { * Generates a SAS token with the specified parameters * * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @return A string that represents the SAS token */ - public String generateSAS(OffsetDateTime expiryTime, FileSASPermission permissions) { + public String generateSAS(OffsetDateTime expiryTime, FileSasPermission permissions) { return this.fileAsyncClient.generateSAS(permissions, expiryTime); } @@ -877,16 +883,16 @@ public String generateSAS(String identifier) { * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ - public String generateSAS(String identifier, FileSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, FileSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.fileAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange); } @@ -896,18 +902,18 @@ public String generateSAS(String identifier, FileSASPermission permissions, Offs * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.FileClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.file.FileClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code FileSASPermission} permission for the SAS + * @param permissions The {@code FileSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -915,9 +921,9 @@ public String generateSAS(String identifier, FileSASPermission permissions, Offs * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token */ - public String generateSAS(String identifier, FileSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + public String generateSAS(String identifier, FileSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { return this.fileAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java index 28b72e989660..66bb69613ee9 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClientBuilder.java @@ -194,11 +194,11 @@ public FileClient buildFileClient() { @Override public FileClientBuilder endpoint(String endpoint) { try { - URL fullURL = new URL(endpoint); - super.endpoint = fullURL.getProtocol() + "://" + fullURL.getHost(); + URL fullUrl = new URL(endpoint); + super.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); // Attempt to get the share name and file path from the URL passed - String[] pathSegments = fullURL.getPath().split("/"); + String[] pathSegments = fullUrl.getPath().split("/"); int length = pathSegments.length; this.shareName = length >= 2 ? pathSegments[1] : this.shareName; String[] filePathParams = length >= 3 ? Arrays.copyOfRange(pathSegments, 2, length) : null; @@ -206,7 +206,7 @@ public FileClientBuilder endpoint(String endpoint) { // Attempt to get the SAS token from the URL passed SASTokenCredential sasTokenCredential = SASTokenCredential - .fromQueryParameters(Utility.parseQueryString(fullURL.getQuery())); + .fromQueryParameters(Utility.parseQueryString(fullUrl.getQuery())); if (sasTokenCredential != null) { super.credential(sasTokenCredential); } @@ -254,4 +254,9 @@ public FileClientBuilder resourcePath(String resourcePath) { this.resourcePath = resourcePath; return this; } + + @Override + protected Class getClazz() { + return FileClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSASPermission.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java similarity index 82% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSASPermission.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java index 9a2fce512594..536671ab50e3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSASPermission.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileSasPermission.java @@ -11,10 +11,10 @@ * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a file. Setting * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all * the values are set, this should be serialized with toString and set as the permissions field on a {@link - * FileServiceSASSignatureValues} object. It is possible to construct the permissions string without this class, but the + * FileServiceSasSignatureValues} object. It is possible to construct the permissions string without this class, but the * order of the permissions is particular and this class guarantees correctness. */ -public final class FileSASPermission { +public final class FileSasPermission { private boolean readPermission; private boolean createPermission; @@ -24,21 +24,21 @@ public final class FileSASPermission { private boolean deletePermission; /** - * Initializes an {@code FileSASPermission} object with all fields set to false. + * Initializes an {@code FileSasPermission} object with all fields set to false. */ - public FileSASPermission() { + public FileSasPermission() { } /** - * Creates an {@code FileSASPermission} from the specified permissions string. This method will throw an + * Creates an {@code FileSasPermission} from the specified permissions string. This method will throw an * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. * - * @param permString A {@code String} which represents the {@code FileSASPermission}. - * @return A {@code FileSASPermission} generated from the given {@code String}. + * @param permString A {@code String} which represents the {@code FileSasPermission}. + * @return A {@code FileSasPermission} generated from the given {@code String}. * @throws IllegalArgumentException If {@code permString} contains a character other than r, c, w, or d. */ - public static FileSASPermission parse(String permString) { - FileSASPermission permissions = new FileSASPermission(); + public static FileSasPermission parse(String permString) { + FileSasPermission permissions = new FileSasPermission(); for (int i = 0; i < permString.length(); i++) { char c = permString.charAt(i); @@ -75,9 +75,9 @@ public boolean getReadPermission() { * Sets the read permission status. * * @param hasReadPermission Permission status to set - * @return the updated FileSASPermission object + * @return the updated FileSasPermission object */ - public FileSASPermission setReadPermission(boolean hasReadPermission) { + public FileSasPermission setReadPermission(boolean hasReadPermission) { this.readPermission = hasReadPermission; return this; } @@ -93,9 +93,9 @@ public boolean getCreatePermission() { * Sets the create permission status. * * @param hasCreatePermission Permission status to set - * @return the updated FileSASPermission object + * @return the updated FileSasPermission object */ - public FileSASPermission setCreatePermission(boolean hasCreatePermission) { + public FileSasPermission setCreatePermission(boolean hasCreatePermission) { this.createPermission = hasCreatePermission; return this; } @@ -111,9 +111,9 @@ public boolean getWritePermission() { * Sets the write permission status. * * @param hasWritePermission Permission status to set - * @return the updated FileSASPermission object + * @return the updated FileSasPermission object */ - public FileSASPermission setWritePermission(boolean hasWritePermission) { + public FileSasPermission setWritePermission(boolean hasWritePermission) { this.writePermission = hasWritePermission; return this; } @@ -129,9 +129,9 @@ public boolean getDeletePermission() { * Sets the delete permission status. * * @param hasDeletePermission Permission status to set - * @return the updated FileSASPermission object + * @return the updated FileSasPermission object */ - public FileSASPermission setDeletePermission(boolean hasDeletePermission) { + public FileSasPermission setDeletePermission(boolean hasDeletePermission) { this.deletePermission = hasDeletePermission; return this; } @@ -140,7 +140,7 @@ public FileSASPermission setDeletePermission(boolean hasDeletePermission) { * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. * - * @return A {@code String} which represents the {@code FileSASPermission}. + * @return A {@code String} which represents the {@code FileSasPermission}. */ @Override public String toString() { diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java index 8596935e6547..8be99aac38c2 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java @@ -3,11 +3,11 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.implementation.util.ImplUtils; @@ -17,23 +17,21 @@ import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; import com.azure.storage.common.AccountSASSignatureValues; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; +import com.azure.storage.file.implementation.models.DeleteSnapshotsOptionType; +import com.azure.storage.file.implementation.models.ListSharesIncludeType; import com.azure.storage.file.models.CorsRule; -import com.azure.storage.file.models.DeleteSnapshotsOptionType; import com.azure.storage.file.models.FileServiceProperties; -import com.azure.storage.file.models.ListSharesIncludeType; import com.azure.storage.file.models.ListSharesOptions; import com.azure.storage.file.models.ShareItem; import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -78,16 +76,9 @@ public final class FileServiceAsyncClient { * Get the url of the storage file service client. * * @return the url of the Storage File service. - * @throws RuntimeException If the file service is using a malformed URL. */ - public URL getFileServiceUrl() { - try { - return new URL(azureFileStorageClient.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), - azureFileStorageClient.getUrl()), e)); - } + public String getFileServiceUrl() { + return azureFileStorageClient.getUrl(); } /** @@ -188,11 +179,11 @@ PagedFlux listSharesWithOptionalTimeout(String marker, ListSharesOpti if (options != null) { if (options.isIncludeMetadata()) { - include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.METADATA.toString())); + include.add(ListSharesIncludeType.METADATA); } if (options.isIncludeSnapshots()) { - include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.SNAPSHOTS.toString())); + include.add(ListSharesIncludeType.SNAPSHOTS); } } @@ -442,7 +433,7 @@ public Mono> deleteShareWithResponse(String shareName, String sna Mono> deleteShareWithResponse(String shareName, String snapshot, Context context) { DeleteSnapshotsOptionType deleteSnapshots = null; if (ImplUtils.isNullOrEmpty(snapshot)) { - deleteSnapshots = DeleteSnapshotsOptionType.fromString(DeleteSnapshotsOptionType.INCLUDE.toString()); + deleteSnapshots = DeleteSnapshotsOptionType.INCLUDE; } return postProcessResponse(azureFileStorageClient.shares() .deleteWithRestResponseAsync(shareName, snapshot, null, deleteSnapshots, context)) @@ -457,6 +448,7 @@ Mono> deleteShareWithResponse(String shareName, String snapshot, * @param accountSASPermission The {@code AccountSASPermission} permission for the account SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission, OffsetDateTime expiryTime) { @@ -469,7 +461,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs.

    @@ -480,13 +472,14 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureFileStorageClient .getHttpPipeline()); @@ -494,6 +487,5 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS return AccountSASSignatureValues.generateAccountSAS(sharedKeyCredential, accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); - } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java index b777dbd6e29c..2428d2a9fd43 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java @@ -3,15 +3,15 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; import com.azure.storage.common.AccountSASPermission; import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -23,7 +23,6 @@ import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Map; @@ -61,9 +60,8 @@ public final class FileServiceClient { * Get the url of the storage file service client. * * @return the url of the Storage File service. - * @throws RuntimeException If the directory is using a malformed URL. */ - public URL getFileServiceUrl() { + public String getFileServiceUrl() { return fileServiceAsyncClient.getFileServiceUrl(); } @@ -389,7 +387,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs.

    @@ -400,13 +398,13 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { return this.fileServiceAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java index d5b3a66965f5..06d89d7bd5b7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClientBuilder.java @@ -135,12 +135,12 @@ public FileServiceClient buildClient() { @Override public FileServiceClientBuilder endpoint(String endpoint) { try { - URL fullURL = new URL(endpoint); - super.endpoint = fullURL.getProtocol() + "://" + fullURL.getHost(); + URL fullUrl = new URL(endpoint); + super.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); // Attempt to get the SAS token from the URL passed SASTokenCredential sasTokenCredential = SASTokenCredential - .fromQueryParameters(Utility.parseQueryString(fullURL.getQuery())); + .fromQueryParameters(Utility.parseQueryString(fullUrl.getQuery())); if (sasTokenCredential != null) { super.credential(sasTokenCredential); } @@ -151,4 +151,9 @@ public FileServiceClientBuilder endpoint(String endpoint) { return this; } + + @Override + protected Class getClazz() { + return FileServiceClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASQueryParameters.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java similarity index 90% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASQueryParameters.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java index 2ef2b41c58ab..4d2be37d8f71 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASQueryParameters.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasQueryParameters.java @@ -3,9 +3,9 @@ package com.azure.storage.file; -import com.azure.storage.common.BaseSASQueryParameters; +import com.azure.storage.common.BaseSasQueryParameters; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import java.time.OffsetDateTime; @@ -13,13 +13,13 @@ /** * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link FileServiceSASSignatureValues} type. Once generated, it can be set on + * by the user; it is only generated by the {@link FileServiceSasSignatureValues} type. Once generated, it can be set on * a {@link FileClientBuilder} object to be constructed as part of a URL or it can be encoded into a {@code String} and * appended to a URL directly (though caution should be taken here in case there are existing query parameters, which * might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable * to ensure thread safety. */ -public final class FileServiceSASQueryParameters extends BaseSASQueryParameters { +public final class FileServiceSasQueryParameters extends BaseSasQueryParameters { private final String identifier; @@ -36,13 +36,13 @@ public final class FileServiceSASQueryParameters extends BaseSASQueryParameters private final String contentType; /** - * Creates a new {@link FileServiceSASQueryParameters} object. + * Creates a new {@link FileServiceSasQueryParameters} object. * * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from * queryParamsMap */ - public FileServiceSASQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { + public FileServiceSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { super(queryParamsMap, removeSASParametersFromMap); this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, removeSASParametersFromMap); @@ -61,22 +61,22 @@ public FileServiceSASQueryParameters(Map queryParamsMap, boole } /** - * Creates a new {@link FileServiceSASQueryParameters} object. These objects are only created internally by + * Creates a new {@link FileServiceSasQueryParameters} object. These objects are only created internally by * SASSignatureValues classes. * * @param version A {@code String} representing the storage version. * @param protocol A {@code String} representing the allowed HTTP protocol(s) or {@code null}. * @param startTime A {@code java.util.Date} representing the start time for this SAS token or {@code null}. * @param expiryTime A {@code java.util.Date} representing the expiry time for this SAS token. - * @param ipRange A {@link IPRange} representing the range of valid IP addresses for this SAS token or + * @param ipRange A {@link IpRange} representing the range of valid IP addresses for this SAS token or * {@code null}. * @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}. * @param resource A {@code String} representing the storage share or file (only for Service SAS). * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. */ - FileServiceSASQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, IPRange ipRange, String identifier, String resource, String permissions, + FileServiceSasQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, IpRange ipRange, String identifier, String resource, String permissions, String signature, String cacheControl, String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { super(version, protocol, startTime, expiryTime, ipRange, permissions, signature); @@ -91,7 +91,7 @@ public FileServiceSASQueryParameters(Map queryParamsMap, boole } /** - * @return The signed identifier (only for {@link FileServiceSASSignatureValues}) or {@code null}. Please see + * @return The signed identifier (only for {@link FileServiceSasSignatureValues}) or {@code null}. Please see * here * for more information. */ @@ -100,7 +100,7 @@ public String getIdentifier() { } /** - * @return The storage share or file (only for {@link FileServiceSASSignatureValues}). + * @return The storage share or file (only for {@link FileServiceSasSignatureValues}). */ public String getResource() { return resource; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASSignatureValues.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java similarity index 78% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASSignatureValues.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java index b0e13825c3bd..e3aa5bee1f36 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSASSignatureValues.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceSasSignatureValues.java @@ -4,7 +4,7 @@ package com.azure.storage.file; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SharedKeyCredential; @@ -12,9 +12,9 @@ import java.time.OffsetDateTime; /** - * FileServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once + * FileServiceSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to file urls. Note: that both this class and {@link FileServiceSASQueryParameters} + * which can actually be applied to file urls. Note: that both this class and {@link FileServiceSasQueryParameters} * exist because the former is mutable and a logical representation while the latter is immutable and used to generate * actual REST requests. *

    @@ -28,7 +28,7 @@ * here * for additional samples.

    */ -final class FileServiceSASSignatureValues { +final class FileServiceSasSignatureValues { private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; @@ -40,7 +40,7 @@ final class FileServiceSASSignatureValues { private String permissions; - private IPRange ipRange; + private IpRange ipRange; private String canonicalName; @@ -61,7 +61,7 @@ final class FileServiceSASSignatureValues { /** * Creates an object with empty values for all fields. */ - FileServiceSASSignatureValues() { + FileServiceSasSignatureValues() { } /** @@ -70,7 +70,7 @@ final class FileServiceSASSignatureValues { * @param expiryTime Time the SAS becomes valid * @param permissions Permissions granted by the SAS */ - FileServiceSASSignatureValues(OffsetDateTime expiryTime, String permissions) { + FileServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { this.expiryTime = expiryTime; this.permissions = permissions; } @@ -80,12 +80,12 @@ final class FileServiceSASSignatureValues { * * @param identifier Identifier for the SAS */ - FileServiceSASSignatureValues(String identifier) { + FileServiceSasSignatureValues(String identifier) { this.identifier = identifier; } - FileServiceSASSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, IPRange ipRange, String identifier, String cacheControl, + FileServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, String permission, IpRange ipRange, String identifier, String cacheControl, String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { if (version != null) { this.version = version; @@ -116,9 +116,9 @@ public String getVersion() { * by the library. * * @param version Version to target - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setVersion(String version) { + public FileServiceSasSignatureValues setVersion(String version) { this.version = version; return this; } @@ -134,9 +134,9 @@ public SASProtocol getProtocol() { * Sets the {@link SASProtocol} which determines the protocols allowed by the SAS. * * @param protocol Protocol for the SAS - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setProtocol(SASProtocol protocol) { + public FileServiceSasSignatureValues setProtocol(SASProtocol protocol) { this.protocol = protocol; return this; } @@ -152,9 +152,9 @@ public OffsetDateTime getStartTime() { * Sets when the SAS will take effect. * * @param startTime When the SAS takes effect - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setStartTime(OffsetDateTime startTime) { + public FileServiceSasSignatureValues setStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -170,47 +170,47 @@ public OffsetDateTime getExpiryTime() { * Sets the time after which the SAS will no longer work. * * @param expiryTime When the SAS will no longer work - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setExpiryTime(OffsetDateTime expiryTime) { + public FileServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) { this.expiryTime = expiryTime; return this; } /** - * @return the permissions string allowed by the SAS. Please refer to either {@link ShareSASPermission} or {@link - * FileSASPermission} depending on the resource being accessed for help determining the permissions allowed. + * @return the permissions string allowed by the SAS. Please refer to either {@link ShareSasPermission} or {@link + * FileSasPermission} depending on the resource being accessed for help determining the permissions allowed. */ public String getPermissions() { return permissions; } /** - * Sets the permissions string allowed by the SAS. Please refer to either {@link ShareSASPermission} or {@link - * FileSASPermission} depending on the resource being accessed for help constructing the permissions string. + * Sets the permissions string allowed by the SAS. Please refer to either {@link ShareSasPermission} or {@link + * FileSasPermission} depending on the resource being accessed for help constructing the permissions string. * * @param permissions Permissions string for the SAS - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setPermissions(String permissions) { + public FileServiceSasSignatureValues setPermissions(String permissions) { this.permissions = permissions; return this; } /** - * @return the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * @return the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. */ - public IPRange getIpRange() { + public IpRange getIpRange() { return ipRange; } /** - * Sets the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * Sets the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. * * @param ipRange Allowed IP range to set - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setIpRange(IPRange ipRange) { + public FileServiceSasSignatureValues setIpRange(IpRange ipRange) { this.ipRange = ipRange; return this; } @@ -226,9 +226,9 @@ public String getResource() { * Sets the resource the SAS user may access. * * @param resource Allowed resources string to set - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setResource(String resource) { + public FileServiceSasSignatureValues setResource(String resource) { this.resource = resource; return this; } @@ -244,9 +244,9 @@ public String getCanonicalName() { * Sets the canonical name of the object the SAS user may access. * * @param canonicalName Canonical name of the object the SAS grants access - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setCanonicalName(String canonicalName) { + public FileServiceSasSignatureValues setCanonicalName(String canonicalName) { this.canonicalName = canonicalName; return this; } @@ -258,9 +258,9 @@ public FileServiceSASSignatureValues setCanonicalName(String canonicalName) { * @param shareName Name of the share * @param filePath Name of the file * @param accountName Name of the account that contains the object - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setCanonicalName(String shareName, String filePath, String accountName) { + public FileServiceSasSignatureValues setCanonicalName(String shareName, String filePath, String accountName) { this.canonicalName = String.format("/file/%s/%s/%s", accountName, shareName, filePath); return this; } @@ -271,9 +271,9 @@ public FileServiceSASSignatureValues setCanonicalName(String shareName, String f * * @param shareName Name of the share * @param accountName Name of the account that contains the object - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setCanonicalName(String shareName, String accountName) { + public FileServiceSasSignatureValues setCanonicalName(String shareName, String accountName) { this.canonicalName = String.format("/file/%s/%s", accountName, shareName); return this; } @@ -293,9 +293,9 @@ public String getIdentifier() { * for more information. * * @param identifier Name of the access policy - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setIdentifier(String identifier) { + public FileServiceSasSignatureValues setIdentifier(String identifier) { this.identifier = identifier; return this; } @@ -311,9 +311,9 @@ public String getCacheControl() { * Sets the cache-control header for the SAS. * * @param cacheControl Cache-Control header value - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setCacheControl(String cacheControl) { + public FileServiceSasSignatureValues setCacheControl(String cacheControl) { this.cacheControl = cacheControl; return this; } @@ -329,9 +329,9 @@ public String getContentDisposition() { * Sets the content-disposition header for the SAS. * * @param contentDisposition Content-Disposition header value - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setContentDisposition(String contentDisposition) { + public FileServiceSasSignatureValues setContentDisposition(String contentDisposition) { this.contentDisposition = contentDisposition; return this; } @@ -347,9 +347,9 @@ public String getContentEncoding() { * Sets the content-encoding header for the SAS. * * @param contentEncoding Content-Encoding header value - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setContentEncoding(String contentEncoding) { + public FileServiceSasSignatureValues setContentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } @@ -365,9 +365,9 @@ public String getContentLanguage() { * Sets the content-language header for the SAS. * * @param contentLanguage Content-Language header value - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setContentLanguage(String contentLanguage) { + public FileServiceSasSignatureValues setContentLanguage(String contentLanguage) { this.contentLanguage = contentLanguage; return this; } @@ -383,9 +383,9 @@ public String getContentType() { * Sets the content-type header for the SAS. * * @param contentType Content-Type header value - * @return the updated FileServiceSASSignatureValues object + * @return the updated FileServiceSasSignatureValues object */ - public FileServiceSASSignatureValues setContentType(String contentType) { + public FileServiceSasSignatureValues setContentType(String contentType) { this.contentType = contentType; return this; } @@ -395,18 +395,22 @@ public FileServiceSASSignatureValues setContentType(String contentType) { * parameters. * * @param sharedKeyCredentials A {@link SharedKeyCredential} object used to sign the SAS values. - * @return {@link FileServiceSASQueryParameters} + * @return {@link FileServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. + * @throws NullPointerException If {@code sharedKeyCredentials} is null. Or when any of {@code version}, + * {@code canonicalName} or {@code resource} is null. Or if {@code identifier} is not set and any of + * {@code expiryTime} or {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} are not set + * and {@code identifier} is null */ - public FileServiceSASQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { + public FileServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); assertGenerateOK(); // Signature is generated on the un-url-encoded values. String signature = sharedKeyCredentials.computeHmac256(stringToSign()); - return new FileServiceSASQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, + return new FileServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.ipRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java index c22826a0976e..ddaef6a2dda3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java @@ -3,41 +3,39 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.implementation.DateTimeRfc1123; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.implementation.AzureFileStorageImpl; +import com.azure.storage.file.implementation.models.ShareCreateSnapshotHeaders; +import com.azure.storage.file.implementation.models.ShareGetPropertiesHeaders; +import com.azure.storage.file.implementation.models.SharePermission; +import com.azure.storage.file.implementation.models.SharesCreateSnapshotResponse; +import com.azure.storage.file.implementation.models.SharesGetPropertiesResponse; +import com.azure.storage.file.implementation.models.SharesGetStatisticsResponse; import com.azure.storage.file.models.FileHTTPHeaders; -import com.azure.storage.file.models.ShareCreateSnapshotHeaders; -import com.azure.storage.file.models.ShareGetPropertiesHeaders; import com.azure.storage.file.models.ShareInfo; -import com.azure.storage.file.models.SharePermission; import com.azure.storage.file.models.ShareProperties; import com.azure.storage.file.models.ShareSnapshotInfo; import com.azure.storage.file.models.ShareStatistics; -import com.azure.storage.file.models.SharesCreateSnapshotResponse; -import com.azure.storage.file.models.SharesGetPropertiesResponse; -import com.azure.storage.file.models.SharesGetStatisticsResponse; import com.azure.storage.file.models.SignedIdentifier; import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; import java.util.List; @@ -93,16 +91,13 @@ public class ShareAsyncClient { * Get the url of the storage share client. * * @return the url of the Storage Share. - * @throws RuntimeException If the share is using a malformed URL. */ - public URL getShareUrl() { - try { - return new URL(azureFileStorageClient.getUrl()); - } catch (MalformedURLException e) { - throw logger.logExceptionAsError(new RuntimeException( - String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), - azureFileStorageClient.getUrl()), e)); + public String getShareUrl() { + StringBuilder shareUrlString = new StringBuilder(azureFileStorageClient.getUrl()).append("/").append(shareName); + if (snapshot != null) { + shareUrlString.append("?snapshot=").append(snapshot); } + return shareUrlString.toString(); } @@ -141,7 +136,7 @@ public DirectoryAsyncClient getDirectoryClient(String directoryName) { * @return a {@link FileAsyncClient} that interacts with the file in the share */ public FileAsyncClient getFileClient(String filePath) { - return new FileAsyncClient(azureFileStorageClient, shareName, filePath, null); + return new FileAsyncClient(azureFileStorageClient, shareName, filePath, snapshot); } /** @@ -890,11 +885,12 @@ public String getSnapshotId() { /** * Generates a SAS token with the specified parameters * - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(ShareSASPermission permissions, OffsetDateTime expiryTime) { + public String generateSAS(ShareSasPermission permissions, OffsetDateTime expiryTime) { return this.generateSAS(null, permissions, expiryTime, null /* startTime */, /* identifier */ null /* version */, null /* sasProtocol */, null /* ipRange */, null /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); @@ -905,6 +901,7 @@ public String generateSAS(ShareSASPermission permissions, OffsetDateTime expiryT * * @param identifier The {@code String} name of the access policy on the share this SAS references if any * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ public String generateSAS(String identifier) { return this.generateSAS(identifier, null /* permissions */, null /* expiryTime */, null /* startTime */, @@ -916,16 +913,17 @@ public String generateSAS(String identifier) { * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(String identifier, ShareSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, ShareSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, null /* cacheControl */, null /* contentLanguage*/, null /* contentEncoding */, null /* contentLanguage */, null /* contentType */); @@ -936,30 +934,31 @@ public String generateSAS(String identifier, ShareSASPermission permissions, Off * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. * @param contentLanguage An optional {@code String} content-language header for the SAS. * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredentials} is null */ - public String generateSAS(String identifier, ShareSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + public String generateSAS(String identifier, ShareSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - FileServiceSASSignatureValues fileServiceSASSignatureValues = new FileServiceSASSignatureValues(version, + FileServiceSasSignatureValues fileServiceSASSignatureValues = new FileServiceSasSignatureValues(version, sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, identifier, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); @@ -968,10 +967,10 @@ public String generateSAS(String identifier, ShareSASPermission permissions, Off Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); - FileServiceSASSignatureValues values = configureServiceSASSignatureValues(fileServiceSASSignatureValues, + FileServiceSasSignatureValues values = configureServiceSASSignatureValues(fileServiceSASSignatureValues, sharedKeyCredential.getAccountName()); - FileServiceSASQueryParameters fileServiceSasQueryParameters = + FileServiceSasQueryParameters fileServiceSasQueryParameters = values.generateSASQueryParameters(sharedKeyCredential); return fileServiceSasQueryParameters.encode(); @@ -993,8 +992,8 @@ public String getShareName() { /** * Sets fileServiceSASSignatureValues parameters dependent on the current file type */ - FileServiceSASSignatureValues configureServiceSASSignatureValues( - FileServiceSASSignatureValues fileServiceSASSignatureValues, String accountName) { + FileServiceSasSignatureValues configureServiceSASSignatureValues( + FileServiceSasSignatureValues fileServiceSASSignatureValues, String accountName) { // Set canonical name fileServiceSASSignatureValues.setCanonicalName(this.shareName, accountName); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java index 0eb8401ec664..356f2336d398 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java @@ -3,12 +3,12 @@ package com.azure.storage.file; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -22,7 +22,6 @@ import com.azure.storage.file.models.StorageException; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; @@ -56,9 +55,8 @@ public class ShareClient { * Get the url of the storage share client. * * @return the url of the Storage Share. - * @throws RuntimeException If the share is using a malformed URL. */ - public URL getShareUrl() { + public String getShareUrl() { return client.getShareUrl(); } @@ -791,10 +789,10 @@ public String getSnapshotId() { * Generates a SAS token with the specified parameters * * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @return A string that represents the SAS token */ - public String generateSAS(OffsetDateTime expiryTime, ShareSASPermission permissions) { + public String generateSAS(OffsetDateTime expiryTime, ShareSasPermission permissions) { return this.client.generateSAS(permissions, expiryTime); } @@ -812,16 +810,16 @@ public String generateSAS(String identifier) { * Generates a SAS token with the specified parameters * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ShareSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, ShareSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange); } @@ -830,18 +828,18 @@ public String generateSAS(String identifier, ShareSASPermission permissions, Off * *

    Code Samples

    * - * {@codesnippet com.azure.storage.file.ShareClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String} + * {@codesnippet com.azure.storage.file.ShareClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the share this SAS references if any - * @param permissions The {@code ShareSASPermission} permission for the SAS + * @param permissions The {@code ShareSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param cacheControl An optional {@code String} cache-control header for the SAS. * @param contentDisposition An optional {@code String} content-disposition header for the SAS. * @param contentEncoding An optional {@code String} content-encoding header for the SAS. @@ -849,9 +847,9 @@ public String generateSAS(String identifier, ShareSASPermission permissions, Off * @param contentType An optional {@code String} content-type header for the SAS. * @return A string that represents the SAS token */ - public String generateSAS(String identifier, ShareSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { + public String generateSAS(String identifier, ShareSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange, String cacheControl, + String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { return this.client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java index 9002a46b6dff..cf389f34e5b1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClientBuilder.java @@ -145,13 +145,13 @@ public ShareClient buildClient() { @Override public ShareClientBuilder endpoint(String endpoint) { try { - URL fullURL = new URL(endpoint); - super.endpoint = fullURL.getProtocol() + "://" + fullURL.getHost(); + URL fullUrl = new URL(endpoint); + super.endpoint = fullUrl.getProtocol() + "://" + fullUrl.getHost(); // Attempt to get the share name from the URL passed - String[] pathSegments = fullURL.getPath().split("/"); + String[] pathSegments = fullUrl.getPath().split("/"); int length = pathSegments.length; - if (length >= 3) { + if (length > 3) { throw logger.logExceptionAsError(new IllegalArgumentException( "Cannot accept a URL to a file or directory to construct a file share client")); } @@ -159,7 +159,7 @@ public ShareClientBuilder endpoint(String endpoint) { // Attempt to get the SAS token from the URL passed SASTokenCredential sasTokenCredential = SASTokenCredential - .fromQueryParameters(Utility.parseQueryString(fullURL.getQuery())); + .fromQueryParameters(Utility.parseQueryString(fullUrl.getQuery())); if (sasTokenCredential != null) { super.credential(sasTokenCredential); } @@ -194,4 +194,9 @@ public ShareClientBuilder snapshot(String snapshot) { this.snapshot = snapshot; return this; } + + @Override + protected Class getClazz() { + return ShareClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSASPermission.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java similarity index 51% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSASPermission.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java index 670f1698aa44..f923c38de8bd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSASPermission.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareSasPermission.java @@ -12,59 +12,59 @@ * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a share. Setting * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all * the values are set, this should be serialized with toString and set as the permissions field on a {@link - * FileServiceSASSignatureValues} object. It is possible to construct the permissions string without this class, but the + * FileServiceSasSignatureValues} object. It is possible to construct the permissions string without this class, but the * order of the permissions is particular and this class guarantees correctness. */ -public final class ShareSASPermission { - private boolean read; +public final class ShareSasPermission { + private boolean readPermission; - private boolean create; + private boolean createPermission; - private boolean write; + private boolean writePermission; - private boolean delete; + private boolean deletePermission; - private boolean list; + private boolean listPermission; /** - * Initializes an {@code ShareSASPermission} object with all fields set to false. + * Initializes an {@code ShareSasPermission} object with all fields set to false. */ - public ShareSASPermission() { + public ShareSasPermission() { } /** - * Creates an {@code ShareSASPermission} from the specified permissions string. This method will throw an + * Creates an {@code ShareSasPermission} from the specified permissions string. This method will throw an * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. * - * @param permString A {@code String} which represents the {@code ShareSASPermission}. - * @return A {@code ShareSASPermission} generated from the given {@code String}. + * @param permissionString A {@code String} which represents the {@code ShareSasPermission}. + * @return A {@code ShareSasPermission} generated from the given {@code String}. * @throws IllegalArgumentException If {@code permString} contains a character other than r, c, w, d, or l. */ - public static ShareSASPermission parse(String permString) { - ShareSASPermission permissions = new ShareSASPermission(); + public static ShareSasPermission parse(String permissionString) { + ShareSasPermission permissions = new ShareSasPermission(); - for (int i = 0; i < permString.length(); i++) { - char c = permString.charAt(i); + for (int i = 0; i < permissionString.length(); i++) { + char c = permissionString.charAt(i); switch (c) { case 'r': - permissions.read = true; + permissions.readPermission = true; break; case 'c': - permissions.create = true; + permissions.createPermission = true; break; case 'w': - permissions.write = true; + permissions.writePermission = true; break; case 'd': - permissions.delete = true; + permissions.deletePermission = true; break; case 'l': - permissions.list = true; + permissions.listPermission = true; break; default: throw new IllegalArgumentException( String.format(Locale.ROOT, SR.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, - "Permissions", permString, c)); + "Permissions", permissionString, c)); } } return permissions; @@ -73,90 +73,90 @@ public static ShareSASPermission parse(String permString) { /** * @return the read permission status */ - public boolean getRead() { - return read; + public boolean getReadPermission() { + return readPermission; } /** * Sets the read permission status. * - * @param read Permission status to set - * @return the updated ShareSASPermission object + * @param hasReadPermission Permission status to set + * @return the updated ShareSasPermission object */ - public ShareSASPermission setRead(boolean read) { - this.read = read; + public ShareSasPermission setReadPermission(boolean hasReadPermission) { + this.readPermission = hasReadPermission; return this; } /** * @return the create permission status */ - public boolean getCreate() { - return create; + public boolean getCreatePermission() { + return createPermission; } /** * Sets the create permission status. * - * @param create Permission status to set - * @return the updated ShareSASPermission object + * @param hasCreatePermission Permission status to set + * @return the updated ShareSasPermission object */ - public ShareSASPermission setCreate(boolean create) { - this.create = create; + public ShareSasPermission setCreatePermission(boolean hasCreatePermission) { + this.createPermission = hasCreatePermission; return this; } /** * @return the write permission status */ - public boolean getWrite() { - return write; + public boolean getWritePermission() { + return writePermission; } /** * Sets the write permission status. * - * @param write Permission status to set - * @return the updated ShareSASPermission object + * @param hasWritePermission Permission status to set + * @return the updated ShareSasPermission object */ - public ShareSASPermission setWrite(boolean write) { - this.write = write; + public ShareSasPermission setWritePermission(boolean hasWritePermission) { + this.writePermission = hasWritePermission; return this; } /** * @return the delete permission status */ - public boolean getDelete() { - return delete; + public boolean getDeletePermission() { + return deletePermission; } /** * Sets the delete permission status. * - * @param delete Permission status to set - * @return the updated ShareSASPermission object + * @param hasDeletePermission Permission status to set + * @return the updated ShareSasPermission object */ - public ShareSASPermission setDelete(boolean delete) { - this.delete = delete; + public ShareSasPermission setDeletePermission(boolean hasDeletePermission) { + this.deletePermission = hasDeletePermission; return this; } /** * @return the list permission status */ - public boolean getList() { - return list; + public boolean getListPermission() { + return listPermission; } /** * Sets the list permission status. * - * @param list Permission status to set - * @return the updated ShareSASPermission object + * @param hasListPermission Permission status to set + * @return the updated ShareSasPermission object */ - public ShareSASPermission setList(boolean list) { - this.list = list; + public ShareSasPermission setListPermission(boolean hasListPermission) { + this.listPermission = hasListPermission; return this; } @@ -164,7 +164,7 @@ public ShareSASPermission setList(boolean list) { * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. * - * @return A {@code String} which represents the {@code ShareSASPermission}. + * @return A {@code String} which represents the {@code ShareSasPermission}. */ @Override public String toString() { @@ -172,23 +172,23 @@ public String toString() { // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas final StringBuilder builder = new StringBuilder(); - if (this.read) { + if (this.readPermission) { builder.append('r'); } - if (this.create) { + if (this.createPermission) { builder.append('c'); } - if (this.write) { + if (this.writePermission) { builder.append('w'); } - if (this.delete) { + if (this.deletePermission) { builder.append('d'); } - if (this.list) { + if (this.listPermission) { builder.append('l'); } diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java index b885ac3a31e2..9ad4b6ee6417 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java @@ -4,9 +4,9 @@ package com.azure.storage.file.implementation; +import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; -import com.azure.core.annotation.ServiceClientBuilder; /** * A builder for creating a new instance of the AzureFileStorage type. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java index 832f41beeccb..d169790e4fad 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.file.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -18,15 +17,16 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; -import com.azure.storage.file.models.DirectorysCreateResponse; -import com.azure.storage.file.models.DirectorysDeleteResponse; -import com.azure.storage.file.models.DirectorysForceCloseHandlesResponse; -import com.azure.storage.file.models.DirectorysGetPropertiesResponse; -import com.azure.storage.file.models.DirectorysListFilesAndDirectoriesSegmentResponse; -import com.azure.storage.file.models.DirectorysListHandlesResponse; -import com.azure.storage.file.models.DirectorysSetMetadataResponse; -import com.azure.storage.file.models.DirectorysSetPropertiesResponse; +import com.azure.storage.file.implementation.models.DirectorysCreateResponse; +import com.azure.storage.file.implementation.models.DirectorysDeleteResponse; +import com.azure.storage.file.implementation.models.DirectorysForceCloseHandlesResponse; +import com.azure.storage.file.implementation.models.DirectorysGetPropertiesResponse; +import com.azure.storage.file.implementation.models.DirectorysListFilesAndDirectoriesSegmentResponse; +import com.azure.storage.file.implementation.models.DirectorysListHandlesResponse; +import com.azure.storage.file.implementation.models.DirectorysSetMetadataResponse; +import com.azure.storage.file.implementation.models.DirectorysSetPropertiesResponse; import com.azure.storage.file.models.StorageErrorException; import java.util.Map; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java index 17004bd38250..b689fb105e22 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.file.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -20,24 +19,25 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; -import com.azure.storage.file.models.FileHTTPHeaders; -import com.azure.storage.file.models.FileRangeWriteType; -import com.azure.storage.file.models.FilesAbortCopyResponse; -import com.azure.storage.file.models.FilesCreateResponse; -import com.azure.storage.file.models.FilesDeleteResponse; -import com.azure.storage.file.models.FilesDownloadResponse; -import com.azure.storage.file.models.FilesForceCloseHandlesResponse; -import com.azure.storage.file.models.FilesGetPropertiesResponse; -import com.azure.storage.file.models.FilesGetRangeListResponse; -import com.azure.storage.file.models.FilesListHandlesResponse; -import com.azure.storage.file.models.FilesSetHTTPHeadersResponse; -import com.azure.storage.file.models.FilesSetMetadataResponse; -import com.azure.storage.file.models.FilesStartCopyResponse; -import com.azure.storage.file.models.FilesUploadRangeFromURLResponse; -import com.azure.storage.file.models.FilesUploadRangeResponse; +import com.azure.storage.file.implementation.models.FileRangeWriteType; +import com.azure.storage.file.implementation.models.FilesAbortCopyResponse; +import com.azure.storage.file.implementation.models.FilesCreateResponse; +import com.azure.storage.file.implementation.models.FilesDeleteResponse; +import com.azure.storage.file.implementation.models.FilesDownloadResponse; +import com.azure.storage.file.implementation.models.FilesForceCloseHandlesResponse; +import com.azure.storage.file.implementation.models.FilesGetPropertiesResponse; +import com.azure.storage.file.implementation.models.FilesGetRangeListResponse; +import com.azure.storage.file.implementation.models.FilesListHandlesResponse; +import com.azure.storage.file.implementation.models.FilesSetHTTPHeadersResponse; +import com.azure.storage.file.implementation.models.FilesSetMetadataResponse; +import com.azure.storage.file.implementation.models.FilesStartCopyResponse; +import com.azure.storage.file.implementation.models.FilesUploadRangeFromURLResponse; +import com.azure.storage.file.implementation.models.FilesUploadRangeResponse; import com.azure.storage.file.models.SourceModifiedAccessConditions; +import com.azure.storage.file.models.FileHTTPHeaders; import com.azure.storage.file.models.StorageErrorException; import java.nio.ByteBuffer; import java.util.Map; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ListSharesIncludeTypeWrapper.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ListSharesIncludeTypeWrapper.java index 280a657b3819..0e7051224d95 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ListSharesIncludeTypeWrapper.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ListSharesIncludeTypeWrapper.java @@ -4,7 +4,7 @@ package com.azure.storage.file.implementation; -import com.azure.storage.file.models.ListSharesIncludeType; +import com.azure.storage.file.implementation.models.ListSharesIncludeType; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java index 38fa63ada3ee..a575536fa855 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.file.implementation; -import com.azure.core.implementation.CollectionFormat; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -18,13 +16,15 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.CollectionFormat; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.util.Context; +import com.azure.storage.file.implementation.models.ListSharesIncludeType; +import com.azure.storage.file.implementation.models.ServicesGetPropertiesResponse; +import com.azure.storage.file.implementation.models.ServicesListSharesSegmentResponse; +import com.azure.storage.file.implementation.models.ServicesSetPropertiesResponse; import com.azure.storage.file.models.FileServiceProperties; -import com.azure.storage.file.models.ListSharesIncludeType; -import com.azure.storage.file.models.ServicesGetPropertiesResponse; -import com.azure.storage.file.models.ServicesListSharesSegmentResponse; -import com.azure.storage.file.models.ServicesSetPropertiesResponse; import com.azure.storage.file.models.StorageErrorException; import java.util.List; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java index f24d8a5dff12..8b135ae1cebc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.file.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -19,20 +18,21 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; -import com.azure.storage.file.models.DeleteSnapshotsOptionType; -import com.azure.storage.file.models.SharePermission; -import com.azure.storage.file.models.SharesCreatePermissionResponse; -import com.azure.storage.file.models.SharesCreateResponse; -import com.azure.storage.file.models.SharesCreateSnapshotResponse; -import com.azure.storage.file.models.SharesDeleteResponse; -import com.azure.storage.file.models.SharesGetAccessPolicyResponse; -import com.azure.storage.file.models.SharesGetPermissionResponse; -import com.azure.storage.file.models.SharesGetPropertiesResponse; -import com.azure.storage.file.models.SharesGetStatisticsResponse; -import com.azure.storage.file.models.SharesSetAccessPolicyResponse; -import com.azure.storage.file.models.SharesSetMetadataResponse; -import com.azure.storage.file.models.SharesSetQuotaResponse; +import com.azure.storage.file.implementation.models.DeleteSnapshotsOptionType; +import com.azure.storage.file.implementation.models.SharePermission; +import com.azure.storage.file.implementation.models.SharesCreatePermissionResponse; +import com.azure.storage.file.implementation.models.SharesCreateResponse; +import com.azure.storage.file.implementation.models.SharesCreateSnapshotResponse; +import com.azure.storage.file.implementation.models.SharesDeleteResponse; +import com.azure.storage.file.implementation.models.SharesGetAccessPolicyResponse; +import com.azure.storage.file.implementation.models.SharesGetPermissionResponse; +import com.azure.storage.file.implementation.models.SharesGetPropertiesResponse; +import com.azure.storage.file.implementation.models.SharesGetStatisticsResponse; +import com.azure.storage.file.implementation.models.SharesSetAccessPolicyResponse; +import com.azure.storage.file.implementation.models.SharesSetMetadataResponse; +import com.azure.storage.file.implementation.models.SharesSetQuotaResponse; import com.azure.storage.file.models.SignedIdentifier; import com.azure.storage.file.models.StorageErrorException; import java.util.List; @@ -299,13 +299,13 @@ public Mono createPermissionWithRestResponseAsyn * Returns the permission (security descriptor) for a given key. * * @param shareName The name of the target share. + * @param filePermissionKey Key of the permission to be set for the directory/file. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPermissionWithRestResponseAsync(String shareName, Context context) { - final String filePermissionKey = null; + public Mono getPermissionWithRestResponseAsync(String shareName, String filePermissionKey, Context context) { final Integer timeout = null; final String restype = "share"; final String comp = "filepermission"; @@ -316,7 +316,7 @@ public Mono getPermissionWithRestResponseAsync(Stri * Returns the permission (security descriptor) for a given key. * * @param shareName The name of the target share. - * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionKey Key of the permission to be set for the directory/file. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/CustomFileAndDirectoryListingDeserializer.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/CustomFileAndDirectoryListingDeserializer.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/CustomFileAndDirectoryListingDeserializer.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/CustomFileAndDirectoryListingDeserializer.java index 5756c8b4ea7f..b09491f1f895 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/CustomFileAndDirectoryListingDeserializer.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/CustomFileAndDirectoryListingDeserializer.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DeleteSnapshotsOptionType.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DeleteSnapshotsOptionType.java index 002eb887ac44..e70238fac144 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DeleteSnapshotsOptionType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryCreateHeaders.java index c3131040047c..150ddd5f92ec 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryDeleteHeaders.java index eb5ba6003a23..d0c4fb758897 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryForceCloseHandlesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryForceCloseHandlesHeaders.java index 8ea881ffdb27..ecfc1b4c2aa8 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryForceCloseHandlesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryGetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryGetPropertiesHeaders.java index f50df72bd029..35d9abe1f2cf 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryGetPropertiesHeaders.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryItem.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryItem.java similarity index 94% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryItem.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryItem.java index ed26daeb93c5..5d4dfbf97cd1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryItem.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java index 3f3bf9e4c21a..1d9a9389c152 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListHandlesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListHandlesHeaders.java index 7ecd7fbdb079..7968e27a3893 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectoryListHandlesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetMetadataHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetMetadataHeaders.java index 699d9b381b45..e7945825d17b 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetPropertiesHeaders.java index 453621ac53cd..6b79a84459b7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorySetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorySetPropertiesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysCreateResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysCreateResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysCreateResponse.java index a65683e6cfc8..b8260241765c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysCreateResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysDeleteResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysDeleteResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysDeleteResponse.java index 239dcaba95e5..337e756e131f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysDeleteResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysForceCloseHandlesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysForceCloseHandlesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysForceCloseHandlesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysForceCloseHandlesResponse.java index c3aaa1f5ce71..0230f153d46c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysForceCloseHandlesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysForceCloseHandlesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysGetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysGetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysGetPropertiesResponse.java index 1e2295bf6f6f..50aae0a4244c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListFilesAndDirectoriesSegmentResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListFilesAndDirectoriesSegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListFilesAndDirectoriesSegmentResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListFilesAndDirectoriesSegmentResponse.java index 43373a1d23b7..250eada2e6be 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListFilesAndDirectoriesSegmentResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListFilesAndDirectoriesSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListHandlesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListHandlesResponse.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListHandlesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListHandlesResponse.java index cc35d0b148b9..9901c30cdabe 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysListHandlesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysListHandlesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetMetadataResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetMetadataResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetMetadataResponse.java index e3eee5271a13..3ce551a84ac8 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetMetadataResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetPropertiesResponse.java index 4cf0f7337a33..e110dd407184 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/DirectorysSetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/DirectorysSetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileAbortCopyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileAbortCopyHeaders.java index 7a3cc4895d30..96f9fcbf94cc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileAbortCopyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileCreateHeaders.java index e0e2cb05a79d..c1c66b6e43b1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDeleteHeaders.java index 5506cf05e319..2dea94fcf058 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java index e71703fa1527..f45679be1930 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileDownloadHeaders.java @@ -2,12 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.file.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileForceCloseHandlesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileForceCloseHandlesHeaders.java index a6e377d4408a..06487b737fcd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileForceCloseHandlesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetPropertiesHeaders.java index 4045610de3f2..ea1a4e4062ab 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetPropertiesHeaders.java @@ -2,12 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; +import com.azure.storage.file.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetRangeListHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetRangeListHeaders.java index 4363c4ceb7c2..16e2c431a7d0 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileGetRangeListHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileItem.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileItem.java similarity index 93% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileItem.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileItem.java index 6b1748df636a..d0e9afd4eaac 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileItem.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileItem.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.file.models.FileProperty; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileListHandlesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileListHandlesHeaders.java index bbaa24af6898..7aeba09a1742 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileListHandlesHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRangeWriteType.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileRangeWriteType.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRangeWriteType.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileRangeWriteType.java index 6bce222b4eea..67d792787ef1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRangeWriteType.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileRangeWriteType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetHTTPHeadersHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetHTTPHeadersHeaders.java index 151745572c9a..0f1096ae5b03 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetHTTPHeadersHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetMetadataHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetMetadataHeaders.java index ff2655493382..a0340e65f72f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileSetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileStartCopyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileStartCopyHeaders.java index 16859af07ecc..b7308a3d5966 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileStartCopyHeaders.java @@ -2,10 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.storage.file.models.CopyStatusType; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeFromURLHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeFromURLHeaders.java index e67f57afb1cb..0e6fefaeed12 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeFromURLHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeHeaders.java index 296828456774..09820e881cfc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FileUploadRangeHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAbortCopyResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAbortCopyResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAbortCopyResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAbortCopyResponse.java index c34ccb2996d0..ad45883b68ec 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAbortCopyResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAbortCopyResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAndDirectoriesListSegment.java similarity index 97% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAndDirectoriesListSegment.java index 076c191f1893..fdea1da79f7f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesAndDirectoriesListSegment.java @@ -2,12 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; + import java.util.ArrayList; import java.util.List; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesCreateResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesCreateResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesCreateResponse.java index 01e483722bd1..03d82c104509 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesCreateResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDeleteResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDeleteResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDeleteResponse.java index cfeb40f49cac..c49bb1368bde 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDeleteResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDownloadResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDownloadResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java index 01da25c98be1..4511f387a448 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesDownloadResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesDownloadResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesForceCloseHandlesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesForceCloseHandlesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesForceCloseHandlesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesForceCloseHandlesResponse.java index 2d4b04103b29..f2c7895d3837 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesForceCloseHandlesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesForceCloseHandlesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetPropertiesResponse.java index 82f13783a111..ae5d65a7caf0 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetRangeListResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetRangeListResponse.java similarity index 92% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetRangeListResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetRangeListResponse.java index d32f99f6acce..f0b6333f1406 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesGetRangeListResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesGetRangeListResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.file.models.Range; import java.util.List; /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesListHandlesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesListHandlesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesListHandlesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesListHandlesResponse.java index 553434b8c05f..b0e7b1d2018c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesListHandlesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesListHandlesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetHTTPHeadersResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetHTTPHeadersResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetHTTPHeadersResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetHTTPHeadersResponse.java index c21fdbfe0199..252d6d47ab67 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetHTTPHeadersResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetHTTPHeadersResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetMetadataResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetMetadataResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetMetadataResponse.java index c46035850b21..d010717391f4 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesSetMetadataResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesStartCopyResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesStartCopyResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesStartCopyResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesStartCopyResponse.java index c19c3285eb5b..6c313791a10b 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesStartCopyResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesStartCopyResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeFromURLResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeFromURLResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeFromURLResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeFromURLResponse.java index 2743a5a6d954..bec7156fb2dd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeFromURLResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeFromURLResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeResponse.java index 1ed359c9e70b..37764ad7111a 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FilesUploadRangeResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/FilesUploadRangeResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListFilesAndDirectoriesSegmentResponse.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListFilesAndDirectoriesSegmentResponse.java index bb23957bd20b..969546d7a7c3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListFilesAndDirectoriesSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListHandlesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListHandlesResponse.java index 2024a239a468..d3414c289d2a 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListHandlesResponse.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.file.models.HandleItem; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesIncludeType.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesIncludeType.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesIncludeType.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesIncludeType.java index 381c8539df3c..59937f24a044 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesIncludeType.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesIncludeType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesResponse.java similarity index 97% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesResponse.java index fad3e8acee44..49eea628dbf3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ListSharesResponse.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.file.models.ShareItem; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceGetPropertiesHeaders.java index 6b9772f51a26..ec8e32380170 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceListSharesSegmentHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceListSharesSegmentHeaders.java index 92c61ae4f5c1..33493225c29c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceListSharesSegmentHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceSetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceSetPropertiesHeaders.java index ced2c86d4868..d10c57fc2cd4 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServiceSetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesGetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesGetPropertiesResponse.java similarity index 92% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesGetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesGetPropertiesResponse.java index ac80a7d0c7ae..57083ac0a8e7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesGetPropertiesResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.file.models.FileServiceProperties; /** * Contains all response data for the getProperties operation. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesListSharesSegmentResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesListSharesSegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesListSharesSegmentResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesListSharesSegmentResponse.java index fed187d4085e..80ca5ceec319 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ServicesListSharesSegmentResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesListSharesSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesSetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesSetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesSetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesSetPropertiesResponse.java index 7086534101a9..56caaeb7814a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesSetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ServicesSetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateHeaders.java index f9226bf02762..f0320dd49f39 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreatePermissionHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreatePermissionHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreatePermissionHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreatePermissionHeaders.java index 5a4436d97bd4..55b7093bc6ff 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreatePermissionHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreatePermissionHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateSnapshotHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateSnapshotHeaders.java index 5ad8a297cd93..9f72a2460d86 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareCreateSnapshotHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareDeleteHeaders.java index 5a05ec7c9436..643296d4b4c5 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetAccessPolicyHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetAccessPolicyHeaders.java index c00fce1e3224..6f1b837b26bc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetAccessPolicyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPermissionHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPermissionHeaders.java similarity index 98% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPermissionHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPermissionHeaders.java index f8a5821270f4..baff389327cc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPermissionHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPermissionHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPropertiesHeaders.java index e4123112d711..c6161e8a183c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetPropertiesHeaders.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetStatisticsHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetStatisticsHeaders.java index 05a7ea4b01be..07c322ddc79d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareGetStatisticsHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharePermission.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharePermission.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharePermission.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharePermission.java index a02c2b8aeeda..5c01176a44bd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharePermission.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharePermission.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetAccessPolicyHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetAccessPolicyHeaders.java index c65400a4bba6..faa39a7985bc 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetAccessPolicyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetMetadataHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetMetadataHeaders.java index 1aa8d8b16ed9..4fc71560816f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetQuotaHeaders.java similarity index 99% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetQuotaHeaders.java index 7132a9dcda40..f9e763233ec5 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareSetQuotaHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareStats.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareStats.java similarity index 96% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareStats.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareStats.java index a8ccdc84b610..145ab48b978f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareStats.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/ShareStats.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreatePermissionResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreatePermissionResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreatePermissionResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreatePermissionResponse.java index a8b5d330d873..92c5bf7b411f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreatePermissionResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreatePermissionResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateResponse.java index 240af8232a16..5803ad0c1fdd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateSnapshotResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateSnapshotResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateSnapshotResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateSnapshotResponse.java index b9f9d375c280..1e386d6bacc3 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesCreateSnapshotResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesCreateSnapshotResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesDeleteResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesDeleteResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesDeleteResponse.java index 9477ce4c7e8b..e2edff252700 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesDeleteResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetAccessPolicyResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetAccessPolicyResponse.java similarity index 92% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetAccessPolicyResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetAccessPolicyResponse.java index 97b81b09b905..850f90b31d0c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetAccessPolicyResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.file.models.SignedIdentifier; import java.util.List; /** diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPermissionResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPermissionResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPermissionResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPermissionResponse.java index 2580cbbd8d16..9ec6427a8ae1 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPermissionResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPermissionResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPropertiesResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPropertiesResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPropertiesResponse.java index 9716a989187a..5c5b97f5aabd 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetStatisticsResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetStatisticsResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetStatisticsResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetStatisticsResponse.java index ad7f39f15c78..b7431e7c219f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesGetStatisticsResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesGetStatisticsResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetAccessPolicyResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetAccessPolicyResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetAccessPolicyResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetAccessPolicyResponse.java index e510ad67fc75..7bc23b9095ca 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetAccessPolicyResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetMetadataResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetMetadataResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetMetadataResponse.java index ee0c5437446a..3be365181c0d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetMetadataResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetQuotaResponse.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetQuotaResponse.java similarity index 95% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetQuotaResponse.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetQuotaResponse.java index af406592123d..c0e9d5c446a7 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/SharesSetQuotaResponse.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/SharesSetQuotaResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.file.models; +package com.azure.storage.file.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/package-info.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/package-info.java new file mode 100644 index 000000000000..1f29a6cece2f --- /dev/null +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/implementation/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for AzureFileStorage. + */ +package com.azure.storage.file.implementation.models; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRef.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileReference.java similarity index 90% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRef.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileReference.java index d9b21e3fc210..3ed75e9d5008 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileRef.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileReference.java @@ -9,7 +9,7 @@ * Contains file or directory reference information in the storage File service. */ @Immutable -public final class FileRef { +public final class FileReference { private final String name; private final boolean isDirectory; private final FileProperty fileProperty; @@ -21,7 +21,7 @@ public final class FileRef { * @param isDirectory A boolean set to true if the reference is a directory, false if the reference is a file. * @param fileProperty Property of a file. Pass {@code null} if the reference is a directory. */ - public FileRef(final String name, final boolean isDirectory, final FileProperty fileProperty) { + public FileReference(final String name, final boolean isDirectory, final FileProperty fileProperty) { this.name = name; this.isDirectory = isDirectory; this.fileProperty = fileProperty; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLInfo.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java similarity index 90% rename from sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLInfo.java rename to sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java index 4b1f3dc127e5..e3009c9b32fb 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromURLInfo.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/FileUploadRangeFromUrlInfo.java @@ -5,12 +5,12 @@ import java.time.OffsetDateTime; -public final class FileUploadRangeFromURLInfo { +public final class FileUploadRangeFromUrlInfo { private final String eTag; private final OffsetDateTime lastModified; private final Boolean isServerEncrypted; - public FileUploadRangeFromURLInfo(final String eTag, final OffsetDateTime lastModified, final Boolean isServerEncrypted) { + public FileUploadRangeFromUrlInfo(final String eTag, final OffsetDateTime lastModified, final Boolean isServerEncrypted) { this.eTag = eTag; this.lastModified = lastModified; this.isServerEncrypted = isServerEncrypted; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/HandleItem.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/HandleItem.java index 6fd04937a517..24c598051c6c 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/HandleItem.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/HandleItem.java @@ -4,8 +4,8 @@ package com.azure.storage.file.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java index 06ac13900c9d..cd2c5ec73560 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/ShareProperties.java @@ -4,8 +4,8 @@ package com.azure.storage.file.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/StorageErrorCode.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/StorageErrorCode.java index 682ff493c191..3b9eb5d5ff20 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/StorageErrorCode.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/StorageErrorCode.java @@ -312,6 +312,36 @@ public final class StorageErrorCode extends ExpandableStringEnum items; - - @JsonCreator - private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List items) { - this.items = items; - } - } - - /* - * The set of CORS rules. - */ - @JsonProperty(value = "Cors") - private CorsWrapper cors; - - /** - * Get the hourMetrics property: A summary of request statistics grouped by - * API in hourly aggregates for files. - * - * @return the hourMetrics value. - */ - public Metrics hourMetrics() { - return this.hourMetrics; - } - - /** - * Set the hourMetrics property: A summary of request statistics grouped by - * API in hourly aggregates for files. - * - * @param hourMetrics the hourMetrics value to set. - * @return the StorageServiceProperties object itself. - */ - public StorageServiceProperties hourMetrics(Metrics hourMetrics) { - this.hourMetrics = hourMetrics; - return this; - } - - /** - * Get the minuteMetrics property: A summary of request statistics grouped - * by API in minute aggregates for files. - * - * @return the minuteMetrics value. - */ - public Metrics minuteMetrics() { - return this.minuteMetrics; - } - - /** - * Set the minuteMetrics property: A summary of request statistics grouped - * by API in minute aggregates for files. - * - * @param minuteMetrics the minuteMetrics value to set. - * @return the StorageServiceProperties object itself. - */ - public StorageServiceProperties minuteMetrics(Metrics minuteMetrics) { - this.minuteMetrics = minuteMetrics; - return this; - } - - /** - * Get the cors property: The set of CORS rules. - * - * @return the cors value. - */ - public List cors() { - if (this.cors == null) { - this.cors = new CorsWrapper(new ArrayList()); - } - return this.cors.items; - } - - /** - * Set the cors property: The set of CORS rules. - * - * @param cors the cors value to set. - * @return the StorageServiceProperties object itself. - */ - public StorageServiceProperties cors(List cors) { - this.cors = new CorsWrapper(cors); - return this; - } -} diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/package-info.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/package-info.java index 43000927e578..1dc01a09f05f 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/package-info.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/models/package-info.java @@ -3,6 +3,6 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureFileStorage. + * Package containing classes for AzureFileStorage. */ package com.azure.storage.file.models; diff --git a/sdk/storage/azure-storage-file/src/main/java/module-info.java b/sdk/storage/azure-storage-file/src/main/java/module-info.java index 080993e70cd6..83985d8b65d4 100644 --- a/sdk/storage/azure-storage-file/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-file/src/main/java/module-info.java @@ -3,7 +3,7 @@ module com.azure.storage.file { requires transitive com.azure.core; - requires com.azure.storage.common; + requires transitive com.azure.storage.common; requires com.fasterxml.jackson.dataformat.xml; exports com.azure.storage.file; @@ -15,6 +15,7 @@ opens com.azure.storage.file.implementation to com.fasterxml.jackson.databind, com.azure.core; - - uses com.azure.core.http.HttpClientProvider; + opens com.azure.storage.file.implementation.models to + com.fasterxml.jackson.databind, + com.azure.core; } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java index 6c84440a4735..4d757d91d651 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileAsyncJavaDocCodeSamples.java @@ -3,7 +3,7 @@ package com.azure.storage.file; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -299,33 +299,33 @@ public void uploadFileAsync() { } /** - * Generates a code sample for using {@link FileAsyncClient#uploadRangeFromURL(long, long, long, URI)} + * Generates a code sample for using {@link FileAsyncClient#uploadRangeFromUrl(long, long, long, URI)} * @throws URISyntaxException when the URI is invalid */ public void uploadFileFromURLAsync() throws URISyntaxException { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.uploadRangeFromURL#long-long-long-uri - fileAsyncClient.uploadRangeFromURL(6, 8, 0, new URI("filewithSAStoken")).subscribe( + // BEGIN: com.azure.storage.file.fileAsyncClient.uploadRangeFromUrl#long-long-long-uri + fileAsyncClient.uploadRangeFromUrl(6, 8, 0, new URI("filewithSAStoken")).subscribe( response -> { }, error -> System.err.print(error.toString()), () -> System.out.println("Completed upload range from url!") ); - // END: com.azure.storage.file.fileAsyncClient.uploadRangeFromURL#long-long-long-uri + // END: com.azure.storage.file.fileAsyncClient.uploadRangeFromUrl#long-long-long-uri } /** - * Generates a code sample for using {@link FileAsyncClient#uploadRangeFromURLWithResponse(long, long, long, URI)} + * Generates a code sample for using {@link FileAsyncClient#uploadRangeFromUrlWithResponse(long, long, long, URI)} * @throws URISyntaxException when the URI is invalid */ public void uploadFileFromURLWithResponseAsync() throws URISyntaxException { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.uploadRangeFromURLWithResponse#long-long-long-uri - fileAsyncClient.uploadRangeFromURLWithResponse(6, 8, 0, new URI("filewithSAStoken")).subscribe( + // BEGIN: com.azure.storage.file.fileAsyncClient.uploadRangeFromUrlWithResponse#long-long-long-uri + fileAsyncClient.uploadRangeFromUrlWithResponse(6, 8, 0, new URI("filewithSAStoken")).subscribe( response -> { }, error -> System.err.print(error.toString()), () -> System.out.println("Completed upload range from url!") ); - // END: com.azure.storage.file.fileAsyncClient.uploadRangeFromURLWithResponse#long-long-long-uri + // END: com.azure.storage.file.fileAsyncClient.uploadRangeFromUrlWithResponse#long-long-long-uri } /** @@ -390,21 +390,23 @@ public void downloadFileAsync() { } /** - * Generates a code sample for using {@link FileAsyncClient#downloadToFile(String, FileRange)} + * Generates a code sample for using {@link FileAsyncClient#downloadToFileWithResponse(String, FileRange)} */ public void downloadFileAsyncMaxOverload() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.downloadToFile#string-filerange - fileAsyncClient.downloadToFile("somelocalfilepath", new FileRange(1024, 2047L)).subscribe( - response -> { - if (Files.exists(Paths.get("somelocalfilepath"))) { - System.out.println("Successfully downloaded the file."); - } - }, - error -> System.err.print(error.toString()), - () -> System.out.println("Complete downloading the file!") - ); - // END: com.azure.storage.file.fileAsyncClient.downloadToFile#string-filerange + // BEGIN: com.azure.storage.file.fileAsyncClient.downloadToFileWithResponse#string-filerange + fileAsyncClient.downloadToFileWithResponse("somelocalfilepath", new FileRange(1024, 2047L)) + .subscribe( + response -> { + if (Files.exists(Paths.get("somelocalfilepath"))) { + System.out.println("Successfully downloaded the file with status code " + + response.getStatusCode()); + } + }, + error -> System.err.print(error.toString()), + () -> System.out.println("Complete downloading the file!") + ); + // END: com.azure.storage.file.fileAsyncClient.downloadToFileWithResponse#string-filerange } /** @@ -642,21 +644,21 @@ public void forceCloseHandlesAsync() { } /** - * Generates a code sample for using {@link FileAsyncClient#generateSAS(String, FileSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Generates a code sample for using {@link FileAsyncClient#generateSAS(String, FileSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSASAsync() { FileAsyncClient fileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // BEGIN: com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String String identifier = "identifier"; - FileSASPermission permissions = new FileSASPermission() + FileSasPermission permissions = new FileSasPermission() .setReadPermission(true) .setCreatePermission(true) .setDeletePermission(true) .setWritePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -668,7 +670,7 @@ public void generateSASAsync() { String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; String sas = fileAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.file.fileAsyncClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java index aaace6cfd502..9250d5d01a9d 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileJavaDocCodeSamples.java @@ -3,11 +3,11 @@ package com.azure.storage.file; import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; -import com.azure.core.util.Context; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.models.FileCopyInfo; @@ -18,7 +18,7 @@ import com.azure.storage.file.models.FileProperties; import com.azure.storage.file.models.FileRange; import com.azure.storage.file.models.FileUploadInfo; -import com.azure.storage.file.models.FileUploadRangeFromURLInfo; +import com.azure.storage.file.models.FileUploadRangeFromUrlInfo; import com.azure.storage.file.models.NtfsFileAttributes; import java.net.URI; @@ -327,41 +327,43 @@ public void downloadFile() { } /** - * Generates a code sample for using {@link FileClient#downloadToFile(String, FileRange)} + * Generates a code sample for using {@link FileClient#downloadToFileWithResponse(String, FileRange, Duration, Context)} */ public void downloadFileMaxOverload() { FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileClient.downloadToFile#string-filerange - fileClient.downloadToFile("somelocalfilepath", new FileRange(1024, 2047L)); + // BEGIN: com.azure.storage.file.fileClient.downloadToFileWithResponse#string-filerange-duration-context + Response response = + fileClient.downloadToFileWithResponse("somelocalfilepath", new FileRange(1024, 2047L), + Duration.ofSeconds(1), Context.NONE); if (Files.exists(Paths.get("somelocalfilepath"))) { - System.out.println("Complete downloading the file."); + System.out.println("Complete downloading the file with status code " + response.getStatusCode()); } - // END: com.azure.storage.file.fileClient.downloadToFile#string-filerange + // END: com.azure.storage.file.fileClient.downloadToFileWithResponse#string-filerange-duration-context } /** - * Generates a code sample for using {@link FileClient#uploadRangeFromURL(long, long, long, URI)} + * Generates a code sample for using {@link FileClient#uploadRangeFromUrl(long, long, long, URI)} * @throws URISyntaxException when the URI is invalid */ public void uploadFileFromURLAsync() throws URISyntaxException { FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileClient.uploadRangeFromURL#long-long-long-uri - FileUploadRangeFromURLInfo response = fileClient.uploadRangeFromURL(6, 8, 0, new URI("filewithSAStoken")); + // BEGIN: com.azure.storage.file.fileClient.uploadRangeFromUrl#long-long-long-uri + FileUploadRangeFromUrlInfo response = fileClient.uploadRangeFromUrl(6, 8, 0, new URI("filewithSAStoken")); System.out.println("Completed upload range from url!"); - // END: com.azure.storage.file.fileClient.uploadRangeFromURL#long-long-long-uri + // END: com.azure.storage.file.fileClient.uploadRangeFromUrl#long-long-long-uri } /** - * Generates a code sample for using {@link FileClient#uploadRangeFromURLWithResponse(long, long, long, URI, Duration, Context)} + * Generates a code sample for using {@link FileClient#uploadRangeFromUrlWithResponse(long, long, long, URI, Duration, Context)} * @throws URISyntaxException when the URI is invalid */ public void uploadFileFromURLWithResponseAsync() throws URISyntaxException { FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.fileClient.uploadRangeFromURLWithResponse#long-long-long-uri-duration-context - Response response = fileClient.uploadRangeFromURLWithResponse(6, + // BEGIN: com.azure.storage.file.fileClient.uploadRangeFromUrlWithResponse#long-long-long-uri-duration-context + Response response = fileClient.uploadRangeFromUrlWithResponse(6, 8, 0, new URI("filewithSAStoken"), Duration.ofSeconds(1), Context.NONE); System.out.println("Completed upload range from url!"); - // END: com.azure.storage.file.fileClient.uploadRangeFromURLWithResponse#long-long-long-uri-duration-context + // END: com.azure.storage.file.fileClient.uploadRangeFromUrlWithResponse#long-long-long-uri-duration-context } /** @@ -596,21 +598,21 @@ public void forceCloseHandles() { } /** - * Generates a code sample for using {@link FileClient#generateSAS(String, FileSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Generates a code sample for using {@link FileClient#generateSAS(String, FileSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSAS() { FileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.FileClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // BEGIN: com.azure.storage.file.FileClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String String identifier = "identifier"; - FileSASPermission permissions = new FileSASPermission() + FileSasPermission permissions = new FileSasPermission() .setReadPermission(true) .setCreatePermission(true) .setDeletePermission(true) .setWritePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -622,7 +624,7 @@ public void generateSAS() { String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; String sas = fileClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.file.FileClient.generateSAS#String-FileSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.file.FileClient.generateSAS#String-FileSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java index 9ca4d36c7d2f..81c2330dce08 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileSample.java @@ -10,7 +10,6 @@ import java.io.File; import java.io.IOException; -import java.net.URL; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -66,9 +65,9 @@ public static void main(String[] args) { destFileClient.create(1024); // Copy the file from source file to destination file. - URL clientURL = srcFileClient.getFileUrl(); + String clientURL = srcFileClient.getFileUrl(); - String sourceURL = clientURL.toString() + "/" + shareName + "/" + parentDirName + "/" + srcFileName; + String sourceURL = clientURL + "/" + shareName + "/" + parentDirName + "/" + srcFileName; FileCopyInfo copyResponse = null; try { diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java index cd8d44136efc..3765b79feffb 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceAsyncJavaDocCodeSamples.java @@ -6,13 +6,14 @@ import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; + import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.ZoneOffset; @@ -270,11 +271,11 @@ public void clearPropertiesAsync() { /** * Generates a code sample for using {@link FileServiceAsyncClient#generateAccountSAS(AccountSASService, - * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IPRange, SASProtocol)} + * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IpRange, SASProtocol)} */ public void generateAccountSASAsync() { FileServiceAsyncClient fileServiceAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // BEGIN: com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol AccountSASService service = new AccountSASService() .setBlob(true) .setFile(true) @@ -295,7 +296,7 @@ public void generateAccountSASAsync() { .setUpdatePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -303,6 +304,6 @@ public void generateAccountSASAsync() { String sas = fileServiceAsyncClient.generateAccountSAS(service, resourceType, permission, expiryTime, startTime, version, ipRange, sasProtocol); - // END: com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // END: com.azure.storage.file.FileServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol } } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java index 1a77e2433904..33d78accdad9 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java @@ -3,18 +3,19 @@ package com.azure.storage.file; import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.storage.common.AccountSASPermission; import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; -import com.azure.core.util.Context; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.models.FileServiceProperties; import com.azure.storage.file.models.ListSharesOptions; + import java.time.Duration; import java.time.LocalDateTime; import java.time.OffsetDateTime; @@ -261,11 +262,11 @@ public void clearProperties() { /** * Generates a code sample for using {@link FileServiceClient#generateAccountSAS(AccountSASService, - * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IPRange, SASProtocol)} + * AccountSASResourceType, AccountSASPermission, OffsetDateTime, OffsetDateTime, String, IpRange, SASProtocol)} */ public void generateAccountSAS() { FileServiceClient fileServiceClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // BEGIN: com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol AccountSASService service = new AccountSASService() .setBlob(true) .setFile(true) @@ -286,7 +287,7 @@ public void generateAccountSAS() { .setUpdatePermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -294,7 +295,7 @@ public void generateAccountSAS() { String sas = fileServiceClient.generateAccountSAS(service, resourceType, permission, expiryTime, startTime, version, ipRange, sasProtocol); - // END: com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol + // END: com.azure.storage.file.FileServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol } diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java index 208359a44917..0b9334b4c576 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java @@ -3,7 +3,7 @@ package com.azure.storage.file; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -523,22 +523,22 @@ public void getSnapshotIdAsync() { } /** - * Generates a code sample for using {@link ShareAsyncClient#generateSAS(String, ShareSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Generates a code sample for using {@link ShareAsyncClient#generateSAS(String, ShareSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSASAsync() { ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // BEGIN: com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String String identifier = "identifier"; - ShareSASPermission permissions = new ShareSASPermission() - .setRead(true) - .setCreate(true) - .setDelete(true) - .setWrite(true) - .setList(true); + ShareSasPermission permissions = new ShareSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setWritePermission(true) + .setListPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -550,7 +550,7 @@ public void generateSASAsync() { String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; String sas = shareAsyncClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.file.shareAsyncClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java index d0725b5c9b2c..bc4632f03058 100644 --- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java @@ -3,11 +3,11 @@ package com.azure.storage.file; import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; -import com.azure.core.util.Context; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.file.models.AccessPolicy; @@ -18,6 +18,7 @@ import com.azure.storage.file.models.ShareSnapshotInfo; import com.azure.storage.file.models.ShareStatistics; import com.azure.storage.file.models.SignedIdentifier; + import java.time.Duration; import java.time.LocalDateTime; import java.time.OffsetDateTime; @@ -512,22 +513,22 @@ public void getSnapshotId() { } /** - * Generates a code sample for using {@link ShareClient#generateSAS(String, ShareSASPermission, OffsetDateTime, - * OffsetDateTime, String, SASProtocol, IPRange, String, String, String, String, String)} + * Generates a code sample for using {@link ShareClient#generateSAS(String, ShareSasPermission, OffsetDateTime, + * OffsetDateTime, String, SASProtocol, IpRange, String, String, String, String, String)} */ public void generateSAS() { ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.ShareClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // BEGIN: com.azure.storage.file.ShareClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String String identifier = "identifier"; - ShareSASPermission permissions = new ShareSASPermission() - .setRead(true) - .setCreate(true) - .setDelete(true) - .setWrite(true) - .setList(true); + ShareSasPermission permissions = new ShareSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setWritePermission(true) + .setListPermission(true); OffsetDateTime startTime = OffsetDateTime.now().minusDays(1); OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); - IPRange ipRange = new IPRange() + IpRange ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255"); SASProtocol sasProtocol = SASProtocol.HTTPS_HTTP; @@ -539,7 +540,7 @@ public void generateSAS() { String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; String sas = shareClient.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); - // END: com.azure.storage.file.ShareClient.generateSAS#String-ShareSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange-String-String-String-String-String + // END: com.azure.storage.file.ShareClient.generateSAS#String-ShareSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange-String-String-String-String-String } /** diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy index 7c86a901dcd6..a2638b23ceab 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAPITests.groovy @@ -5,12 +5,9 @@ package com.azure.storage.file import com.azure.storage.common.Constants import com.azure.storage.common.credentials.SharedKeyCredential -import com.azure.storage.file.DirectoryClient -import com.azure.storage.file.FileClient -import com.azure.storage.file.FileSmbProperties -import com.azure.storage.file.ShareClient import com.azure.storage.file.models.FileHTTPHeaders import com.azure.storage.file.models.NtfsFileAttributes +import com.azure.storage.file.models.ShareSnapshotInfo import com.azure.storage.file.models.StorageErrorCode import com.azure.storage.file.models.StorageException import spock.lang.Ignore @@ -43,15 +40,31 @@ class DirectoryAPITests extends APISpec { def "Get directory URL"() { given: def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accountName) + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, directoryPath) when: - def directoryURL = primaryDirectoryClient.getDirectoryUrl().toString() + def directoryURL = primaryDirectoryClient.getDirectoryUrl() then: expectURL == directoryURL } + def "Get share snapshot URL"() { + given: + def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accoutName, shareName, directoryPath) + + when: + ShareSnapshotInfo shareSnapshotInfo = shareClient.createSnapshot() + expectURL = expectURL + "?snapshot=" + shareSnapshotInfo.getSnapshot() + DirectoryClient newDirClient = shareBuilderHelper(interceptorManager, shareName).snapshot(shareSnapshotInfo.getSnapshot()) + .buildClient().getDirectoryClient(directoryPath) + def directoryURL = newDirClient.getDirectoryUrl() + + then: + expectURL.equals(directoryURL) + } + def "Get sub directory client"() { given: def subDirectoryClient = primaryDirectoryClient.getSubDirectoryClient("testSubDirectory") @@ -90,18 +103,6 @@ class DirectoryAPITests extends APISpec { FileTestHelper.assertResponseStatusCode(primaryDirectoryClient.createWithResponse(null, null, testMetadata, null, null), 201) } - def "Create directory error with metadata"() { - given: - def errorMetadata = Collections.singletonMap("testMeta", "value") - - when: - primaryDirectoryClient.createWithResponse(null, null, errorMetadata, null, null) - - then: - def e = thrown(StorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 403, StorageErrorCode.AUTHENTICATION_FAILED) - } - def "Create directory with file permission"() { when: def resp = primaryDirectoryClient.createWithResponse(null, filePermission, null, null, null) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy index 1374993587a2..94c0c368330c 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/DirectoryAsyncAPITests.groovy @@ -6,10 +6,6 @@ package com.azure.storage.file import com.azure.storage.common.Constants import com.azure.storage.common.credentials.SharedKeyCredential -import com.azure.storage.file.DirectoryAsyncClient -import com.azure.storage.file.FileAsyncClient -import com.azure.storage.file.FileSmbProperties -import com.azure.storage.file.ShareClient import com.azure.storage.file.models.FileHTTPHeaders import com.azure.storage.file.models.NtfsFileAttributes import com.azure.storage.file.models.StorageErrorCode @@ -44,9 +40,9 @@ class DirectoryAsyncAPITests extends APISpec { def "Get directory URL"() { given: def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accountName) + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, directoryPath) when: - def directoryURL = primaryDirectoryAsyncClient.getDirectoryUrl().toString() + def directoryURL = primaryDirectoryAsyncClient.getDirectoryUrl() then: expectURL.equals(directoryURL) } @@ -92,17 +88,6 @@ class DirectoryAsyncAPITests extends APISpec { }.verifyComplete() } - def "Create directory error with metadata"() { - given: - def errorMetadata = Collections.singletonMap("testMeta", "value") - when: - def createMetadataErrorVerifier = StepVerifier.create(primaryDirectoryAsyncClient.createWithResponse(null, null, errorMetadata)) - then: - createMetadataErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 403, StorageErrorCode.AUTHENTICATION_FAILED) - } - } - def "Create directory with file permission"() { expect: StepVerifier.create(primaryDirectoryAsyncClient.createWithResponse(null, filePermission, testMetadata)) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy index 6b6cf44ee676..d32dcbbc78d6 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAPITests.groovy @@ -4,8 +4,8 @@ package com.azure.storage.file import com.azure.core.exception.HttpResponseException -import com.azure.core.http.rest.Response import com.azure.core.exception.UnexpectedLengthException +import com.azure.core.http.rest.Response import com.azure.core.implementation.util.FluxUtil import com.azure.core.util.Context import com.azure.storage.common.Constants @@ -14,6 +14,7 @@ import com.azure.storage.file.models.FileCopyInfo import com.azure.storage.file.models.FileHTTPHeaders import com.azure.storage.file.models.FileRange import com.azure.storage.file.models.NtfsFileAttributes +import com.azure.storage.file.models.ShareSnapshotInfo import com.azure.storage.file.models.StorageErrorCode import com.azure.storage.file.models.StorageException import spock.lang.Ignore @@ -55,15 +56,30 @@ class FileAPITests extends APISpec { def "Get file URL"() { given: def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accountName) + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, filePath) when: - def fileURL = primaryFileClient.getFileUrl().toString() + def fileURL = primaryFileClient.getFileUrl() then: expectURL == fileURL } + def "Get share snapshot URL"() { + given: + def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accoutName, shareName, filePath) + + when: + ShareSnapshotInfo shareSnapshotInfo = shareClient.createSnapshot() + expectURL = expectURL + "?snapshot=" + shareSnapshotInfo.getSnapshot() + FileClient newFileClient = shareBuilderHelper(interceptorManager, shareName).snapshot(shareSnapshotInfo.getSnapshot()) + .buildClient().getFileClient(filePath) + def fileURL = newFileClient.getFileUrl() + then: + expectURL.equals(fileURL) + } + def "Create file"() { expect: FileTestHelper.assertResponseStatusCode(primaryFileClient.createWithResponse(1024, null, null, null, null, null, null), 201) @@ -120,18 +136,12 @@ class FileAPITests extends APISpec { resp.getValue().getSmbProperties().getFileId() } - @Unroll def "Create file with args error"() { when: - primaryFileClient.createWithResponse(maxSize, null, null, null, metadata, null, null) + primaryFileClient.createWithResponse(-1, null, null, null, testMetadata, null, null) then: def e = thrown(StorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMsg) - - where: - maxSize | metadata | statusCode | errMsg - -1 | testMetadata | 400 | StorageErrorCode.OUT_OF_RANGE_INPUT - 1024 | Collections.singletonMap("testMeta", "value") | 403 | StorageErrorCode.AUTHENTICATION_FAILED + FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, StorageErrorCode.OUT_OF_RANGE_INPUT) } @Unroll @@ -383,7 +393,7 @@ class FileAPITests extends APISpec { def destinationOffset = 0 primaryFileClient.upload(ByteBuffer.wrap(data.getBytes()), data.length()) - def sasToken = primaryFileClient.generateSAS(getUTCNow().plusDays(1), new FileSASPermission().setReadPermission(true)) + def sasToken = primaryFileClient.generateSAS(getUTCNow().plusDays(1), new FileSasPermission().setReadPermission(true)) when: FileClient client = fileBuilderHelper(interceptorManager, shareName, "destination") @@ -391,7 +401,7 @@ class FileAPITests extends APISpec { .buildFileClient() client.create(1024) - client.uploadRangeFromURL(length, destinationOffset, sourceOffset, (primaryFileClient.getFileUrl().toString() + "/" + shareName + "/" + filePath +"?" + sasToken).toURI()) + client.uploadRangeFromUrl(length, destinationOffset, sourceOffset, (primaryFileClient.getFileUrl() +"?" + sasToken).toURI()) then: def result = new String(client.downloadWithProperties().getBody().blockLast().array()) @@ -406,7 +416,7 @@ class FileAPITests extends APISpec { primaryFileClient.create(1024) // TODO: Need another test account if using SAS token for authentication. // TODO: SasToken auth cannot be used until the logging redaction - def sourceURL = primaryFileClient.getFileUrl().toString() + "/" + shareName + "/" + filePath + def sourceURL = primaryFileClient.getFileUrl() when: Response copyInfoResponse = primaryFileClient.startCopyWithResponse(sourceURL, null, null, null) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy index 353e691826bf..4201c3e21914 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileAsyncAPITests.groovy @@ -51,10 +51,10 @@ class FileAsyncAPITests extends APISpec { def "Get file URL"() { given: def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accountName) + def expectURL = String.format("https://%s.file.core.windows.net/%s/%s", accountName, shareName, filePath) when: - def fileURL = primaryFileAsyncClient.getFileUrl().toString() + def fileURL = primaryFileAsyncClient.getFileUrl() then: expectURL == fileURL @@ -122,20 +122,14 @@ class FileAsyncAPITests extends APISpec { }.verifyComplete() } - @Unroll def "Create file with args error"() { when: - def createFileErrorVerifier = StepVerifier.create(primaryFileAsyncClient.createWithResponse(maxSize, null, null, null, metadata)) + def createFileErrorVerifier = StepVerifier.create(primaryFileAsyncClient.createWithResponse(-1, null, null, null, testMetadata)) then: createFileErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMsg) + assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, StorageErrorCode.OUT_OF_RANGE_INPUT) } - - where: - maxSize | metadata | statusCode | errMsg - -1 | testMetadata | 400 | StorageErrorCode.OUT_OF_RANGE_INPUT - 1024 | Collections.singletonMap("testMeta", "value") | 403 | StorageErrorCode.AUTHENTICATION_FAILED } def "Upload and download data"() { @@ -371,7 +365,9 @@ class FileAsyncAPITests extends APISpec { def downloadFromFileVerifier = StepVerifier.create(primaryFileAsyncClient.downloadToFile(downloadFile.getPath())) then: - downloadFromFileVerifier.verifyComplete() + downloadFromFileVerifier.assertNext{ + assert it.getContentLength() == data.length() + }.verifyComplete() def scanner = new Scanner(downloadFile).useDelimiter("\\Z") data == scanner.next() scanner.close() @@ -389,7 +385,7 @@ class FileAsyncAPITests extends APISpec { def destinationOffset = 0 primaryFileAsyncClient.upload(Flux.just(ByteBuffer.wrap(data.getBytes())), data.length()).block() - def sasToken = primaryFileAsyncClient.generateSAS(new FileSASPermission().setReadPermission(true), getUTCNow().plusDays(1)) + def sasToken = primaryFileAsyncClient.generateSAS(new FileSasPermission().setReadPermission(true), getUTCNow().plusDays(1)) when: FileAsyncClient client = fileBuilderHelper(interceptorManager, shareName, "destination") @@ -397,7 +393,7 @@ class FileAsyncAPITests extends APISpec { .buildFileAsyncClient() client.create(1024).block() - client.uploadRangeFromURL(length, destinationOffset, sourceOffset, (primaryFileAsyncClient.getFileUrl().toString() + "/" + shareName + "/" + filePath +"?" + sasToken).toURI()).block() + client.uploadRangeFromUrl(length, destinationOffset, sourceOffset, (primaryFileAsyncClient.getFileUrl().toString() +"?" + sasToken).toURI()).block() then: def result = new String(client.downloadWithProperties().block().getBody().blockLast().array()) @@ -412,7 +408,7 @@ class FileAsyncAPITests extends APISpec { primaryFileAsyncClient.create(1024).block() // TODO: Need another test account if using SAS token for authentication. // TODO: SasToken auth cannot be used until the logging redaction - def sourceURL = primaryFileAsyncClient.getFileUrl().toString() + "/" + shareName + "/" + filePath + def sourceURL = primaryFileAsyncClient.getFileUrl() when: def copyInfoVerifier = StepVerifier.create(primaryFileAsyncClient.startCopyWithResponse(sourceURL, null)) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy index 80981e960656..3f4d4aac8cce 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileSASTests.groovy @@ -4,7 +4,7 @@ import com.azure.storage.common.AccountSASPermission import com.azure.storage.common.AccountSASResourceType import com.azure.storage.common.AccountSASService import com.azure.storage.common.Constants -import com.azure.storage.common.IPRange +import com.azure.storage.common.IpRange import com.azure.storage.common.SASProtocol import com.azure.storage.common.credentials.SASTokenCredential import com.azure.storage.file.models.AccessPolicy @@ -33,7 +33,7 @@ class FileSASTests extends APISpec { @Unroll def "FileSASPermissions toString"() { setup: - def perms = new FileSASPermission() + def perms = new FileSasPermission() .setReadPermission(read) .setWritePermission(write) .setDeletePermission(delete) @@ -54,7 +54,7 @@ class FileSASTests extends APISpec { @Unroll def "FileSASPermissions parse"() { when: - def perms = FileSASPermission.parse(permString) + def perms = FileSasPermission.parse(permString) then: perms.getReadPermission() == read @@ -74,7 +74,7 @@ class FileSASTests extends APISpec { def "FileSASPermissions parse IA"() { when: - FileSASPermission.parse("rwaq") + FileSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -83,12 +83,12 @@ class FileSASTests extends APISpec { @Unroll def "ShareSASPermissions toString"() { setup: - def perms = new ShareSASPermission() - .setRead(read) - .setWrite(write) - .setDelete(delete) - .setCreate(create) - .setList(list) + def perms = new ShareSasPermission() + .setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setCreatePermission(create) + .setListPermission(list) expect: perms.toString() == expectedString @@ -106,14 +106,14 @@ class FileSASTests extends APISpec { @Unroll def "ShareSASPermissions parse"() { when: - def perms = ShareSASPermission.parse(permString) + def perms = ShareSasPermission.parse(permString) then: - perms.getRead() == read - perms.getWrite() == write - perms.getDelete() == delete - perms.getCreate() == create - perms.getList() == list + perms.getReadPermission() == read + perms.getWritePermission() == write + perms.getDeletePermission() == delete + perms.getCreatePermission() == create + perms.getListPermission() == list where: permString || read | write | delete | create | list @@ -128,7 +128,7 @@ class FileSASTests extends APISpec { def "ShareSASPermissions parse IA"() { when: - ShareSASPermission.parse("rwaq") + ShareSasPermission.parse("rwaq") then: thrown(IllegalArgumentException) @@ -141,7 +141,7 @@ class FileSASTests extends APISpec { def accountName = "account" when: - def serviceSASSignatureValues = primaryFileClient.fileAsyncClient.configureServiceSASSignatureValues(new FileServiceSASSignatureValues(), accountName) + def serviceSASSignatureValues = primaryFileClient.fileAsyncClient.configureServiceSASSignatureValues(new FileServiceSasSignatureValues(), accountName) then: serviceSASSignatureValues.getCanonicalName() == "/file/" + accountName + "/" + shareName + "/" + fileName @@ -153,14 +153,14 @@ class FileSASTests extends APISpec { primaryFileClient.create(Constants.KB) primaryFileClient.upload(ByteBuffer.wrap(data.getBytes()), (long) data.length()) - def permissions = new FileSASPermission() + def permissions = new FileSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) .setDeletePermission(true) def startTime = getUTCNow().minusDays(1) def expiryTime = getUTCNow().plusDays(1) - def ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") def sasProtocol = SASProtocol.HTTPS_HTTP @@ -178,7 +178,7 @@ class FileSASTests extends APISpec { when: def client = fileBuilderHelper(interceptorManager, shareName, filePath) - .endpoint(primaryFileClient.getFileUrl().toString()) + .endpoint(primaryFileClient.getFileUrl()) .credential(SASTokenCredential.fromSASTokenString(sas)) .buildFileClient() @@ -200,14 +200,14 @@ class FileSASTests extends APISpec { String data = "test" primaryFileClient.create(Constants.KB) - def permissions = new FileSASPermission() + def permissions = new FileSasPermission() .setReadPermission(true) .setWritePermission(false) .setCreatePermission(true) .setDeletePermission(true) def startTime = getUTCNow().minusDays(1) def expiryTime = getUTCNow().plusDays(1) - def ipRange = new IPRange() + def ipRange = new IpRange() .setIpMin("0.0.0.0") .setIpMax("255.255.255.255") def sasProtocol = SASProtocol.HTTPS_HTTP @@ -221,7 +221,7 @@ class FileSASTests extends APISpec { def sas = primaryFileClient.generateSAS(null, permissions, expiryTime, startTime, null, sasProtocol, ipRange, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType) def client = fileBuilderHelper(interceptorManager, shareName, filePath) - .endpoint(primaryFileClient.getFileUrl().toString()) + .endpoint(primaryFileClient.getFileUrl()) .credential(SASTokenCredential.fromSASTokenString(sas)) .buildFileClient() @@ -247,12 +247,12 @@ class FileSASTests extends APISpec { primaryShareClient.setAccessPolicy(Arrays.asList(identifier)) // Check containerSASPermissions - ShareSASPermission permissions = new ShareSASPermission() - .setRead(true) - .setWrite(true) - .setCreate(true) - .setDelete(true) - .setList(true) + ShareSasPermission permissions = new ShareSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setListPermission(true) OffsetDateTime expiryTime = getUTCNow().plusDays(1) @@ -260,7 +260,7 @@ class FileSASTests extends APISpec { String sasWithId = primaryShareClient.generateSAS(identifier.getId()) ShareClient client1 = shareBuilderHelper(interceptorManager, primaryShareClient.client.shareName) - .endpoint(primaryShareClient.getShareUrl().toString()) + .endpoint(primaryShareClient.getShareUrl()) .credential(SASTokenCredential.fromSASTokenString(sasWithId)) .buildClient() @@ -270,7 +270,7 @@ class FileSASTests extends APISpec { String sasWithPermissions = primaryShareClient.generateSAS(expiryTime, permissions) def client2 = shareBuilderHelper(interceptorManager, primaryShareClient.client.shareName) - .endpoint(primaryFileClient.getFileUrl().toString()) + .endpoint(primaryFileClient.getFileUrl()) .credential(SASTokenCredential.fromSASTokenString(sasWithPermissions)) .buildClient() @@ -303,7 +303,7 @@ class FileSASTests extends APISpec { when: def scBuilder = fileServiceBuilderHelper(interceptorManager) - scBuilder.endpoint(primaryFileServiceClient.getFileServiceUrl().toString()) + scBuilder.endpoint(primaryFileServiceClient.getFileServiceUrl()) .credential(SASTokenCredential.fromSASTokenString(sas)) def sc = scBuilder.buildClient() sc.createShare("create") diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy index 63551a468bfb..10d1bd1cd323 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAPITests.groovy @@ -39,7 +39,7 @@ class FileServiceAPITests extends APISpec { def accountName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() def expectURL = String.format("https://%s.file.core.windows.net", accountName) when: - def fileServiceURL = primaryFileServiceClient.getFileServiceUrl().toString() + def fileServiceURL = primaryFileServiceClient.getFileServiceUrl() then: expectURL.equals(fileServiceURL) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy index 2e6c37ddb894..aaf80a7d86fc 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileServiceAsyncAPITests.groovy @@ -40,7 +40,7 @@ class FileServiceAsyncAPITests extends APISpec { def expectURL = String.format("https://%s.file.core.windows.net", accountName) when: - def fileServiceURL = primaryFileServiceAsyncClient.getFileServiceUrl().toString() + def fileServiceURL = primaryFileServiceAsyncClient.getFileServiceUrl() then: expectURL.equals(fileServiceURL) diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy index 929dbf9ffbfc..95e498d55da7 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/FileTestHelper.groovy @@ -6,15 +6,7 @@ package com.azure.storage.file import com.azure.core.http.rest.Response import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger -import com.azure.storage.file.models.CorsRule -import com.azure.storage.file.models.FileServiceProperties -import com.azure.storage.file.models.Metrics -import com.azure.storage.file.models.RetentionPolicy -import com.azure.storage.file.models.ShareItem -import com.azure.storage.file.models.SignedIdentifier -import com.azure.storage.file.models.StorageErrorCode -import com.azure.storage.file.models.StorageException -import com.azure.storage.file.models.StorageServiceProperties +import com.azure.storage.file.models.* import java.nio.file.Files import java.nio.file.Paths @@ -42,16 +34,6 @@ class FileTestHelper { ((StorageException) throwable).getErrorCode() == errMessage } - static boolean assertFileServicePropertiesAreEqual(StorageServiceProperties expected, StorageServiceProperties actual) { - if (expected == null) { - return actual == null - } else { - return assertMetricsAreEqual(expected.hourMetrics(), actual.hourMetrics()) && - assertMetricsAreEqual(expected.minuteMetrics(), actual.minuteMetrics()) && - assertCorsAreEqual(expected.cors(), actual.cors()) - } - } - static boolean assertMetricsAreEqual(Metrics expected, Metrics actual) { if (expected == null) { return actual == null diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy index 2354d86e91c1..168cc2c80717 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAPITests.groovy @@ -5,13 +5,9 @@ package com.azure.storage.file import com.azure.core.http.netty.NettyAsyncHttpClientBuilder import com.azure.storage.common.credentials.SharedKeyCredential -import com.azure.storage.file.DirectoryClient -import com.azure.storage.file.FileClient -import com.azure.storage.file.FileSmbProperties -import com.azure.storage.file.ShareClient -import com.azure.storage.file.ShareClientBuilder import com.azure.storage.file.models.FileHTTPHeaders import com.azure.storage.file.models.NtfsFileAttributes +import com.azure.storage.file.models.ShareSnapshotInfo import com.azure.storage.file.models.StorageErrorCode import com.azure.storage.file.models.StorageException import spock.lang.Ignore @@ -40,10 +36,26 @@ class ShareAPITests extends APISpec { def "Get share URL"() { given: def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accoutName) + def expectURL = String.format("https://%s.file.core.windows.net/%s", accoutName, shareName) when: - def shareURL = primaryShareClient.getShareUrl().toString() + def shareURL = primaryShareClient.getShareUrl() + + then: + expectURL.equals(shareURL) + } + + def "Get share snapshot URL"() { + given: + def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() + def expectURL = String.format("https://%s.file.core.windows.net/%s", accoutName, shareName) + primaryShareClient.create() + when: + ShareSnapshotInfo shareSnapshotInfo = primaryShareClient.createSnapshot() + expectURL = expectURL + "?snapshot=" + shareSnapshotInfo.getSnapshot() + ShareClient newShareClient = shareBuilderHelper(interceptorManager, shareName).snapshot(shareSnapshotInfo.getSnapshot()) + .buildClient() + def shareURL = newShareClient.getShareUrl() then: expectURL.equals(shareURL) @@ -366,11 +378,11 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, errMsg) where: - fileName | maxSize | httpHeaders | metadata | errMsg - "testfile:" | 1024 | null | testMetadata | StorageErrorCode.INVALID_RESOURCE_NAME - "fileName" | -1 | null | testMetadata | StorageErrorCode.OUT_OF_RANGE_INPUT + fileName | maxSize | httpHeaders | metadata | errMsg + "testfile:" | 1024 | null | testMetadata | StorageErrorCode.INVALID_RESOURCE_NAME + "fileName" | -1 | null | testMetadata | StorageErrorCode.OUT_OF_RANGE_INPUT "fileName" | 1024 | new FileHTTPHeaders().setFileContentMD5(new byte[0]) | testMetadata | StorageErrorCode.INVALID_HEADER_VALUE - "fileName" | 1024 | null | Collections.singletonMap("", "value") | StorageErrorCode.EMPTY_METADATA_KEY + "fileName" | 1024 | null | Collections.singletonMap("", "value") | StorageErrorCode.EMPTY_METADATA_KEY } def "Delete directory"() { diff --git a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy index bdba2164fb83..2d43a9884227 100644 --- a/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file/src/test/java/com/azure/storage/file/ShareAsyncAPITests.groovy @@ -5,11 +5,6 @@ package com.azure.storage.file import com.azure.core.http.netty.NettyAsyncHttpClientBuilder import com.azure.storage.common.credentials.SharedKeyCredential -import com.azure.storage.file.DirectoryAsyncClient -import com.azure.storage.file.FileAsyncClient -import com.azure.storage.file.FileSmbProperties -import com.azure.storage.file.ShareAsyncClient -import com.azure.storage.file.ShareClientBuilder import com.azure.storage.file.models.FileHTTPHeaders import com.azure.storage.file.models.NtfsFileAttributes import com.azure.storage.file.models.StorageErrorCode @@ -40,9 +35,9 @@ class ShareAsyncAPITests extends APISpec { def "Get share URL"() { given: def accoutName = SharedKeyCredential.fromConnectionString(connectionString).getAccountName() - def expectURL = String.format("https://%s.file.core.windows.net", accoutName) + def expectURL = String.format("https://%s.file.core.windows.net/%s", accoutName, shareName) when: - def shareURL = primaryShareAsyncClient.getShareUrl().toString() + def shareURL = primaryShareAsyncClient.getShareUrl() then: expectURL.equals(shareURL) } diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsCreateDirectoryErrorWithMetadata.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsCreateDirectoryErrorWithMetadata.json deleted file mode 100644 index 472517d40872..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsCreateDirectoryErrorWithMetadata.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryapitestscreatedirectoryerrorwithmetadata30321b37?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7a332b95-dd02-49a0-84c9-293c4ca6395e" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B7C4794B0\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "07339b77-301a-000d-2d44-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:47:59 GMT", - "x-ms-client-request-id" : "7a332b95-dd02-49a0-84c9-293c4ca6395e" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryapitestscreatedirectoryerrorwithmetadata30321b37/directoryapitestscreatedirectoryerrorwithmetadata852261d2?restype=directory", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7504bec0-e80d-4a0c-8f35-a86c1fcf8875" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "959", - "StatusCode" : "403", - "x-ms-request-id" : "07339b79-301a-000d-2e44-645aef000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:07339b79-301a-000d-2e44-645aef000000\nTime:2019-09-05T23:48:00.5663209ZThe MAC signature found in the HTTP request 'fdceDpxLUq90lMfGTWkfSAzE2d8yHdba4QsT83HxD/o=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nThu, 05 Sep 2019 23:48:00 GMT\n\n\n\n\n\nx-ms-client-request-id:7504bec0-e80d-4a0c-8f35-a86c1fcf8875\nx-ms-file-attributes:None\nx-ms-file-creation-time:Now\nx-ms-file-last-write-time:Now\nx-ms-file-permission:Inherit\nx-ms-meta-testmeta:value\nx-ms-version:2019-02-02\n/gapradev/directoryapitestscreatedirectoryerrorwithmetadata30321b37/directoryapitestscreatedirectoryerrorwithmetadata852261d2\nrestype:directory'.", - "Date" : "Thu, 05 Sep 2019 23:47:59 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "directoryapitestscreatedirectoryerrorwithmetadata30321b37", "directoryapitestscreatedirectoryerrorwithmetadata852261d2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetDirectoryURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetDirectoryURL.json index 3efde4ae7df2..de4930d41233 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetDirectoryURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetDirectoryURL.json @@ -1,25 +1,25 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryapitestsgetdirectoryurl63320c15846ffdc2?restype=share", + "Uri" : "https://sima.file.core.windows.net/directoryapitestsgetdirectoryurl79072385124ec0f4?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d9499181-7396-4e9e-b0a6-d7b8ce2e2319" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "ee0e5f46-a454-48a9-a994-b92ddc00fec3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B7B1332F3\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:58 GMT", + "ETag" : "\"0x8D73C8798258563\"", + "Last-Modified" : "Wed, 18 Sep 2019 22:28:56 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "07339b54-301a-000d-1344-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:47:57 GMT", - "x-ms-client-request-id" : "d9499181-7396-4e9e-b0a6-d7b8ce2e2319" + "x-ms-request-id" : "1ab0711b-801a-0017-7d70-6e0ff1000000", + "Date" : "Wed, 18 Sep 2019 22:28:56 GMT", + "x-ms-client-request-id" : "ee0e5f46-a454-48a9-a994-b92ddc00fec3" }, "Exception" : null } ], - "variables" : [ "directoryapitestsgetdirectoryurl63320c15846ffdc2", "directoryapitestsgetdirectoryurl51185d2da17b208b" ] + "variables" : [ "directoryapitestsgetdirectoryurl79072385124ec0f4", "directoryapitestsgetdirectoryurl51408c1446e4e7f2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetShareSnapshotURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetShareSnapshotURL.json new file mode 100644 index 000000000000..42fa35cdbb5f --- /dev/null +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAPITestsGetShareSnapshotURL.json @@ -0,0 +1,47 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/directoryapitestsgetsharesnapshoturl834685c76aa3a8?restype=share", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "0c2b9d14-7e29-48e4-b34e-e137a871e3f0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C8ECFA11096\"", + "Last-Modified" : "Wed, 18 Sep 2019 23:20:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c668f2a2-901a-004c-1277-6e088d000000", + "Date" : "Wed, 18 Sep 2019 23:20:36 GMT", + "x-ms-client-request-id" : "0c2b9d14-7e29-48e4-b34e-e137a871e3f0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/directoryapitestsgetsharesnapshoturl834685c76aa3a8?restype=share&comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1449bee7-3546-45a6-a956-ecee3dc13981" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-09-18T23:20:36.0000000Z", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C8ECFA11096\"", + "Last-Modified" : "Wed, 18 Sep 2019 23:20:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c668f2a6-901a-004c-1377-6e088d000000", + "Date" : "Wed, 18 Sep 2019 23:20:36 GMT", + "x-ms-client-request-id" : "1449bee7-3546-45a6-a956-ecee3dc13981" + }, + "Exception" : null + } ], + "variables" : [ "directoryapitestsgetsharesnapshoturl834685c76aa3a8", "directoryapitestsgetsharesnapshoturl767779a5f38fa0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsCreateDirectoryErrorWithMetadata.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsCreateDirectoryErrorWithMetadata.json deleted file mode 100644 index 26ba906f09ba..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsCreateDirectoryErrorWithMetadata.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryasyncapitestscreatedirectoryerrorwithmetadata62422?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "286aa742-1449-4ac4-a147-20277ba1ba7e" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325BA5B3F4DD\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:49:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "36c45b35-601a-0000-3644-64923b000000", - "Date" : "Thu, 05 Sep 2019 23:49:09 GMT", - "x-ms-client-request-id" : "286aa742-1449-4ac4-a147-20277ba1ba7e" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryasyncapitestscreatedirectoryerrorwithmetadata62422/directoryasyncapitestscreatedirectoryerrorwithmetadata98530?restype=directory", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b4afface-6fba-4e8f-a1f7-62b6c1369d3a" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "963", - "StatusCode" : "403", - "x-ms-request-id" : "36c45b3b-601a-0000-3a44-64923b000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:36c45b3b-601a-0000-3a44-64923b000000\nTime:2019-09-05T23:49:10.1721553ZThe MAC signature found in the HTTP request 'WCYVzYpzy1gxV4siXE0zCleTDhjVtER9bmtWHyugB5c=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nThu, 05 Sep 2019 23:49:10 GMT\n\n\n\n\n\nx-ms-client-request-id:b4afface-6fba-4e8f-a1f7-62b6c1369d3a\nx-ms-file-attributes:None\nx-ms-file-creation-time:Now\nx-ms-file-last-write-time:Now\nx-ms-file-permission:Inherit\nx-ms-meta-testmeta:value\nx-ms-version:2019-02-02\n/gapradev/directoryasyncapitestscreatedirectoryerrorwithmetadata62422/directoryasyncapitestscreatedirectoryerrorwithmetadata98530\nrestype:directory'.", - "Date" : "Thu, 05 Sep 2019 23:49:09 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "directoryasyncapitestscreatedirectoryerrorwithmetadata62422", "directoryasyncapitestscreatedirectoryerrorwithmetadata98530" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsGetDirectoryURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsGetDirectoryURL.json index cb0a89c1d235..494686e34958 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsGetDirectoryURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/DirectoryAsyncAPITestsGetDirectoryURL.json @@ -1,25 +1,25 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/directoryasyncapitestsgetdirectoryurl44419c33286fb9?restype=share", + "Uri" : "https://sima.file.core.windows.net/directoryasyncapitestsgetdirectoryurl792479deae926f?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "342d6c8d-ea9d-46d4-a19e-13383ec0f244" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "23affb1e-f406-4b5f-b082-f8e9d704c7ab" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325BA461D1B0\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:49:07 GMT", + "ETag" : "\"0x8D73C8EF9D99165\"", + "Last-Modified" : "Wed, 18 Sep 2019 23:21:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "36c45ae0-601a-0000-6944-64923b000000", - "Date" : "Thu, 05 Sep 2019 23:49:07 GMT", - "x-ms-client-request-id" : "342d6c8d-ea9d-46d4-a19e-13383ec0f244" + "x-ms-request-id" : "fd2ee6ae-a01a-0022-7d77-6ea1a4000000", + "Date" : "Wed, 18 Sep 2019 23:21:46 GMT", + "x-ms-client-request-id" : "23affb1e-f406-4b5f-b082-f8e9d704c7ab" }, "Exception" : null } ], - "variables" : [ "directoryasyncapitestsgetdirectoryurl44419c33286fb9", "directoryasyncapitestsgetdirectoryurl29494e286503bc" ] + "variables" : [ "directoryasyncapitestsgetdirectoryurl792479deae926f", "directoryasyncapitestsgetdirectoryurl300227bbd0cd42" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError.json new file mode 100644 index 000000000000..4b1be98c87e5 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError.json @@ -0,0 +1,47 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestscreatefilewithargserror978624594149f00?restype=share", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f66131a7-a3d8-49f6-908f-968d001cd1da" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D742088ADDA724\"", + "Last-Modified" : "Wed, 25 Sep 2019 22:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b438eb56-101a-0066-34f1-73822c000000", + "Date" : "Wed, 25 Sep 2019 22:34:35 GMT", + "x-ms-client-request-id" : "f66131a7-a3d8-49f6-908f-968d001cd1da" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestscreatefilewithargserror978624594149f00/fileapitestscreatefilewithargserror56311c9a58e7aa5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "1f7f69d0-9caa-4fa8-a6ce-a41a5a552f97" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "Content-Length" : "236", + "StatusCode" : "400", + "x-ms-request-id" : "b438eb5a-101a-0066-36f1-73822c000000", + "Body" : "OutOfRangeInputThe file size exceeds the maximum permissible limit.\nRequestId:b438eb5a-101a-0066-36f1-73822c000000\nTime:2019-09-25T22:34:35.4979914Z", + "Date" : "Wed, 25 Sep 2019 22:34:35 GMT", + "x-ms-client-request-id" : "1f7f69d0-9caa-4fa8-a6ce-a41a5a552f97", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "fileapitestscreatefilewithargserror978624594149f00", "fileapitestscreatefilewithargserror56311c9a58e7aa5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError0.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError0.json deleted file mode 100644 index ba74b7c33e9a..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError0.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestscreatefilewithargserror098651b181b4bd7?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8c06f9df-28dc-4798-83e2-6e55729b6b21" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B6470D0ED\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:20 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d4a4687-c01a-0009-6d44-64d7e8000000", - "Date" : "Thu, 05 Sep 2019 23:47:20 GMT", - "x-ms-client-request-id" : "8c06f9df-28dc-4798-83e2-6e55729b6b21" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestscreatefilewithargserror098651b181b4bd7/fileapitestscreatefilewithargserror068945f30b9c0de", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d21556ac-fee7-4c14-be93-22c8a3eec81a" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "OutOfRangeInput", - "retry-after" : "0", - "Content-Length" : "236", - "StatusCode" : "400", - "x-ms-request-id" : "7d4a468c-c01a-0009-7044-64d7e8000000", - "Body" : "OutOfRangeInputThe file size exceeds the maximum permissible limit.\nRequestId:7d4a468c-c01a-0009-7044-64d7e8000000\nTime:2019-09-05T23:47:20.5642394Z", - "Date" : "Thu, 05 Sep 2019 23:47:20 GMT", - "x-ms-client-request-id" : "d21556ac-fee7-4c14-be93-22c8a3eec81a", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fileapitestscreatefilewithargserror098651b181b4bd7", "fileapitestscreatefilewithargserror068945f30b9c0de" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError1.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError1.json deleted file mode 100644 index d66b9e4113c8..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestscreatefilewithargserror1711786239de6a8?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1c65c24e-0692-462b-9d9f-cd911742c053" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B64A72333\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:20 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d4a4699-c01a-0009-7d44-64d7e8000000", - "Date" : "Thu, 05 Sep 2019 23:47:20 GMT", - "x-ms-client-request-id" : "1c65c24e-0692-462b-9d9f-cd911742c053" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestscreatefilewithargserror1711786239de6a8/fileapitestscreatefilewithargserror1699185751ddb6a", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b88d75f9-a54d-409e-b22d-eb3e9117ac13" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "967", - "StatusCode" : "403", - "x-ms-request-id" : "7d4a469c-c01a-0009-7f44-64d7e8000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:7d4a469c-c01a-0009-7f44-64d7e8000000\nTime:2019-09-05T23:47:20.9232487ZThe MAC signature found in the HTTP request 'ZyTen4ZD/A0HXYc62pEZwXZTT3xJB7WiEGeFFCf85Is=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nThu, 05 Sep 2019 23:47:20 GMT\n\n\n\n\n\nx-ms-client-request-id:b88d75f9-a54d-409e-b22d-eb3e9117ac13\nx-ms-content-length:1024\nx-ms-file-attributes:None\nx-ms-file-creation-time:Now\nx-ms-file-last-write-time:Now\nx-ms-file-permission:Inherit\nx-ms-meta-testmeta:value\nx-ms-type:file\nx-ms-version:2019-02-02\n/gapradev/fileapitestscreatefilewithargserror1711786239de6a8/fileapitestscreatefilewithargserror1699185751ddb6a'.", - "Date" : "Thu, 05 Sep 2019 23:47:20 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fileapitestscreatefilewithargserror1711786239de6a8", "fileapitestscreatefilewithargserror1699185751ddb6a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError2.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError2.json deleted file mode 100644 index f19efe9637dc..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsCreateFileWithArgsError2.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestscreatefilewithargserror24159255f00d5b2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D721C4D36074BB\"", - "Last-Modified" : "Thu, 15 Aug 2019 21:09:13 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "ec0e84be-b01a-00a7-44ad-530995000000", - "Date" : "Thu, 15 Aug 2019 21:09:13 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestscreatefilewithargserror24159255f00d5b2/fileapitestscreatefilewithargserror24044490d9bcaa1", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "865", - "StatusCode" : "403", - "x-ms-request-id" : "ec0e84c0-b01a-00a7-45ad-530995000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:ec0e84c0-b01a-00a7-45ad-530995000000\nTime:2019-08-15T21:09:14.0445650ZThe MAC signature found in the HTTP request 'JP4ooBRaMLGCKgd7WfBQe+F8eRVIvSqyvgiHYQRjr6k=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nThu, 15 Aug 2019 21:09:14 GMT\n\n\n\n\n\nx-ms-client-request-id:c726219e-d5d0-4af9-b4c3-d52e318c69dc\nx-ms-content-length:1024\nx-ms-meta-testmeta:value\nx-ms-type:file\nx-ms-version:2018-11-09\n/azstoragesdkaccount/fileapitestscreatefilewithargserror24159255f00d5b2/fileapitestscreatefilewithargserror24044490d9bcaa1'.", - "Date" : "Thu, 15 Aug 2019 21:09:13 GMT", - "Content-Type" : "application/xml" - } - } ], - "variables" : [ "fileapitestscreatefilewithargserror24159255f00d5b2", "fileapitestscreatefilewithargserror24044490d9bcaa1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetFileURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetFileURL.json index d87b32454edf..08ff8cf6f429 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetFileURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetFileURL.json @@ -1,25 +1,25 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsgetfileurlfileapitestsgetfileurl65975860a1fb?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileapitestsgetfileurlfileapitestsgetfileurl4b758667899c?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d6797cba-2bdd-4ff1-8e8a-1c73ee0b7faa" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "bf5e6454-75e9-41d5-a72c-3f886799715a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B62FE7AFA\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:18 GMT", + "ETag" : "\"0x8D73C865D4983E9\"", + "Last-Modified" : "Wed, 18 Sep 2019 22:20:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7d4a4638-c01a-0009-2644-64d7e8000000", - "Date" : "Thu, 05 Sep 2019 23:47:18 GMT", - "x-ms-client-request-id" : "d6797cba-2bdd-4ff1-8e8a-1c73ee0b7faa" + "x-ms-request-id" : "8bbda295-401a-00a0-596f-6e00f4000000", + "Date" : "Wed, 18 Sep 2019 22:20:08 GMT", + "x-ms-client-request-id" : "bf5e6454-75e9-41d5-a72c-3f886799715a" }, "Exception" : null } ], - "variables" : [ "fileapitestsgetfileurlfileapitestsgetfileurl65975860a1fb", "fileapitestsgetfileurlfileapitestsgetfileurl659803142c57" ] + "variables" : [ "fileapitestsgetfileurlfileapitestsgetfileurl4b758667899c", "fileapitestsgetfileurlfileapitestsgetfileurl4b736467b099" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetShareSnapshotURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetShareSnapshotURL.json new file mode 100644 index 000000000000..aabe4ce08eb5 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsGetShareSnapshotURL.json @@ -0,0 +1,47 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/fileapitestsgetsharesnapshoturl30507b0691b2a09fb?restype=share", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "a37eabea-c39f-4e5d-a32a-ed2877b1a962" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C979D6638DB\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9293db9f-e01a-006a-2080-6e9339000000", + "Date" : "Thu, 19 Sep 2019 00:23:37 GMT", + "x-ms-client-request-id" : "a37eabea-c39f-4e5d-a32a-ed2877b1a962" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/fileapitestsgetsharesnapshoturl30507b0691b2a09fb?restype=share&comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "92584d3f-4d57-4b36-9334-d42fe4bdc99e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-09-19T00:23:37.0000000Z", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C979D6638DB\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9293dba1-e01a-006a-2180-6e9339000000", + "Date" : "Thu, 19 Sep 2019 00:23:37 GMT", + "x-ms-client-request-id" : "92584d3f-4d57-4b36-9334-d42fe4bdc99e" + }, + "Exception" : null + } ], + "variables" : [ "fileapitestsgetsharesnapshoturl30507b0691b2a09fb", "fileapitestsgetsharesnapshoturl21826a352911cda60" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json index 357b966c0970..b098c4520a93 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsStartCopy.json @@ -1,77 +1,77 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy0857329927a52?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopyc3702734e4387?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "816702a4-c27e-4267-bd02-65c6e6a33c1e" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "0e007957-058a-46b8-833f-25892fa89b2c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B69A8B450\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:29 GMT", + "ETag" : "\"0x8D73C97FD37E2F5\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:18 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "07339969-301a-000d-0844-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", - "x-ms-client-request-id" : "816702a4-c27e-4267-bd02-65c6e6a33c1e" + "x-ms-request-id" : "d09f5e0b-601a-003f-1080-6e784e000000", + "Date" : "Thu, 19 Sep 2019 00:26:17 GMT", + "x-ms-client-request-id" : "0e007957-058a-46b8-833f-25892fa89b2c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy0857329927a52/fileapitestsstartcopyfileapitestsstartcopy08504293b9e75", + "Uri" : "https://sima.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopyc3702734e4387/fileapitestsstartcopyfileapitestsstartcopyc3762971d6a8a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "63acb1e9-a418-4ccc-a077-eabd803016d6" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "e96ad6e5-fcc7-4f70-9168-48dec5a18ce1" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:47:29.3416744Z", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:29 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:26:18.3211652Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", - "ETag" : "\"0x8D7325B69B9E128\"", + "Date" : "Thu, 19 Sep 2019 00:26:17 GMT", + "ETag" : "\"0x8D73C97FD46B284\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:47:29.3416744Z", + "x-ms-file-change-time" : "2019-09-19T00:26:18.3211652Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "0733996b-301a-000d-0944-645aef000000", - "x-ms-client-request-id" : "63acb1e9-a418-4ccc-a077-eabd803016d6", - "x-ms-file-last-write-time" : "2019-09-05T23:47:29.3416744Z" + "x-ms-request-id" : "d09f5e0d-601a-003f-1180-6e784e000000", + "x-ms-client-request-id" : "e96ad6e5-fcc7-4f70-9168-48dec5a18ce1", + "x-ms-file-last-write-time" : "2019-09-19T00:26:18.3211652Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopy0857329927a52/fileapitestsstartcopyfileapitestsstartcopy08504293b9e75", + "Uri" : "https://sima.file.core.windows.net/fileapitestsstartcopyfileapitestsstartcopyc3702734e4387/fileapitestsstartcopyfileapitestsstartcopyc3762971d6a8a", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2ffe080d-98db-49c9-877f-7690fdc52809" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "dc6890a2-938b-4634-a91f-cb38a86171e6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "3f1e7246-723d-4b16-bca2-e3eeed88ca8c", - "ETag" : "\"0x8D7325B6A0A99B9\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:29 GMT", + "x-ms-copy-id" : "9bcc8b61-6a89-43da-86a8-4ac21c04a5ff", + "ETag" : "\"0x8D73C97FD957D07\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:18 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "0733996d-301a-000d-0b44-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:47:29 GMT", - "x-ms-client-request-id" : "2ffe080d-98db-49c9-877f-7690fdc52809" + "x-ms-request-id" : "d09f5e10-601a-003f-1480-6e784e000000", + "Date" : "Thu, 19 Sep 2019 00:26:18 GMT", + "x-ms-client-request-id" : "dc6890a2-938b-4634-a91f-cb38a86171e6" }, "Exception" : null } ], - "variables" : [ "fileapitestsstartcopyfileapitestsstartcopy0857329927a52", "fileapitestsstartcopyfileapitestsstartcopy08504293b9e75" ] + "variables" : [ "fileapitestsstartcopyfileapitestsstartcopyc3702734e4387", "fileapitestsstartcopyfileapitestsstartcopyc3762971d6a8a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadAndDownloadToFileDoesNotExist.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadAndDownloadToFileDoesNotExist.json index 56ccc6f91981..28f8e2298db6 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadAndDownloadToFileDoesNotExist.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadAndDownloadToFileDoesNotExist.json @@ -1,147 +1,143 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist894649465?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist38239eeea?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "08bf7b3b-e17b-436b-a305-9f9ed300aa81" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "7b76ecdf-489f-43f2-a370-de91ba23a4ea" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B69350A4E\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:28 GMT", + "ETag" : "\"0x8D745F3D182EA68\"", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "0733995f-301a-000d-7f44-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", - "x-ms-client-request-id" : "08bf7b3b-e17b-436b-a305-9f9ed300aa81" + "x-ms-request-id" : "3dee36de-d01a-001d-0edc-77e99c000000", + "Date" : "Mon, 30 Sep 2019 22:16:18 GMT", + "x-ms-client-request-id" : "7b76ecdf-489f-43f2-a370-de91ba23a4ea" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist894649465/fileapitestsuploadanddownloadtofiledoesnotexist85123d3a0", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist38239eeea/fileapitestsuploadanddownloadtofiledoesnotexist585867025", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "87b301e8-fab4-4c44-af4b-b1e8d33d806f" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "bd60f4bf-3f8b-4a8d-8d28-71ea7c8508f2" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:47:28.5926531Z", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:28 GMT", + "x-ms-file-creation-time" : "2019-09-30T22:16:19.3587474Z", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:19 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", - "ETag" : "\"0x8D7325B69479683\"", + "Date" : "Mon, 30 Sep 2019 22:16:18 GMT", + "ETag" : "\"0x8D745F3D1B07912\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:47:28.5926531Z", + "x-ms-file-change-time" : "2019-09-30T22:16:19.3587474Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "07339962-301a-000d-0144-645aef000000", - "x-ms-client-request-id" : "87b301e8-fab4-4c44-af4b-b1e8d33d806f", - "x-ms-file-last-write-time" : "2019-09-05T23:47:28.5926531Z" + "x-ms-request-id" : "3dee36e1-d01a-001d-0fdc-77e99c000000", + "x-ms-client-request-id" : "bd60f4bf-3f8b-4a8d-8d28-71ea7c8508f2", + "x-ms-file-last-write-time" : "2019-09-30T22:16:19.3587474Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist894649465/fileapitestsuploadanddownloadtofiledoesnotexist85123d3a0?comp=range", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist38239eeea/fileapitestsuploadanddownloadtofiledoesnotexist585867025?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b5dcfc73-6dcd-45e0-9930-b18de3e77b62", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "ee0766f3-9f2f-4ae9-aa4c-88fcb52bf665", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B6955A064\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:28 GMT", + "ETag" : "\"0x8D745F3D1BAB4B6\"", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "07339964-301a-000d-0344-645aef000000", + "x-ms-request-id" : "3dee36e3-d01a-001d-10dc-77e99c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", - "x-ms-client-request-id" : "b5dcfc73-6dcd-45e0-9930-b18de3e77b62", + "Date" : "Mon, 30 Sep 2019 22:16:19 GMT", + "x-ms-client-request-id" : "ee0766f3-9f2f-4ae9-aa4c-88fcb52bf665", "Content-MD5" : "1tRkiflHQxQzG0ItV6HNAg==" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist894649465/fileapitestsuploadanddownloadtofiledoesnotexist85123d3a0", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist38239eeea/fileapitestsuploadanddownloadtofiledoesnotexist585867025", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "341e39b4-4e61-4d9d-8468-a562506e4075" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "b01675b8-4bc0-44c1-9d86-1efe7ee6798d" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:47:28.5926531Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:28 GMT", + "x-ms-file-creation-time" : "2019-09-30T22:16:19.3587474Z", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", + "Date" : "Mon, 30 Sep 2019 22:16:19 GMT", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D7325B6955A064\"", + "ETag" : "\"0x8D745F3D1BAB4B6\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:47:28.5926531Z", + "x-ms-file-change-time" : "2019-09-30T22:16:19.3587474Z", "x-ms-file-parent-id" : "0", "Content-Length" : "28", - "x-ms-request-id" : "07339965-301a-000d-0444-645aef000000", - "x-ms-client-request-id" : "341e39b4-4e61-4d9d-8468-a562506e4075", - "x-ms-file-last-write-time" : "2019-09-05T23:47:28.5926531Z", + "x-ms-request-id" : "3dee36e5-d01a-001d-12dc-77e99c000000", + "x-ms-client-request-id" : "b01675b8-4bc0-44c1-9d86-1efe7ee6798d", + "x-ms-file-last-write-time" : "2019-09-30T22:16:19.3587474Z", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist894649465/fileapitestsuploadanddownloadtofiledoesnotexist85123d3a0", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileapitestsuploadanddownloadtofiledoesnotexist38239eeea/fileapitestsuploadanddownloadtofiledoesnotexist585867025", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1ecc14e1-36ed-47ba-a925-757d1f9aecd8" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "dc5c3365-4042-400b-903c-c08ad5e7ee4a" }, "Response" : { - "x-ms-lease-status" : "unlocked", + "x-ms-version" : "2019-02-02", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:47:28.5926531Z", + "x-ms-file-creation-time" : "2019-09-30T22:16:19.3587474Z", "Content-Range" : "bytes 0-27/28", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 05 Sep 2019 23:47:28 GMT", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:19 GMT", "retry-after" : "0", "StatusCode" : "206", - "x-ms-file-attributes" : "Archive", - "Content-Length" : "28", - "x-ms-request-id" : "07339966-301a-000d-0544-645aef000000", - "Body" : "[68, 111, 119, 110, 108, 111, 97, 100, 32, 102, 105, 108, 101, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 101, 120, 105, 115, 116]", - "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "Date" : "Thu, 05 Sep 2019 23:47:28 GMT", + "Date" : "Mon, 30 Sep 2019 22:16:19 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D7325B6955A064\"", - "x-ms-file-change-time" : "2019-09-05T23:47:28.5926531Z", + "ETag" : "\"0x8D745F3D1BAB4B6\"", + "x-ms-file-attributes" : "Archive", + "x-ms-file-change-time" : "2019-09-30T22:16:19.3587474Z", "x-ms-file-parent-id" : "0", - "x-ms-client-request-id" : "1ecc14e1-36ed-47ba-a925-757d1f9aecd8", - "x-ms-file-last-write-time" : "2019-09-05T23:47:28.5926531Z" + "Content-Length" : "28", + "x-ms-request-id" : "3dee36e6-d01a-001d-13dc-77e99c000000", + "Body" : "[68, 111, 119, 110, 108, 111, 97, 100, 32, 102, 105, 108, 101, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 101, 120, 105, 115, 116]", + "x-ms-client-request-id" : "dc5c3365-4042-400b-903c-c08ad5e7ee4a", + "x-ms-file-last-write-time" : "2019-09-30T22:16:19.3587474Z", + "Content-Type" : "application/octet-stream" }, "Exception" : null } ], - "variables" : [ "fileapitestsuploadanddownloadtofiledoesnotexist894649465", "fileapitestsuploadanddownloadtofiledoesnotexist85123d3a0" ] + "variables" : [ "fileapitestsuploadanddownloadtofiledoesnotexist38239eeea", "fileapitestsuploadanddownloadtofiledoesnotexist585867025" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadRangeFromURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadRangeFromURL.json index 5808282652b6..a1b2893a0968 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadRangeFromURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAPITestsUploadRangeFromURL.json @@ -1,165 +1,165 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "dca7fde2-5eed-45c5-bbe4-cedb34b377f9" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "dee2e91f-d8d8-4912-827d-1183c747865b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D733215FCE6516\"", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "ETag" : "\"0x8D73C97FC269024\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "331125ff-701a-0041-360a-65cadf000000", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", - "x-ms-client-request-id" : "dca7fde2-5eed-45c5-bbe4-cedb34b377f9" + "x-ms-request-id" : "d09f5df2-601a-003f-7a80-6e784e000000", + "Date" : "Thu, 19 Sep 2019 00:26:15 GMT", + "x-ms-client-request-id" : "dee2e91f-d8d8-4912-827d-1183c747865b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df/fileapitestsuploadrangefromurl20498ec73ece50b8b", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade/fileapitestsuploadrangefromurl30612df71813b0467", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "60dd9eb5-9f4f-4770-b756-1c0d06e159e7" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "fa547a06-e31b-4002-8b57-9a717f16e79f" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:33.2728000Z", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:26:16.5529175Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", - "ETag" : "\"0x8D733215FF02EC0\"", + "Date" : "Thu, 19 Sep 2019 00:26:15 GMT", + "ETag" : "\"0x8D73C97FC38E257\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:33.2728000Z", + "x-ms-file-change-time" : "2019-09-19T00:26:16.5529175Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "3311260b-701a-0041-400a-65cadf000000", - "x-ms-client-request-id" : "60dd9eb5-9f4f-4770-b756-1c0d06e159e7", - "x-ms-file-last-write-time" : "2019-09-06T23:24:33.2728000Z" + "x-ms-request-id" : "d09f5df4-601a-003f-7b80-6e784e000000", + "x-ms-client-request-id" : "fa547a06-e31b-4002-8b57-9a717f16e79f", + "x-ms-file-last-write-time" : "2019-09-19T00:26:16.5529175Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df/fileapitestsuploadrangefromurl20498ec73ece50b8b?comp=range", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade/fileapitestsuploadrangefromurl30612df71813b0467?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "dea759b1-ad4c-4ada-9b48-5ca44d4f56f7", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8600056d-937a-4136-957f-a6525e28ac9a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D733216000A977\"", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "ETag" : "\"0x8D73C97FC478AFD\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "33112614-701a-0041-480a-65cadf000000", + "x-ms-request-id" : "d09f5df5-601a-003f-7c80-6e784e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", - "x-ms-client-request-id" : "dea759b1-ad4c-4ada-9b48-5ca44d4f56f7", + "Date" : "Thu, 19 Sep 2019 00:26:16 GMT", + "x-ms-client-request-id" : "8600056d-937a-4136-957f-a6525e28ac9a", "Content-MD5" : "nhB9nTcrtoJr2B01QqQZ1g==" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df/destination", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade/fileapitestsuploadrangefromurl30612df71813b0467", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d4fcd06b-7a7b-4c24-8e40-4678130404c1" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c3d744ed-5980-4e84-90ff-503e0ee239a3" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "x-ms-file-id" : "11529285414812647424", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", + "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:33.4907986Z", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:26:16.8361180Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", - "ETag" : "\"0x8D7332160117252\"", + "Date" : "Thu, 19 Sep 2019 00:26:16 GMT", + "ETag" : "\"0x8D73C97FC6418DC\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:33.4907986Z", + "x-ms-file-change-time" : "2019-09-19T00:26:16.8361180Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "33112617-701a-0041-4b0a-65cadf000000", - "x-ms-client-request-id" : "d4fcd06b-7a7b-4c24-8e40-4678130404c1", - "x-ms-file-last-write-time" : "2019-09-06T23:24:33.4907986Z" + "x-ms-request-id" : "d09f5e02-601a-003f-0980-6e784e000000", + "x-ms-client-request-id" : "c3d744ed-5980-4e84-90ff-503e0ee239a3", + "x-ms-file-last-write-time" : "2019-09-19T00:26:16.8361180Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df/destination?comp=range", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade/fileapitestsuploadrangefromurl30612df71813b0467?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4e9324d6-1853-41db-80c4-dc5540b80f97" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "716e80d9-a139-4c0b-bbf6-9d222d49ad23" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D733216024AC2B\"", - "x-ms-content-crc64" : "FGyQadqPVsk=", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "ETag" : "\"0x8D73C97FC8BF35C\"", + "x-ms-content-crc64" : "9TRwg1LzFO0=", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "3311261c-701a-0041-500a-65cadf000000", + "x-ms-request-id" : "d09f5e03-601a-003f-0a80-6e784e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", - "x-ms-client-request-id" : "4e9324d6-1853-41db-80c4-dc5540b80f97" + "Date" : "Thu, 19 Sep 2019 00:26:16 GMT", + "x-ms-client-request-id" : "716e80d9-a139-4c0b-bbf6-9d222d49ad23" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://gapradev.file.core.windows.net/fileapitestsuploadrangefromurl66710b0eb9528d3df/destination", + "Uri" : "https://sima.file.core.windows.net/fileapitestsuploadrangefromurl57216630b6f444ade/fileapitestsuploadrangefromurl30612df71813b0467", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7f8ba1b5-89b1-41fc-a7fd-7ec66f269983" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "476a2b35-7368-4f7b-8c1c-fbba877d9bde" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "x-ms-file-id" : "11529285414812647424", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", + "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:33.4907986Z", + "x-ms-file-creation-time" : "2019-09-19T00:26:16.8361180Z", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:33 GMT", + "Last-Modified" : "Thu, 19 Sep 2019 00:26:17 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 06 Sep 2019 23:24:32 GMT", + "Date" : "Thu, 19 Sep 2019 00:26:16 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D733216024AC2B\"", + "ETag" : "\"0x8D73C97FC8BF35C\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:33.4907986Z", + "x-ms-file-change-time" : "2019-09-19T00:26:16.8361180Z", "x-ms-file-parent-id" : "0", "Content-Length" : "1024", - "x-ms-request-id" : "33112620-701a-0041-540a-65cadf000000", - "Body" : "[117, 105, 99, 107, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", - "x-ms-client-request-id" : "7f8ba1b5-89b1-41fc-a7fd-7ec66f269983", - "x-ms-file-last-write-time" : "2019-09-06T23:24:33.4907986Z", + "x-ms-request-id" : "d09f5e04-601a-003f-0b80-6e784e000000", + "Body" : "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", + "x-ms-client-request-id" : "476a2b35-7368-4f7b-8c1c-fbba877d9bde", + "x-ms-file-last-write-time" : "2019-09-19T00:26:16.8361180Z", "Content-Type" : "application/octet-stream" }, "Exception" : null } ], - "variables" : [ "fileapitestsuploadrangefromurl66710b0eb9528d3df", "fileapitestsuploadrangefromurl20498ec73ece50b8b", "2019-09-06T23:24:33.430Z" ] + "variables" : [ "fileapitestsuploadrangefromurl57216630b6f444ade", "fileapitestsuploadrangefromurl30612df71813b0467", "2019-09-19T00:26:16.721Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError.json new file mode 100644 index 000000000000..96f47b1c61f0 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError.json @@ -0,0 +1,48 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestscreatefilewithargserror0901404fd2eb?restype=share", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "41d188d2-81fd-4bc1-be35-947583a1f221" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D7420883DD4181\"", + "Last-Modified" : "Wed, 25 Sep 2019 22:34:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6d52a63e-201a-002a-6df1-734533000000", + "Date" : "Wed, 25 Sep 2019 22:34:23 GMT", + "x-ms-client-request-id" : "41d188d2-81fd-4bc1-be35-947583a1f221" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestscreatefilewithargserror0901404fd2eb/fileasyncapitestscreatefilewithargserror43718206fe6d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6e104243-cf87-4b7b-8789-c5a80639b993" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "Connection" : "close", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "Content-Length" : "236", + "StatusCode" : "400", + "x-ms-request-id" : "6d52a641-201a-002a-6ef1-734533000000", + "Body" : "OutOfRangeInputThe file size exceeds the maximum permissible limit.\nRequestId:6d52a641-201a-002a-6ef1-734533000000\nTime:2019-09-25T22:34:23.8774540Z", + "Date" : "Wed, 25 Sep 2019 22:34:23 GMT", + "x-ms-client-request-id" : "6e104243-cf87-4b7b-8789-c5a80639b993", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "fileasyncapitestscreatefilewithargserror0901404fd2eb", "fileasyncapitestscreatefilewithargserror43718206fe6d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError0.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError0.json deleted file mode 100644 index f6b07f075540..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError0.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestscreatefilewithargserror00916482feaeb?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6937cff9-849d-469b-92c0-af56724b0fe8" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B8B9C7939\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "07339d29-301a-000d-0f44-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:48:25 GMT", - "x-ms-client-request-id" : "6937cff9-849d-469b-92c0-af56724b0fe8" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestscreatefilewithargserror00916482feaeb/fileasyncapitestscreatefilewithargserror000971fc4580e", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6681e48f-805c-4585-b519-047a26b50cc9" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "OutOfRangeInput", - "retry-after" : "0", - "Content-Length" : "236", - "StatusCode" : "400", - "x-ms-request-id" : "07339d2c-301a-000d-1144-645aef000000", - "Body" : "OutOfRangeInputThe file size exceeds the maximum permissible limit.\nRequestId:07339d2c-301a-000d-1144-645aef000000\nTime:2019-09-05T23:48:26.2825031Z", - "Date" : "Thu, 05 Sep 2019 23:48:25 GMT", - "x-ms-client-request-id" : "6681e48f-805c-4585-b519-047a26b50cc9", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fileasyncapitestscreatefilewithargserror00916482feaeb", "fileasyncapitestscreatefilewithargserror000971fc4580e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError1.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError1.json deleted file mode 100644 index b4a6be711aac..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsCreateFileWithArgsError1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestscreatefilewithargserror1711601ce812e?restype=share", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1fd77cdf-c993-4183-bf98-9827e2b8fc96" - }, - "Response" : { - "x-ms-version" : "2019-02-02", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B8BD319D9\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "07339d2f-301a-000d-1444-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:48:25 GMT", - "x-ms-client-request-id" : "1fd77cdf-c993-4183-bf98-9827e2b8fc96" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestscreatefilewithargserror1711601ce812e/fileasyncapitestscreatefilewithargserror10218680d5cd4", - "Headers" : { - "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3fbc2f45-0e75-4a05-9a21-545eab341063" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "973", - "StatusCode" : "403", - "x-ms-request-id" : "07339d31-301a-000d-1544-645aef000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:07339d31-301a-000d-1544-645aef000000\nTime:2019-09-05T23:48:26.6395010ZThe MAC signature found in the HTTP request 'ZEAECUEBpWwJ8CsMcKmiXX+XasmxDV3dNXusdXwasqM=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nThu, 05 Sep 2019 23:48:26 GMT\n\n\n\n\n\nx-ms-client-request-id:3fbc2f45-0e75-4a05-9a21-545eab341063\nx-ms-content-length:1024\nx-ms-file-attributes:None\nx-ms-file-creation-time:Now\nx-ms-file-last-write-time:Now\nx-ms-file-permission:Inherit\nx-ms-meta-testmeta:value\nx-ms-type:file\nx-ms-version:2019-02-02\n/gapradev/fileasyncapitestscreatefilewithargserror1711601ce812e/fileasyncapitestscreatefilewithargserror10218680d5cd4'.", - "Date" : "Thu, 05 Sep 2019 23:48:26 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fileasyncapitestscreatefilewithargserror1711601ce812e", "fileasyncapitestscreatefilewithargserror10218680d5cd4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsGetFileURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsGetFileURL.json index d18e45b6fb87..349594635aef 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsGetFileURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsGetFileURL.json @@ -1,25 +1,25 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsgetfileurl81506d885ba9e991941?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsgetfileurl95604faefab87fc974c?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f2ff769f-2915-4d9f-8bd5-50361dd687cf" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "08118b6f-c307-4479-8182-dd266c818ada" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B8A878656\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:24 GMT", + "ETag" : "\"0x8D73C987A49A8FD\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:29:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "07339d0a-301a-000d-7744-645aef000000", - "Date" : "Thu, 05 Sep 2019 23:48:23 GMT", - "x-ms-client-request-id" : "f2ff769f-2915-4d9f-8bd5-50361dd687cf" + "x-ms-request-id" : "6af092fd-c01a-0093-4c81-6e59d9000000", + "Date" : "Thu, 19 Sep 2019 00:29:47 GMT", + "x-ms-client-request-id" : "08118b6f-c307-4479-8182-dd266c818ada" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsgetfileurl81506d885ba9e991941", "fileasyncapitestsgetfileurl7841295a20624f23a46" ] + "variables" : [ "fileasyncapitestsgetfileurl95604faefab87fc974c", "fileasyncapitestsgetfileurl95924fb0c12a1972e42" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json index 3f5155dd77f4..48e0d915e072 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsStartCopy.json @@ -1,77 +1,77 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsstartcopy57082e03ebd98ee8e45?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsstartcopy8767467fb900fd2d344?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0f50659b-d4bd-4d19-8d63-61571a1bc8a0" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9ac9e6ea-e519-4d9e-a068-a450412031b3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B90298A85\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "ETag" : "\"0x8D73C98A5B8B183\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "36c455a0-601a-0000-2e44-64923b000000", - "Date" : "Thu, 05 Sep 2019 23:48:33 GMT", - "x-ms-client-request-id" : "0f50659b-d4bd-4d19-8d63-61571a1bc8a0" + "x-ms-request-id" : "49f09e7a-701a-00a3-3081-6e03f3000000", + "Date" : "Thu, 19 Sep 2019 00:31:00 GMT", + "x-ms-client-request-id" : "9ac9e6ea-e519-4d9e-a068-a450412031b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsstartcopy57082e03ebd98ee8e45/fileasyncapitestsstartcopy099130d84e68aa88b4d", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsstartcopy8767467fb900fd2d344/fileasyncapitestsstartcopy37364dbdbed253fca47", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "25862d43-e2f4-4b46-b2d7-62590fb97110" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "26079573-d370-42ae-8d17-f718a276f748" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:48:33.9333528Z", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:31:01.0276350Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:01 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:48:33 GMT", - "ETag" : "\"0x8D7325B9039C998\"", + "Date" : "Thu, 19 Sep 2019 00:31:00 GMT", + "ETag" : "\"0x8D73C98A5C847FE\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:48:33.9333528Z", + "x-ms-file-change-time" : "2019-09-19T00:31:01.0276350Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "36c455a3-601a-0000-3044-64923b000000", - "x-ms-client-request-id" : "25862d43-e2f4-4b46-b2d7-62590fb97110", - "x-ms-file-last-write-time" : "2019-09-05T23:48:33.9333528Z" + "x-ms-request-id" : "49f09e7c-701a-00a3-3181-6e03f3000000", + "x-ms-client-request-id" : "26079573-d370-42ae-8d17-f718a276f748", + "x-ms-file-last-write-time" : "2019-09-19T00:31:01.0276350Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsstartcopy57082e03ebd98ee8e45/fileasyncapitestsstartcopy099130d84e68aa88b4d", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsstartcopy8767467fb900fd2d344/fileasyncapitestsstartcopy37364dbdbed253fca47", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3dff7c21-ac07-4055-a3c7-660541508f51" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c2d20f51-0287-4fd3-8f1a-519c8b5bb5a9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "576692fc-2218-43f5-a96e-c3a4d8c249d3", - "ETag" : "\"0x8D7325B90D9B447\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:34 GMT", + "x-ms-copy-id" : "f4a6c242-3ee8-479f-b533-5431a0ab0c8c", + "ETag" : "\"0x8D73C98A5FBE470\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:01 GMT", "retry-after" : "0", "Content-Length" : "0", "x-ms-copy-status" : "success", "StatusCode" : "202", - "x-ms-request-id" : "36c455a6-601a-0000-3344-64923b000000", - "Date" : "Thu, 05 Sep 2019 23:48:34 GMT", - "x-ms-client-request-id" : "3dff7c21-ac07-4055-a3c7-660541508f51" + "x-ms-request-id" : "49f09e7d-701a-00a3-3281-6e03f3000000", + "Date" : "Thu, 19 Sep 2019 00:31:00 GMT", + "x-ms-client-request-id" : "c2d20f51-0287-4fd3-8f1a-519c8b5bb5a9" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsstartcopy57082e03ebd98ee8e45", "fileasyncapitestsstartcopy099130d84e68aa88b4d" ] + "variables" : [ "fileasyncapitestsstartcopy8767467fb900fd2d344", "fileasyncapitestsstartcopy37364dbdbed253fca47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadAndDownloadToFileDoesNotExist.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadAndDownloadToFileDoesNotExist.json index b603bdae0e63..7c29df329ac8 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadAndDownloadToFileDoesNotExist.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadAndDownloadToFileDoesNotExist.json @@ -1,147 +1,143 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist807186?restype=share", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f31b1dd6-c77a-40f9-b3c1-026b6fbc2fe2" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6fbbc37f-d04e-422b-bc6a-9ab87f82c305" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B8FC39CA1\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "ETag" : "\"0x8D745F3D6810725\"", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "36c45584-601a-0000-1344-64923b000000", - "Date" : "Thu, 05 Sep 2019 23:48:32 GMT", - "x-ms-client-request-id" : "f31b1dd6-c77a-40f9-b3c1-026b6fbc2fe2" + "x-ms-request-id" : "b84f76b6-a01a-011d-3cdc-77afc9000000", + "Date" : "Mon, 30 Sep 2019 22:16:27 GMT", + "x-ms-client-request-id" : "6fbbc37f-d04e-422b-bc6a-9ab87f82c305" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist807186/fileasyncapitestsuploadanddownloadtofiledoesnotexist30322a", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d/fileasyncapitestsuploadanddownloadtofiledoesnotexist445763", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "16565298-e652-43ed-b6b1-546d2c6cc57d" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "9c181278-d914-42fb-b447-5dae85697c08" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:48:33.2723377Z", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "x-ms-file-creation-time" : "2019-09-30T22:16:28.3011624Z", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:48:32 GMT", - "ETag" : "\"0x8D7325B8FD4ECB1\"", + "Date" : "Mon, 30 Sep 2019 22:16:27 GMT", + "ETag" : "\"0x8D745F3D704FA28\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:48:33.2723377Z", + "x-ms-file-change-time" : "2019-09-30T22:16:28.3011624Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "36c45589-601a-0000-1744-64923b000000", - "x-ms-client-request-id" : "16565298-e652-43ed-b6b1-546d2c6cc57d", - "x-ms-file-last-write-time" : "2019-09-05T23:48:33.2723377Z" + "x-ms-request-id" : "b84f76b9-a01a-011d-3ddc-77afc9000000", + "x-ms-client-request-id" : "9c181278-d914-42fb-b447-5dae85697c08", + "x-ms-file-last-write-time" : "2019-09-30T22:16:28.3011624Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist807186/fileasyncapitestsuploadanddownloadtofiledoesnotexist30322a?comp=range", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d/fileasyncapitestsuploadanddownloadtofiledoesnotexist445763?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "93a47566-788c-4ddc-bcc9-fb89195a90a5", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "a0819311-ced4-404c-8ad2-1260e4e4bc00", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7325B8FE3B9C8\"", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "ETag" : "\"0x8D745F3D7126ADB\"", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "36c45590-601a-0000-1e44-64923b000000", + "x-ms-request-id" : "b84f76ba-a01a-011d-3edc-77afc9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 05 Sep 2019 23:48:32 GMT", - "x-ms-client-request-id" : "93a47566-788c-4ddc-bcc9-fb89195a90a5", + "Date" : "Mon, 30 Sep 2019 22:16:27 GMT", + "x-ms-client-request-id" : "a0819311-ced4-404c-8ad2-1260e4e4bc00", "Content-MD5" : "1tRkiflHQxQzG0ItV6HNAg==" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist807186/fileasyncapitestsuploadanddownloadtofiledoesnotexist30322a", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d/fileasyncapitestsuploadanddownloadtofiledoesnotexist445763", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7e9a2fae-0c62-46e8-a822-870e4b1b02b5" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "8bb031ed-556a-4cdb-8854-64f9a4efa7dd" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:48:33.2723377Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "x-ms-file-creation-time" : "2019-09-30T22:16:28.3011624Z", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:28 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Thu, 05 Sep 2019 23:48:32 GMT", + "Date" : "Mon, 30 Sep 2019 22:16:27 GMT", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D7325B8FE3B9C8\"", + "ETag" : "\"0x8D745F3D7126ADB\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-05T23:48:33.2723377Z", + "x-ms-file-change-time" : "2019-09-30T22:16:28.3011624Z", "x-ms-file-parent-id" : "0", "Content-Length" : "28", - "x-ms-request-id" : "36c45593-601a-0000-2144-64923b000000", - "x-ms-client-request-id" : "7e9a2fae-0c62-46e8-a822-870e4b1b02b5", - "x-ms-file-last-write-time" : "2019-09-05T23:48:33.2723377Z", + "x-ms-request-id" : "b84f76bb-a01a-011d-3fdc-77afc9000000", + "x-ms-client-request-id" : "8bb031ed-556a-4cdb-8854-64f9a4efa7dd", + "x-ms-file-last-write-time" : "2019-09-30T22:16:28.3011624Z", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gapradev.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist807186/fileasyncapitestsuploadanddownloadtofiledoesnotexist30322a", + "Uri" : "https://azstoragesdkaccount.file.core.windows.net/fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d/fileasyncapitestsuploadanddownloadtofiledoesnotexist445763", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "989aecf7-be07-406b-aabf-5cf1e7f91242" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "de02aa8e-eae7-402c-99dc-6aa466c20fd9" }, "Response" : { - "x-ms-lease-status" : "unlocked", + "x-ms-version" : "2019-02-02", + "x-ms-file-permission-key" : "2189138948451189390*13168958551941065216", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-05T23:48:33.2723377Z", + "x-ms-file-creation-time" : "2019-09-30T22:16:28.3011624Z", "Content-Range" : "bytes 0-27/28", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 05 Sep 2019 23:48:33 GMT", + "Last-Modified" : "Mon, 30 Sep 2019 22:16:28 GMT", "retry-after" : "0", "StatusCode" : "206", - "x-ms-file-attributes" : "Archive", - "Content-Length" : "28", - "x-ms-request-id" : "36c45598-601a-0000-2644-64923b000000", - "Body" : "[68, 111, 119, 110, 108, 111, 97, 100, 32, 102, 105, 108, 101, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 101, 120, 105, 115, 116]", - "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "Date" : "Thu, 05 Sep 2019 23:48:32 GMT", + "Date" : "Mon, 30 Sep 2019 22:16:27 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D7325B8FE3B9C8\"", - "x-ms-file-change-time" : "2019-09-05T23:48:33.2723377Z", + "ETag" : "\"0x8D745F3D7126ADB\"", + "x-ms-file-attributes" : "Archive", + "x-ms-file-change-time" : "2019-09-30T22:16:28.3011624Z", "x-ms-file-parent-id" : "0", - "x-ms-client-request-id" : "989aecf7-be07-406b-aabf-5cf1e7f91242", - "x-ms-file-last-write-time" : "2019-09-05T23:48:33.2723377Z" + "Content-Length" : "28", + "x-ms-request-id" : "b84f76bc-a01a-011d-40dc-77afc9000000", + "Body" : "[68, 111, 119, 110, 108, 111, 97, 100, 32, 102, 105, 108, 101, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 101, 120, 105, 115, 116]", + "x-ms-client-request-id" : "de02aa8e-eae7-402c-99dc-6aa466c20fd9", + "x-ms-file-last-write-time" : "2019-09-30T22:16:28.3011624Z", + "Content-Type" : "application/octet-stream" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsuploadanddownloadtofiledoesnotexist807186", "fileasyncapitestsuploadanddownloadtofiledoesnotexist30322a" ] + "variables" : [ "fileasyncapitestsuploadanddownloadtofiledoesnotexist17992d", "fileasyncapitestsuploadanddownloadtofiledoesnotexist445763" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadRangeFromURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadRangeFromURL.json index cb936031862c..ca2908c3cb03 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadRangeFromURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/FileAsyncAPITestsUploadRangeFromURL.json @@ -1,165 +1,165 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace?restype=share", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf?restype=share", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "42f8e1a9-44b7-435f-95a5-e07aac3a0b30" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "711f948a-42a8-4b19-9946-e17bbeedf1d7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D7332162D82443\"", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "ETag" : "\"0x8D73C98A50D122B\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:30:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "331126b8-701a-0041-640a-65cadf000000", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", - "x-ms-client-request-id" : "42f8e1a9-44b7-435f-95a5-e07aac3a0b30" + "x-ms-request-id" : "49f09e6c-701a-00a3-2781-6e03f3000000", + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", + "x-ms-client-request-id" : "711f948a-42a8-4b19-9946-e17bbeedf1d7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace/fileasyncapitestsuploadrangefromurl27259f30be6a780", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf/fileasyncapitestsuploadrangefromurl4476200ffd8cbd6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2e8cc920-55ee-43c4-9696-9acc32b808bf" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "c7fc393d-c247-4805-80a0-6cf462049fbd" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:38.3757728Z", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:30:59.9028420Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:30:59 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", - "ETag" : "\"0x8D7332162FAD5A0\"", + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", + "ETag" : "\"0x8D73C98A51CA6C4\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:38.3757728Z", + "x-ms-file-change-time" : "2019-09-19T00:30:59.9028420Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "331126c3-701a-0041-6e0a-65cadf000000", - "x-ms-client-request-id" : "2e8cc920-55ee-43c4-9696-9acc32b808bf", - "x-ms-file-last-write-time" : "2019-09-06T23:24:38.3757728Z" + "x-ms-request-id" : "49f09e6e-701a-00a3-2881-6e03f3000000", + "x-ms-client-request-id" : "c7fc393d-c247-4805-80a0-6cf462049fbd", + "x-ms-file-last-write-time" : "2019-09-19T00:30:59.9028420Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace/fileasyncapitestsuploadrangefromurl27259f30be6a780?comp=range", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf/fileasyncapitestsuploadrangefromurl4476200ffd8cbd6?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9a2a87aa-7f43-42e0-98b8-f1bfa227b50c", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "cf7d422a-6e59-4bc9-8b6e-a55cbb548b09", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D73321630CFE06\"", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "ETag" : "\"0x8D73C98A52BEBCA\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "331126ca-701a-0041-740a-65cadf000000", + "x-ms-request-id" : "49f09e6f-701a-00a3-2981-6e03f3000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", - "x-ms-client-request-id" : "9a2a87aa-7f43-42e0-98b8-f1bfa227b50c", + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", + "x-ms-client-request-id" : "cf7d422a-6e59-4bc9-8b6e-a55cbb548b09", "Content-MD5" : "nhB9nTcrtoJr2B01QqQZ1g==" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace/destination", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf/fileasyncapitestsuploadrangefromurl4476200ffd8cbd6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "5a47d917-1071-4ebc-a748-f5a101bcddfd" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "1300ca2e-d4ec-4a47-ae52-bccb9c70cd24" }, "Response" : { "x-ms-version" : "2019-02-02", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "x-ms-file-id" : "11529285414812647424", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", + "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:38.6047663Z", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "x-ms-file-creation-time" : "2019-09-19T00:31:00.2010519Z", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:00 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", - "ETag" : "\"0x8D73321631DC6AF\"", + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", + "ETag" : "\"0x8D73C98A54A2797\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:38.6047663Z", + "x-ms-file-change-time" : "2019-09-19T00:31:00.2010519Z", "x-ms-file-parent-id" : "0", "Content-Length" : "0", - "x-ms-request-id" : "331126d0-701a-0041-7a0a-65cadf000000", - "x-ms-client-request-id" : "5a47d917-1071-4ebc-a748-f5a101bcddfd", - "x-ms-file-last-write-time" : "2019-09-06T23:24:38.6047663Z" + "x-ms-request-id" : "49f09e70-701a-00a3-2a81-6e03f3000000", + "x-ms-client-request-id" : "1300ca2e-d4ec-4a47-ae52-bccb9c70cd24", + "x-ms-file-last-write-time" : "2019-09-19T00:31:00.2010519Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace/destination?comp=range", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf/fileasyncapitestsuploadrangefromurl4476200ffd8cbd6?comp=range", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ca6bd47f-957a-4bfe-9112-4a8c4dbfcb80" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "95dacacc-3188-48ee-bd8a-11bd87e94154" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D73321632D7E20\"", - "x-ms-content-crc64" : "FGyQadqPVsk=", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "ETag" : "\"0x8D73C98A56B4A33\"", + "x-ms-content-crc64" : "9TRwg1LzFO0=", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "331126d7-701a-0041-010a-65cadf000000", + "x-ms-request-id" : "49f09e72-701a-00a3-2b81-6e03f3000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", - "x-ms-client-request-id" : "ca6bd47f-957a-4bfe-9112-4a8c4dbfcb80" + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", + "x-ms-client-request-id" : "95dacacc-3188-48ee-bd8a-11bd87e94154" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://gapradev.file.core.windows.net/fileasyncapitestsuploadrangefromurl70543608549dace/destination", + "Uri" : "https://sima.file.core.windows.net/fileasyncapitestsuploadrangefromurl5105760033c4eaf/fileasyncapitestsuploadrangefromurl4476200ffd8cbd6", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ee73da00-b5a7-4d2e-a78c-cfdb31f17f38" + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "9c7bc6ec-e969-4282-9ceb-e265dd00f877" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "15581347578553677299*8114634751575874941", - "x-ms-file-id" : "11529285414812647424", + "x-ms-file-permission-key" : "9147088710610530974*15442866184092965392", + "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2019-09-06T23:24:38.6047663Z", + "x-ms-file-creation-time" : "2019-09-19T00:31:00.2010519Z", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 06 Sep 2019 23:24:38 GMT", + "Last-Modified" : "Thu, 19 Sep 2019 00:31:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 06 Sep 2019 23:24:37 GMT", + "Date" : "Thu, 19 Sep 2019 00:30:59 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", - "ETag" : "\"0x8D73321632D7E20\"", + "ETag" : "\"0x8D73C98A56B4A33\"", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2019-09-06T23:24:38.6047663Z", + "x-ms-file-change-time" : "2019-09-19T00:31:00.2010519Z", "x-ms-file-parent-id" : "0", "Content-Length" : "1024", - "x-ms-request-id" : "331126dc-701a-0041-060a-65cadf000000", - "Body" : "[117, 105, 99, 107, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", - "x-ms-client-request-id" : "ee73da00-b5a7-4d2e-a78c-cfdb31f17f38", - "x-ms-file-last-write-time" : "2019-09-06T23:24:38.6047663Z", + "x-ms-request-id" : "49f09e74-701a-00a3-2c81-6e03f3000000", + "Body" : "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", + "x-ms-client-request-id" : "9c7bc6ec-e969-4282-9ceb-e265dd00f877", + "x-ms-file-last-write-time" : "2019-09-19T00:31:00.2010519Z", "Content-Type" : "application/octet-stream" }, "Exception" : null } ], - "variables" : [ "fileasyncapitestsuploadrangefromurl70543608549dace", "fileasyncapitestsuploadrangefromurl27259f30be6a780", "2019-09-06T23:24:38.547Z" ] + "variables" : [ "fileasyncapitestsuploadrangefromurl5105760033c4eaf", "fileasyncapitestsuploadrangefromurl4476200ffd8cbd6", "2019-09-19T00:31:00.084Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareSnapshotURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareSnapshotURL.json new file mode 100644 index 000000000000..7fe1ea5cc2a1 --- /dev/null +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareSnapshotURL.json @@ -0,0 +1,47 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/shareapitestsgetsharesnapshoturl69537a1f0f334e94?restype=share", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "76f4b343-1ed0-4e83-ace3-069aa390b3cf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C98DEACAEB9\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:32:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8d3f7652-701a-0009-0181-6ed51c000000", + "Date" : "Thu, 19 Sep 2019 00:32:35 GMT", + "x-ms-client-request-id" : "76f4b343-1ed0-4e83-ace3-069aa390b3cf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://sima.file.core.windows.net/shareapitestsgetsharesnapshoturl69537a1f0f334e94?restype=share&comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.4 1.8.0_221; Windows 10 10.0", + "x-ms-client-request-id" : "8b957bcd-7d87-4ac6-bddd-321fc7e2c0e5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-09-19T00:32:36.0000000Z", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "\"0x8D73C98DEACAEB9\"", + "Last-Modified" : "Thu, 19 Sep 2019 00:32:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8d3f7655-701a-0009-0281-6ed51c000000", + "Date" : "Thu, 19 Sep 2019 00:32:36 GMT", + "x-ms-client-request-id" : "8b957bcd-7d87-4ac6-bddd-321fc7e2c0e5" + }, + "Exception" : null + } ], + "variables" : [ "shareapitestsgetsharesnapshoturl69537a1f0f334e94" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareURL.json index a14cb5716830..07e1d48503ad 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAPITestsGetShareURL.json @@ -1,4 +1,4 @@ { "networkCallRecords" : [ ], - "variables" : [ "shareapitestsgetshareurlshareapitestsgetshareurl6c326282d7" ] + "variables" : [ "shareapitestsgetshareurlshareapitestsgetshareurlc1d2320895" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAsyncAPITestsGetShareURL.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAsyncAPITestsGetShareURL.json index 9061dfd4bc3f..7914cbb14b9d 100644 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAsyncAPITestsGetShareURL.json +++ b/sdk/storage/azure-storage-file/src/test/resources/session-records/ShareAsyncAPITestsGetShareURL.json @@ -1,4 +1,4 @@ { "networkCallRecords" : [ ], - "variables" : [ "shareasyncapitestsgetshareurl89742d2360dc3850e4" ] + "variables" : [ "shareasyncapitestsgetshareurl38528a2bffa88085f4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/src/test/resources/session-records/createFromFileClient.json b/sdk/storage/azure-storage-file/src/test/resources/session-records/createFromFileClient.json deleted file mode 100644 index 290acd437ef4..000000000000 --- a/sdk/storage/azure-storage-file/src/test/resources/session-records/createFromFileClient.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/filesharename/testdir%2ffile46052765", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_212; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D724DE73E05B70\"", - "Last-Modified" : "Mon, 19 Aug 2019 19:50:14 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "07d2b78c-e01a-0111-17c7-564138000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Mon, 19 Aug 2019 19:50:13 GMT" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://azstoragesdkaccount.file.core.windows.net/filesharename/testdir%2ffile46052765", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.3 1.8.0_212; Windows 10 10.0" - }, - "Response" : { - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D724DE73E05B70\"", - "Last-Modified" : "Mon, 19 Aug 2019 19:50:14 GMT", - "retry-after" : "0", - "Content-Length" : "1024", - "StatusCode" : "200", - "x-ms-request-id" : "07d2b78d-e01a-0111-18c7-564138000000", - "Date" : "Mon, 19 Aug 2019 19:50:13 GMT", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "file46052765" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file/swagger/README.md b/sdk/storage/azure-storage-file/swagger/README.md index 4f591f62e857..d82bed629ffa 100644 --- a/sdk/storage/azure-storage-file/swagger/README.md +++ b/sdk/storage/azure-storage-file/swagger/README.md @@ -33,6 +33,9 @@ generate-client-interfaces: false sync-methods: none license-header: MICROSOFT_MIT_SMALL add-context-parameter: true +models-subpackage: implementation.models +custom-types-subpackage: models +custom-types: HandleItem,FileHTTPHeaders,ShareItem,FileServiceProperties,CorsRule,ShareProperties,FileProperty,Range,CopyStatusType,SignedIdentifier,SourceModifiedAccessConditions,StorageErrorException,StorageErrorCode,StorageError,StorageServiceProperties ``` ### Query Parameters diff --git a/sdk/storage/azure-storage-queue/README.md b/sdk/storage/azure-storage-queue/README.md index d2371770f543..d34bed644e65 100644 --- a/sdk/storage/azure-storage-queue/README.md +++ b/sdk/storage/azure-storage-queue/README.md @@ -19,25 +19,32 @@ A single queue message can be up to 64 KB in size, and a queue can contain milli com.azure azure-storage-queue - 12.0.0-preview.3 + 12.0.0-preview.4 ``` ### Default HTTP Client -All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: +All client libraries, by default, use Netty HTTP client. Adding the above dependency will automatically configure +Storage Queue to use Netty HTTP client. + +### Alternate HTTP client +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Exclude the default +Netty and include OkHTTP client in your pom.xml. ```xml + - com.azure - azure-core-http-netty - 1.0.0-preview.4 + com.azure + azure-storage-queue + 12.0.0-preview.4 + + + com.azure + azure-core-http-netty + + -``` -This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. - -If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: - -```xml + com.azure azure-core-http-okhttp diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 5016144b5022..a6198200bef7 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -79,20 +79,32 @@ - java8storage + java8 [1.8,9) - org.apache.maven.plugins maven-compiler-plugin + ${maven-compiler-plugin.version} 1.8 1.8 + true + true + + -Xlint:all + -Xlint:-serial + -Xlint:-deprecation + -Xlint:-processing + + + module-info.java + + test-compile @@ -102,7 +114,6 @@ groovy-eclipse-compiler - -Xlint:unchecked @@ -113,7 +124,6 @@ groovy-eclipse-compiler - -Xlint:unchecked @@ -130,7 +140,6 @@
    - org.apache.maven.plugins maven-surefire-plugin @@ -148,6 +157,7 @@ + org.apache.maven.plugins maven-compiler-plugin @@ -163,7 +173,6 @@ groovy-eclipse-compiler - -Xlint:unchecked 8 @@ -175,7 +184,6 @@ groovy-eclipse-compiler - -Xlint:unchecked 8 diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index ce12dac6755c..570073cd4b09 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -2,38 +2,36 @@ // Licensed under the MIT License. package com.azure.storage.queue; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; +import com.azure.storage.queue.implementation.models.MessageIdUpdateHeaders; +import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; +import com.azure.storage.queue.implementation.models.QueueGetPropertiesHeaders; +import com.azure.storage.queue.implementation.models.QueuesGetPropertiesResponse; import com.azure.storage.queue.models.DequeuedMessage; import com.azure.storage.queue.models.EnqueuedMessage; -import com.azure.storage.queue.models.MessageIdUpdateHeaders; -import com.azure.storage.queue.models.MessageIdsUpdateResponse; import com.azure.storage.queue.models.PeekedMessage; -import com.azure.storage.queue.models.QueueGetPropertiesHeaders; import com.azure.storage.queue.models.QueueMessage; import com.azure.storage.queue.models.QueueProperties; -import com.azure.storage.queue.models.QueuesGetPropertiesResponse; import com.azure.storage.queue.models.SignedIdentifier; import com.azure.storage.queue.models.StorageException; import com.azure.storage.queue.models.UpdatedMessage; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; @@ -82,15 +80,9 @@ public final class QueueAsyncClient { /** * @return the URL of the storage queue - * @throws RuntimeException If the queue is using a malformed URL. - */ - public URL getQueueUrl() { - try { - return new URL(client.getUrl()); - } catch (MalformedURLException ex) { - logger.error("Queue URL is malformed"); - throw logger.logExceptionAsError(new RuntimeException("Queue URL is malformed")); - } + */ + public String getQueueUrl() { + return String.format("%s/%s", client.getUrl(), queueName); } /** @@ -759,11 +751,12 @@ Mono> deleteMessageWithResponse(String messageId, String popRecei /** * Generates a SAS token with the specified parameters * - * @param permissions The {@code QueueSASPermission} permission for the SAS + * @param permissions The {@code QueueSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredential} is null */ - public String generateSAS(QueueSASPermission permissions, OffsetDateTime expiryTime) { + public String generateSAS(QueueSasPermission permissions, OffsetDateTime expiryTime) { return this.generateSAS(null, permissions, expiryTime, null /* startTime */, /* identifier */ null /* version */, null /* sasProtocol */, null /* ipRange */); } @@ -773,6 +766,7 @@ public String generateSAS(QueueSASPermission permissions, OffsetDateTime expiryT * * @param identifier The {@code String} name of the access policy on the queue this SAS references if any * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredential} is null */ public String generateSAS(String identifier) { return this.generateSAS(identifier, null /* permissions */, null /* expiryTime */, null /* startTime */, @@ -784,24 +778,25 @@ public String generateSAS(String identifier) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.queue.queueAsyncClient.generateSAS#String-QueueSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange} + * {@codesnippet com.azure.storage.queue.queueAsyncClient.generateSAS#String-QueueSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the queue this SAS references if any - * @param permissions The {@code QueueSASPermission} permission for the SAS + * @param permissions The {@code QueueSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredential} is null */ - public String generateSAS(String identifier, QueueSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, QueueSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { - QueueServiceSASSignatureValues queueServiceSASSignatureValues = new QueueServiceSASSignatureValues(version, + QueueServiceSasSignatureValues queueServiceSASSignatureValues = new QueueServiceSasSignatureValues(version, sasProtocol, startTime, expiryTime, permissions == null ? null : permissions.toString(), ipRange, identifier); @@ -811,10 +806,10 @@ public String generateSAS(String identifier, QueueSASPermission permissions, Off Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); // Set canonical name - QueueServiceSASSignatureValues values = queueServiceSASSignatureValues + QueueServiceSasSignatureValues values = queueServiceSASSignatureValues .setCanonicalName(this.queueName, sharedKeyCredential.getAccountName()); - QueueServiceSASQueryParameters queueServiceSasQueryParameters = values + QueueServiceSasQueryParameters queueServiceSasQueryParameters = values .generateSASQueryParameters(sharedKeyCredential); return queueServiceSasQueryParameters.encode(); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index 110a680b891f..dcff77c48649 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. package com.azure.storage.queue; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -20,7 +20,6 @@ import com.azure.storage.queue.models.UpdatedMessage; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; @@ -57,9 +56,8 @@ public final class QueueClient { /** * @return the URL of the storage queue. - * @throws RuntimeException If the queue is using a malformed URL. */ - public URL getQueueUrl() { + public String getQueueUrl() { return client.getQueueUrl(); } @@ -663,10 +661,10 @@ public Response deleteMessageWithResponse(String messageId, String popRece * Generates a SAS token with the specified parameters * * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS - * @param permissions The {@code QueueSASPermission} permission for the SAS + * @param permissions The {@code QueueSasPermission} permission for the SAS * @return A string that represents the SAS token */ - public String generateSAS(OffsetDateTime expiryTime, QueueSASPermission permissions) { + public String generateSAS(OffsetDateTime expiryTime, QueueSasPermission permissions) { return this.client.generateSAS(permissions, expiryTime); } @@ -685,22 +683,22 @@ public String generateSAS(String identifier) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.queue.queueClient.generateSAS#String-QueueSASPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IPRange} + * {@codesnippet com.azure.storage.queue.queueClient.generateSAS#String-QueueSasPermission-OffsetDateTime-OffsetDateTime-String-SASProtocol-IpRange} * *

    For more information, see the * Azure Docs.

    * * @param identifier The {@code String} name of the access policy on the queue this SAS references if any - * @param permissions The {@code QueueSASPermission} permission for the SAS + * @param permissions The {@code QueueSasPermission} permission for the SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the SAS * @param startTime An optional {@code OffsetDateTime} start time for the SAS * @param version An optional {@code String} version for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @return A string that represents the SAS token */ - public String generateSAS(String identifier, QueueSASPermission permissions, OffsetDateTime expiryTime, - OffsetDateTime startTime, String version, SASProtocol sasProtocol, IPRange ipRange) { + public String generateSAS(String identifier, QueueSasPermission permissions, OffsetDateTime expiryTime, + OffsetDateTime startTime, String version, SASProtocol sasProtocol, IpRange ipRange) { return this.client.generateSAS(identifier, permissions, expiryTime, startTime, version, sasProtocol, ipRange); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index a38451a7b444..7cf7014c1e1b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -183,4 +183,9 @@ public QueueClientBuilder queueName(String queueName) { this.queueName = Objects.requireNonNull(queueName); return this; } + + @Override + protected Class getClazz() { + return QueueClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSASPermission.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java similarity index 82% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSASPermission.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java index 14294722e26c..0b6de02664f5 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSASPermission.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueSasPermission.java @@ -11,10 +11,10 @@ * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a queue. Setting * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all * the values are set, this should be serialized with toString and set as the permissions field on a {@link - * QueueServiceSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * QueueServiceSasSignatureValues} object. It is possible to construct the permissions string without this class, but * the order of the permissions is particular and this class guarantees correctness. */ -public final class QueueSASPermission { +public final class QueueSasPermission { private boolean readPermission; @@ -25,21 +25,21 @@ public final class QueueSASPermission { private boolean processPermission; /** - * Initializes a {@code QueueSASPermission} object with all fields set to false. + * Initializes a {@code QueueSasPermission} object with all fields set to false. */ - public QueueSASPermission() { + public QueueSasPermission() { } /** - * Creates a {@code QueueSASPermission} from the specified permissions string. This method will throw an + * Creates a {@code QueueSasPermission} from the specified permissions string. This method will throw an * {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid permission. * - * @param permString A {@code String} which represents the {@code QueueSASPermission}. - * @return A {@code QueueSASPermission} generated from the given {@code String}. + * @param permString A {@code String} which represents the {@code QueueSasPermission}. + * @return A {@code QueueSasPermission} generated from the given {@code String}. * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, u, or p. */ - public static QueueSASPermission parse(String permString) { - QueueSASPermission permissions = new QueueSASPermission(); + public static QueueSasPermission parse(String permString) { + QueueSasPermission permissions = new QueueSasPermission(); for (int i = 0; i < permString.length(); i++) { char c = permString.charAt(i); @@ -76,9 +76,9 @@ public boolean getReadPermission() { * Sets the read permission status. * * @param hadReadPermission Permission status to set - * @return the updated QueueSASPermission object. + * @return the updated QueueSasPermission object. */ - public QueueSASPermission setReadPermission(boolean hadReadPermission) { + public QueueSasPermission setReadPermission(boolean hadReadPermission) { this.readPermission = hadReadPermission; return this; } @@ -94,9 +94,9 @@ public boolean getAddPermission() { * Sets the add permission status. * * @param hasAddPermission Permission status to set - * @return the updated QueueSASPermission object. + * @return the updated QueueSasPermission object. */ - public QueueSASPermission setAddPermission(boolean hasAddPermission) { + public QueueSasPermission setAddPermission(boolean hasAddPermission) { this.addPermission = hasAddPermission; return this; } @@ -112,9 +112,9 @@ public boolean getUpdatePermission() { * Sets the update permission status. * * @param hasUpdatePermission Permission status to set - * @return the updated QueueSASPermission object. + * @return the updated QueueSasPermission object. */ - public QueueSASPermission setUpdatePermission(boolean hasUpdatePermission) { + public QueueSasPermission setUpdatePermission(boolean hasUpdatePermission) { this.updatePermission = hasUpdatePermission; return this; } @@ -130,9 +130,9 @@ public boolean getProcessPermission() { * Sets the process permission status. * * @param hasProcessPermission Permission status to set - * @return the updated QueueSASPermission object. + * @return the updated QueueSasPermission object. */ - public QueueSASPermission setProcessPermission(boolean hasProcessPermission) { + public QueueSasPermission setProcessPermission(boolean hasProcessPermission) { this.processPermission = hasProcessPermission; return this; } @@ -141,7 +141,7 @@ public QueueSASPermission setProcessPermission(boolean hasProcessPermission) { * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. * - * @return A {@code String} which represents the {@code QueueSASPermission}. + * @return A {@code String} which represents the {@code QueueSasPermission}. */ @Override public String toString() { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index cc4a80cab2af..0e8c7ff71615 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. package com.azure.storage.queue; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.implementation.http.PagedResponseBase; import com.azure.core.implementation.util.FluxUtil; import com.azure.core.util.Context; @@ -15,14 +15,14 @@ import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; import com.azure.storage.common.AccountSASSignatureValues; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; import com.azure.storage.common.credentials.SharedKeyCredential; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.models.CorsRule; -import com.azure.storage.queue.models.ListQueuesIncludeType; +import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueuesSegmentOptions; import com.azure.storage.queue.models.StorageException; @@ -30,8 +30,6 @@ import com.azure.storage.queue.models.StorageServiceStats; import reactor.core.publisher.Mono; -import java.net.MalformedURLException; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -75,15 +73,9 @@ public final class QueueServiceAsyncClient { /** * @return the URL of the storage queue - * @throws RuntimeException If the queue service is using a malformed URL. */ - public URL getQueueServiceUrl() { - try { - return new URL(client.getUrl()); - } catch (MalformedURLException ex) { - logger.error("Queue Service URL is malformed"); - throw logger.logExceptionAsError(new RuntimeException("Storage account URL is malformed")); - } + public String getQueueServiceUrl() { + return client.getUrl(); } /** @@ -442,6 +434,7 @@ Mono> getStatisticsWithResponse(Context context) { * @param accountSASPermission The {@code AccountSASPermission} permission for the account SAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredential} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission, OffsetDateTime expiryTime) { @@ -454,7 +447,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * *

    Code Samples

    * - * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs.

    @@ -465,13 +458,14 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token + * @throws NullPointerException If {@code sharedKeyCredential} is null */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.client.getHttpPipeline()); Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index 260d5d9d7d51..81767a397131 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -2,15 +2,15 @@ // Licensed under the MIT License. package com.azure.storage.queue; +import com.azure.core.annotation.ServiceClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.annotation.ServiceClient; import com.azure.core.util.Context; import com.azure.storage.common.AccountSASPermission; import com.azure.storage.common.AccountSASResourceType; import com.azure.storage.common.AccountSASService; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SASTokenCredential; @@ -23,7 +23,6 @@ import com.azure.storage.queue.models.StorageServiceStats; import reactor.core.publisher.Mono; -import java.net.URL; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Map; @@ -60,7 +59,7 @@ public final class QueueServiceClient { /** * @return the URL of the storage queue */ - public URL getQueueServiceUrl() { + public String getQueueServiceUrl() { return client.getQueueServiceUrl(); } @@ -414,7 +413,7 @@ public String generateAccountSAS(AccountSASService accountSASService, * *

    Code Samples

    * - * {@codesnippet com.azure.storage.queue.queueServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IPRange-SASProtocol} + * {@codesnippet com.azure.storage.queue.queueServiceClient.generateAccountSAS#AccountSASService-AccountSASResourceType-AccountSASPermission-OffsetDateTime-OffsetDateTime-String-IpRange-SASProtocol} * *

    For more information, see the * Azure Docs.

    @@ -425,13 +424,13 @@ public String generateAccountSAS(AccountSASService accountSASService, * @param expiryTime The {@code OffsetDateTime} expiry time for the account SAS * @param startTime The {@code OffsetDateTime} start time for the account SAS * @param version The {@code String} version for the account SAS - * @param ipRange An optional {@code IPRange} ip address range for the SAS + * @param ipRange An optional {@code IpRange} ip address range for the SAS * @param sasProtocol An optional {@code SASProtocol} protocol for the SAS * @return A string that represents the SAS token */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, - AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, - IPRange ipRange, SASProtocol sasProtocol) { + AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, + String version, IpRange ipRange, SASProtocol sasProtocol) { return this.client.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index e945835455a4..4325e10f8c0f 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -154,4 +154,9 @@ public QueueServiceClientBuilder endpoint(String endpoint) { return this; } + + @Override + protected Class getClazz() { + return QueueServiceClientBuilder.class; + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASQueryParameters.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java similarity index 85% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASQueryParameters.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java index dbb393b3cb11..ce3d5de71237 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASQueryParameters.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasQueryParameters.java @@ -3,9 +3,9 @@ package com.azure.storage.queue; -import com.azure.storage.common.BaseSASQueryParameters; +import com.azure.storage.common.BaseSasQueryParameters; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import java.time.OffsetDateTime; @@ -13,24 +13,24 @@ /** * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link QueueServiceSASSignatureValues} type. Once generated, it can be set + * by the user; it is only generated by the {@link QueueServiceSasSignatureValues} type. Once generated, it can be set * on a {@link QueueClientBuilder} object to be constructed as part of a URL or it can be encoded into a {@code String} * and appended to a URL directly (though caution should be taken here in case there are existing query parameters, * which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are * immutable to ensure thread safety. */ -public final class QueueServiceSASQueryParameters extends BaseSASQueryParameters { +public final class QueueServiceSasQueryParameters extends BaseSasQueryParameters { private final String identifier; /** - * Creates a new {@link QueueServiceSASQueryParameters} object. + * Creates a new {@link QueueServiceSasQueryParameters} object. * * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from * queryParamsMap */ - public QueueServiceSASQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { + public QueueServiceSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { super(queryParamsMap, removeSASParametersFromMap); this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, @@ -39,28 +39,28 @@ public QueueServiceSASQueryParameters(Map queryParamsMap, bool /** - * Creates a new {@link QueueServiceSASQueryParameters} object. These objects are only created internally by + * Creates a new {@link QueueServiceSasQueryParameters} object. These objects are only created internally by * SASSignatureValues classes. * * @param version A {@code String} representing the storage version. * @param protocol A {@code String} representing the allowed HTTP protocol(s) or {@code null}. * @param startTime A {@code java.util.Date} representing the start time for this SAS token or {@code null}. * @param expiryTime A {@code java.util.Date} representing the expiry time for this SAS token. - * @param ipRange A {@link IPRange} representing the range of valid IP addresses for this SAS token or + * @param ipRange A {@link IpRange} representing the range of valid IP addresses for this SAS token or * {@code null}. * @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}. * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. */ - QueueServiceSASQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, IPRange ipRange, String identifier, String permissions, String signature) { + QueueServiceSasQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, IpRange ipRange, String identifier, String permissions, String signature) { super(version, protocol, startTime, expiryTime, ipRange, permissions, signature); this.identifier = identifier; } /** - * @return The signed identifier (only for {@link QueueServiceSASSignatureValues}) or {@code null}. Please see + * @return The signed identifier (only for {@link QueueServiceSasSignatureValues}) or {@code null}. Please see * here * for more information. */ diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java similarity index 77% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASSignatureValues.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java index d91005341292..b4e93307c9b2 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSASSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceSasSignatureValues.java @@ -4,7 +4,7 @@ package com.azure.storage.queue; import com.azure.storage.common.Constants; -import com.azure.storage.common.IPRange; +import com.azure.storage.common.IpRange; import com.azure.storage.common.SASProtocol; import com.azure.storage.common.Utility; import com.azure.storage.common.credentials.SharedKeyCredential; @@ -12,9 +12,9 @@ import java.time.OffsetDateTime; /** - * QueueServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once + * QueueServiceSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once * all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS - * which can actually be applied to queue urls. Note: that both this class and {@link QueueServiceSASQueryParameters} + * which can actually be applied to queue urls. Note: that both this class and {@link QueueServiceSasQueryParameters} * exist because the former is mutable and a logical representation while the latter is immutable and used to generate * actual REST requests. *

    @@ -28,7 +28,7 @@ * here * for additional samples.

    */ -final class QueueServiceSASSignatureValues { +final class QueueServiceSasSignatureValues { private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; @@ -40,7 +40,7 @@ final class QueueServiceSASSignatureValues { private String permissions; - private IPRange ipRange; + private IpRange ipRange; private String canonicalName; @@ -49,7 +49,7 @@ final class QueueServiceSASSignatureValues { /** * Creates an object with empty values for all fields. */ - QueueServiceSASSignatureValues() { + QueueServiceSasSignatureValues() { } /** @@ -58,7 +58,7 @@ final class QueueServiceSASSignatureValues { * @param expiryTime Time the SAS becomes valid * @param permissions Permissions granted by the SAS */ - QueueServiceSASSignatureValues(OffsetDateTime expiryTime, String permissions) { + QueueServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { this.expiryTime = expiryTime; this.permissions = permissions; } @@ -68,12 +68,12 @@ final class QueueServiceSASSignatureValues { * * @param identifier Identifier for the SAS */ - QueueServiceSASSignatureValues(String identifier) { + QueueServiceSasSignatureValues(String identifier) { this.identifier = identifier; } - QueueServiceSASSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, IPRange ipRange, String identifier) { + QueueServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime, + OffsetDateTime expiryTime, String permission, IpRange ipRange, String identifier) { if (version != null) { this.version = version; } @@ -98,9 +98,9 @@ public String getVersion() { * by the library. * * @param version Version to target - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setVersion(String version) { + public QueueServiceSasSignatureValues setVersion(String version) { this.version = version; return this; } @@ -116,9 +116,9 @@ public SASProtocol getProtocol() { * Sets the {@link SASProtocol} which determines the protocols allowed by the SAS. * * @param protocol Protocol for the SAS - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setProtocol(SASProtocol protocol) { + public QueueServiceSasSignatureValues setProtocol(SASProtocol protocol) { this.protocol = protocol; return this; } @@ -134,9 +134,9 @@ public OffsetDateTime getStartTime() { * Sets when the SAS will take effect. * * @param startTime When the SAS takes effect - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setStartTime(OffsetDateTime startTime) { + public QueueServiceSasSignatureValues setStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -152,15 +152,15 @@ public OffsetDateTime getExpiryTime() { * Sets the time after which the SAS will no longer work. * * @param expiryTime When the SAS will no longer work - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setExpiryTime(OffsetDateTime expiryTime) { + public QueueServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) { this.expiryTime = expiryTime; return this; } /** - * @return the permissions string allowed by the SAS. Please refer to {@link QueueSASPermission} for help + * @return the permissions string allowed by the SAS. Please refer to {@link QueueSasPermission} for help * determining the permissions allowed. */ public String getPermissions() { @@ -168,31 +168,31 @@ public String getPermissions() { } /** - * Sets the permissions string allowed by the SAS. Please refer to {@link QueueSASPermission} for help constructing + * Sets the permissions string allowed by the SAS. Please refer to {@link QueueSasPermission} for help constructing * the permissions string. * * @param permissions Permissions string for the SAS - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setPermissions(String permissions) { + public QueueServiceSasSignatureValues setPermissions(String permissions) { this.permissions = permissions; return this; } /** - * @return the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * @return the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. */ - public IPRange getIpRange() { + public IpRange getIpRange() { return ipRange; } /** - * Sets the {@link IPRange} which determines the IP ranges that are allowed to use the SAS. + * Sets the {@link IpRange} which determines the IP ranges that are allowed to use the SAS. * * @param ipRange Allowed IP range to set - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setIpRange(IPRange ipRange) { + public QueueServiceSasSignatureValues setIpRange(IpRange ipRange) { this.ipRange = ipRange; return this; } @@ -208,9 +208,9 @@ public String getCanonicalName() { * Sets the canonical name of the object the SAS user may access. * * @param canonicalName Canonical name of the object the SAS grants access - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setCanonicalName(String canonicalName) { + public QueueServiceSasSignatureValues setCanonicalName(String canonicalName) { this.canonicalName = canonicalName; return this; } @@ -221,9 +221,9 @@ public QueueServiceSASSignatureValues setCanonicalName(String canonicalName) { * * @param queueName Name of the queue object * @param accountName Name of the account that contains the object - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setCanonicalName(String queueName, String accountName) { + public QueueServiceSasSignatureValues setCanonicalName(String queueName, String accountName) { this.canonicalName = String.format("/queue/%s/%s", accountName, queueName); return this; } @@ -233,7 +233,7 @@ public QueueServiceSASSignatureValues setCanonicalName(String queueName, String * here * for more information. */ - public String getIdentifier() { + public String getId() { return identifier; } @@ -243,9 +243,9 @@ public String getIdentifier() { * for more information. * * @param identifier Name of the access policy - * @return the updated QueueServiceSASSignatureValues object + * @return the updated QueueServiceSasSignatureValues object */ - public QueueServiceSASSignatureValues setIdentifier(String identifier) { + public QueueServiceSasSignatureValues setIdentifier(String identifier) { this.identifier = identifier; return this; } @@ -255,11 +255,14 @@ public QueueServiceSASSignatureValues setIdentifier(String identifier) { * parameters. * * @param sharedKeyCredentials A {@link SharedKeyCredential} object used to sign the SAS values. - * @return {@link QueueServiceSASQueryParameters} + * @return {@link QueueServiceSasQueryParameters} * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. + * @throws NullPointerException If {@code sharedKeyCredential} is null. Or if any of {@code version} or + * {@code canonicalName} is null. Or if {@code identifier} is null and any or {@code expiryTime} or + * {@code permissions} is null. Or if {@code expiryTime} and {@code permissions} and {@code identifier} is null */ - public QueueServiceSASQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { + public QueueServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) { Utility.assertNotNull("sharedKeyCredentials", sharedKeyCredentials); assertGenerateOK(); @@ -267,7 +270,7 @@ public QueueServiceSASQueryParameters generateSASQueryParameters(SharedKeyCreden String stringToSign = stringToSign(); String signature = sharedKeyCredentials.computeHmac256(stringToSign); - return new QueueServiceSASQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, + return new QueueServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, this.ipRange, this.identifier, this.permissions, signature); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java index ec6a48740d40..48c69937a9bf 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java @@ -4,9 +4,9 @@ package com.azure.storage.queue.implementation; +import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; -import com.azure.core.annotation.ServiceClientBuilder; /** * A builder for creating a new instance of the AzureQueueStorage type. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java index 661e1de266a2..82ce9b397041 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java @@ -4,7 +4,7 @@ package com.azure.storage.queue.implementation; -import com.azure.storage.queue.models.ListQueuesIncludeType; +import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java index a86a604fbcbb..c838c9707f7d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.queue.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -18,9 +17,10 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; -import com.azure.storage.queue.models.MessageIdsDeleteResponse; -import com.azure.storage.queue.models.MessageIdsUpdateResponse; +import com.azure.storage.queue.implementation.models.MessageIdsDeleteResponse; +import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; import com.azure.storage.queue.models.QueueMessage; import com.azure.storage.queue.models.StorageErrorException; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java index db6a2859827b..f01eeac7e5a2 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.queue.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -19,11 +18,12 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; -import com.azure.storage.queue.models.MessagesClearResponse; -import com.azure.storage.queue.models.MessagesDequeueResponse; -import com.azure.storage.queue.models.MessagesEnqueueResponse; -import com.azure.storage.queue.models.MessagesPeekResponse; +import com.azure.storage.queue.implementation.models.MessagesClearResponse; +import com.azure.storage.queue.implementation.models.MessagesDequeueResponse; +import com.azure.storage.queue.implementation.models.MessagesEnqueueResponse; +import com.azure.storage.queue.implementation.models.MessagesPeekResponse; import com.azure.storage.queue.models.QueueMessage; import com.azure.storage.queue.models.StorageErrorException; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java index 4f47551cc4cf..e41fee5538bf 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java @@ -4,7 +4,6 @@ package com.azure.storage.queue.implementation; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -19,13 +18,14 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.RestProxy; import com.azure.core.util.Context; -import com.azure.storage.queue.models.QueuesCreateResponse; -import com.azure.storage.queue.models.QueuesDeleteResponse; -import com.azure.storage.queue.models.QueuesGetAccessPolicyResponse; -import com.azure.storage.queue.models.QueuesGetPropertiesResponse; -import com.azure.storage.queue.models.QueuesSetAccessPolicyResponse; -import com.azure.storage.queue.models.QueuesSetMetadataResponse; +import com.azure.storage.queue.implementation.models.QueuesCreateResponse; +import com.azure.storage.queue.implementation.models.QueuesDeleteResponse; +import com.azure.storage.queue.implementation.models.QueuesGetAccessPolicyResponse; +import com.azure.storage.queue.implementation.models.QueuesGetPropertiesResponse; +import com.azure.storage.queue.implementation.models.QueuesSetAccessPolicyResponse; +import com.azure.storage.queue.implementation.models.QueuesSetMetadataResponse; import com.azure.storage.queue.models.SignedIdentifier; import com.azure.storage.queue.models.StorageErrorException; import java.util.List; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java index a876883d7e26..865c2d22694a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java @@ -4,8 +4,6 @@ package com.azure.storage.queue.implementation; -import com.azure.core.implementation.CollectionFormat; -import com.azure.core.implementation.RestProxy; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; @@ -18,13 +16,15 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.implementation.CollectionFormat; +import com.azure.core.implementation.RestProxy; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.util.Context; -import com.azure.storage.queue.models.ListQueuesIncludeType; -import com.azure.storage.queue.models.ServicesGetPropertiesResponse; -import com.azure.storage.queue.models.ServicesGetStatisticsResponse; -import com.azure.storage.queue.models.ServicesListQueuesSegmentResponse; -import com.azure.storage.queue.models.ServicesSetPropertiesResponse; +import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; +import com.azure.storage.queue.implementation.models.ServicesGetPropertiesResponse; +import com.azure.storage.queue.implementation.models.ServicesGetStatisticsResponse; +import com.azure.storage.queue.implementation.models.ServicesListQueuesSegmentResponse; +import com.azure.storage.queue.implementation.models.ServicesSetPropertiesResponse; import com.azure.storage.queue.models.StorageErrorException; import com.azure.storage.queue.models.StorageServiceProperties; import java.util.List; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesIncludeType.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesIncludeType.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java index e2d797471400..03ee304229d8 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesIncludeType.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java index a16fd98e4616..c49facbaf8c9 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java @@ -2,9 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.queue.models.QueueItem; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java index a4407be1c4b6..b295b65ff8dd 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java similarity index 99% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java index 8c88253b6f02..c0baddc4d35a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsDeleteResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsDeleteResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java index 3639b840adfd..555cdf8a4f73 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsDeleteResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsUpdateResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsUpdateResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsUpdateResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsUpdateResponse.java index 4305b7c915ec..e3df10a621a4 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessageIdsUpdateResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsUpdateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearHeaders.java index 40111c4bea76..d6c31ec78e52 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearResponse.java index d21b99d0f839..aa8f47a0c1ca 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesClearResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesClearResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueHeaders.java index 9d0c3049010f..6ad468ab0600 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueResponse.java similarity index 92% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueResponse.java index feb6d78145ba..389ee986d069 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesDequeueResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.DequeuedMessage; import java.util.List; /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java index 4d7e318abf5b..9d43a8036600 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java similarity index 92% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java index a00a57391b38..ce1bafa896c2 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.EnqueuedMessage; import java.util.List; /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java index 364538aae5d2..3ba57c4afb7c 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java similarity index 92% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java index cd5a5dac5952..818d7bce3a83 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/MessagesPeekResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.PeekedMessage; import java.util.List; /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java index 09820cd560e0..188853deb422 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java index 8374f8f82f9a..daaf1059701d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java index 0a80aa473c09..7cc5a6a6dbc0 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java similarity index 99% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java index 7836af0afe7e..bc3e41a2c36d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.HeaderCollection; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java index b22ca4c34d27..9f8cf2728dba 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java index a1ecfba8a6fc..0bb80faef19f 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesCreateResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesCreateResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java index b191cf79d5a0..c9843113cee5 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesCreateResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesDeleteResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesDeleteResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesDeleteResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesDeleteResponse.java index 8023feab3bbe..99f7cccb6060 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesDeleteResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesDeleteResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetAccessPolicyResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetAccessPolicyResponse.java similarity index 92% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetAccessPolicyResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetAccessPolicyResponse.java index 46ffbf14ed25..086a70a298e6 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetAccessPolicyResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.SignedIdentifier; import java.util.List; /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetPropertiesResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetPropertiesResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java index 971f32275b2a..de0d8bbcd5a4 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetAccessPolicyResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetAccessPolicyResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetAccessPolicyResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetAccessPolicyResponse.java index c1828b8668da..4906573fa381 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetAccessPolicyResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetMetadataResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetMetadataResponse.java similarity index 95% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetMetadataResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetMetadataResponse.java index b33125bc20d6..b5d6dbd88fc3 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueuesSetMetadataResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesSetMetadataResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetPropertiesHeaders.java index 067d0fdc7670..3b9c8b48689c 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetStatisticsHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetStatisticsHeaders.java index 6a6094214e99..3d12fa11979a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceGetStatisticsHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceListQueuesSegmentHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceListQueuesSegmentHeaders.java index 7af1b56e6721..0e6423b90268 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceListQueuesSegmentHeaders.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceSetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceSetPropertiesHeaders.java index 762fe3bde35f..37c65a6fdb6d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServiceSetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetPropertiesResponse.java similarity index 91% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetPropertiesResponse.java index 5c58630cc776..7c2a18a62467 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetPropertiesResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.StorageServiceProperties; /** * Contains all response data for the getProperties operation. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetStatisticsResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetStatisticsResponse.java similarity index 92% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetStatisticsResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetStatisticsResponse.java index c1989ada6d2a..d42b13cd59e9 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesGetStatisticsResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetStatisticsResponse.java @@ -2,11 +2,12 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; +import com.azure.storage.queue.models.StorageServiceStats; /** * Contains all response data for the getStatistics operation. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesListQueuesSegmentResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java similarity index 96% rename from sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesListQueuesSegmentResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java index d9d0c79a5e9e..a8274b869bc7 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/ServicesListQueuesSegmentResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.queue.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesSetPropertiesResponse.java similarity index 95% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java rename to sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesSetPropertiesResponse.java index aa796b36f142..a07453e16a8c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesSetPropertiesResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.storage.queue.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/package-info.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/package-info.java new file mode 100644 index 000000000000..07e12118914e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for AzureQueueStorage. + */ +package com.azure.storage.queue.implementation.models; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java index 6d20287dc405..9da428fe6056 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java @@ -4,8 +4,8 @@ package com.azure.storage.queue.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java index 6d96b8ab5d47..7bf292f53f77 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java @@ -4,8 +4,8 @@ package com.azure.storage.queue.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java index ab2e1638f365..17b3fcff31ba 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java @@ -4,8 +4,8 @@ package com.azure.storage.queue.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessage.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessage.java index 5ec6d2063250..51c6c9837101 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessage.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessage.java @@ -4,8 +4,8 @@ package com.azure.storage.queue.models; -import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/StorageErrorCode.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/StorageErrorCode.java index dfa27d5fed94..9c7118e26111 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/StorageErrorCode.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/StorageErrorCode.java @@ -267,6 +267,36 @@ public final class StorageErrorCode extends ExpandableStringEnumAuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:b1814656-6003-00c8-2dc2-62a141000000\nTime:2019-09-04T01:45:40.5960524ZThe MAC signature found in the HTTP request 'JYaLZjjdjNEXjdVN7b0yupSwTD4Y8zchP7cO+ZHN79M=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nWed, 04 Sep 2019 01:45:38 GMT\n\n\n\n\n\nx-ms-client-request-id:1fac3489-a267-4222-9d8e-ba2c07cf4056\nx-ms-meta-invalidmeta:value\nx-ms-version:2018-03-28\n/azstoragesdkaccount/queueapitestssetinvalidmeta005165f491453932314\ncomp:metadata'.", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT", + "Content-Length" : "260", + "StatusCode" : "400", + "x-ms-request-id" : "f7f7c60d-b003-0085-11ee-7367a3000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:f7f7c60d-b003-0085-11ee-7367a3000000\nTime:2019-09-25T22:13:40.7254673Z", + "Date" : "Wed, 25 Sep 2019 22:13:40 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueapitestssetinvalidmeta005165f491453932314" ] + "variables" : [ "queueapitestssetinvalidmeta04409862ea68168d0f4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta1.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta1.json index dfd82c1cc0c4..8ba58ff27f29 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta1.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta1.json @@ -1,11 +1,11 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta171832595e05acc89c4", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta110170799c642936fd4", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "f46069d7-e48b-4271-949f-ccd3ce26f8b5" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "0ad450a2-d851-4f79-a768-d7587934f8bb" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -13,17 +13,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b181465a-6003-00c8-31c2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT" + "x-ms-request-id" : "f7f7c627-b003-0085-29ee-7367a3000000", + "Date" : "Wed, 25 Sep 2019 22:13:40 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta171832595e05acc89c4?comp=metadata", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta110170799c642936fd4?comp=metadata", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "978deb87-d525-49e7-934d-4d59c021d0cd" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "c32576df-c551-43b5-9647-1e5d8b3470cf" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -32,12 +32,12 @@ "retry-after" : "0", "Content-Length" : "260", "StatusCode" : "400", - "x-ms-request-id" : "b181465e-6003-00c8-34c2-62a141000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:b181465e-6003-00c8-34c2-62a141000000\nTime:2019-09-04T01:45:40.7301785Z", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT", + "x-ms-request-id" : "f7f7c633-b003-0085-31ee-7367a3000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:f7f7c633-b003-0085-31ee-7367a3000000\nTime:2019-09-25T22:13:40.8595949Z", + "Date" : "Wed, 25 Sep 2019 22:13:40 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueapitestssetinvalidmeta171832595e05acc89c4" ] + "variables" : [ "queueapitestssetinvalidmeta110170799c642936fd4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta2.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta2.json index 9c1c636cb4b4..5792d51bb64a 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta2.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta2.json @@ -1,11 +1,11 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta203112399e7b2e3f904", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta272171df6992aae98d4", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "a67034cf-33dd-41ba-834e-4bea20f88be0" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f4de6b74-6364-43d3-af7b-8403b7aa8a4b" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -13,31 +13,31 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b1814667-6003-00c8-3cc2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT" + "x-ms-request-id" : "f7f7c643-b003-0085-3eee-7367a3000000", + "Date" : "Wed, 25 Sep 2019 22:13:40 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta203112399e7b2e3f904?comp=metadata", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta272171df6992aae98d4?comp=metadata", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "b38b7280-85cb-42ad-872a-134cae8884cd" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "25c7a9ed-7656-4d23-9c65-8f35112b9e6a" }, "Response" : { "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidMetadata", + "x-ms-error-code" : "EmptyMetadataKey", "retry-after" : "0", - "Content-Length" : "260", + "Content-Length" : "278", "StatusCode" : "400", - "x-ms-request-id" : "b181466b-6003-00c8-3ec2-62a141000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:b181466b-6003-00c8-3ec2-62a141000000\nTime:2019-09-04T01:45:40.8703102Z", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT", + "x-ms-request-id" : "f7f7c648-b003-0085-42ee-7367a3000000", + "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:f7f7c648-b003-0085-42ee-7367a3000000\nTime:2019-09-25T22:13:40.9887176Zvalue", + "Date" : "Wed, 25 Sep 2019 22:13:40 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueapitestssetinvalidmeta203112399e7b2e3f904" ] + "variables" : [ "queueapitestssetinvalidmeta272171df6992aae98d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta3.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta3.json deleted file mode 100644 index fd74f0c21554..000000000000 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta3.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta342327ff9036f707c34", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "9e3c8560-e849-4400-9762-46d03f572a45" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b1814679-6003-00c8-49c2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueapitestssetinvalidmeta342327ff9036f707c34?comp=metadata", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "3892053c-0c73-4284-966c-451797463b79" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "Content-Length" : "278", - "StatusCode" : "400", - "x-ms-request-id" : "b181467c-6003-00c8-4bc2-62a141000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:b181467c-6003-00c8-4bc2-62a141000000\nTime:2019-09-04T01:45:41.0204517Zvalue", - "Date" : "Wed, 04 Sep 2019 01:45:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "queueapitestssetinvalidmeta342327ff9036f707c34" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json new file mode 100644 index 000000000000..9b8699be4997 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "queueaysncapitestsgetqueueurl621078344a935a0784" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta0.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta0.json index fc093946ca5d..b4634b091256 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta0.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta0.json @@ -1,11 +1,11 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta0988020102ba170aa", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta05950644925d01a49", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "78620b68-dad6-40f5-b6c6-b2429fb2190d" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "95fa6cb4-a334-464c-8dc8-2154d16bf37f" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -13,30 +13,31 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b1814b19-6003-00c8-03c2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:53 GMT" + "x-ms-request-id" : "f7f7d117-b003-0085-10ee-7367a3000000", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta0988020102ba170aa?comp=metadata", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta05950644925d01a49?comp=metadata", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "a6b036d8-1373-49f8-9172-f6aae32aa90e" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "f1cb6143-deb2-4781-88c6-060b03e65c36" }, "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthenticationFailed", + "x-ms-version" : "2018-03-28", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", "retry-after" : "0", - "Content-Length" : "790", - "StatusCode" : "403", - "x-ms-request-id" : "b1814b1d-6003-00c8-06c2-62a141000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:b1814b1d-6003-00c8-06c2-62a141000000\nTime:2019-09-04T01:45:54.3549168ZThe MAC signature found in the HTTP request 'q7HqcSluPoLojFlHA5CcFq9GSIS1FUdLgphsw8xR8sE=' is not the same as any computed signature. Server used following string to sign: 'PUT\n\n\n\n\n\nWed, 04 Sep 2019 01:45:52 GMT\n\n\n\n\n\nx-ms-client-request-id:a6b036d8-1373-49f8-9172-f6aae32aa90e\nx-ms-meta-invalidmeta:value\nx-ms-version:2018-03-28\n/azstoragesdkaccount/queueaysncapitestssetinvalidmeta0988020102ba170aa\ncomp:metadata'.", - "Date" : "Wed, 04 Sep 2019 01:45:53 GMT", + "Content-Length" : "260", + "StatusCode" : "400", + "x-ms-request-id" : "f7f7d122-b003-0085-19ee-7367a3000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:f7f7d122-b003-0085-19ee-7367a3000000\nTime:2019-09-25T22:13:54.6386914Z", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestssetinvalidmeta0988020102ba170aa" ] + "variables" : [ "queueaysncapitestssetinvalidmeta05950644925d01a49" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta1.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta1.json index 3eb5064ddf73..a954fb2f8602 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta1.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta1.json @@ -1,11 +1,11 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta150757a486572bb4d", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta14859458575e9598a", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "692ee7ba-d11a-4258-a859-40e2583db307" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "d1e01768-e81a-4022-9e4f-4fd189511aa3" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -13,17 +13,17 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b1814b2a-6003-00c8-11c2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:53 GMT" + "x-ms-request-id" : "f7f7d13e-b003-0085-31ee-7367a3000000", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta150757a486572bb4d?comp=metadata", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta14859458575e9598a?comp=metadata", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "4fd3c113-db3c-4b40-a57b-6f08e21f887f" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "6710b740-3690-4968-99f0-81c6b2c921ff" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -32,12 +32,12 @@ "retry-after" : "0", "Content-Length" : "260", "StatusCode" : "400", - "x-ms-request-id" : "b1814b30-6003-00c8-14c2-62a141000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:b1814b30-6003-00c8-14c2-62a141000000\nTime:2019-09-04T01:45:54.4950499Z", - "Date" : "Wed, 04 Sep 2019 01:45:53 GMT", + "x-ms-request-id" : "f7f7d146-b003-0085-38ee-7367a3000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:f7f7d146-b003-0085-38ee-7367a3000000\nTime:2019-09-25T22:13:54.8568990Z", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestssetinvalidmeta150757a486572bb4d" ] + "variables" : [ "queueaysncapitestssetinvalidmeta14859458575e9598a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta2.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta2.json index af13df649916..936f0b1d570b 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta2.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta2.json @@ -1,11 +1,11 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta238089e39f886db45", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta2793639d580edebc8", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "231435ab-0cc1-4693-9132-b96541fa0951" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "948db618-0c34-480b-8c15-cb78fb0c6ded" }, "Response" : { "x-ms-version" : "2018-03-28", @@ -13,31 +13,31 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b1814b37-6003-00c8-1bc2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:54 GMT" + "x-ms-request-id" : "f7f7d160-b003-0085-4eee-7367a3000000", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta238089e39f886db45?comp=metadata", + "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta2793639d580edebc8?comp=metadata", "Headers" : { "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "ba8eb43c-feac-4fd8-966f-a2f259f59390" + "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.4 1.8.0_222; Windows 10 10.0", + "x-ms-client-request-id" : "4cacc89c-8beb-4f0d-a104-c48a2d44e785" }, "Response" : { "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidMetadata", + "x-ms-error-code" : "EmptyMetadataKey", "retry-after" : "0", - "Content-Length" : "260", + "Content-Length" : "278", "StatusCode" : "400", - "x-ms-request-id" : "b1814b39-6003-00c8-1cc2-62a141000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:b1814b39-6003-00c8-1cc2-62a141000000\nTime:2019-09-04T01:45:54.6281716Z", - "Date" : "Wed, 04 Sep 2019 01:45:54 GMT", + "x-ms-request-id" : "f7f7d16a-b003-0085-57ee-7367a3000000", + "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:f7f7d16a-b003-0085-57ee-7367a3000000\nTime:2019-09-25T22:13:54.9830186Zvalue", + "Date" : "Wed, 25 Sep 2019 22:13:54 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestssetinvalidmeta238089e39f886db45" ] + "variables" : [ "queueaysncapitestssetinvalidmeta2793639d580edebc8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta3.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta3.json deleted file mode 100644 index ba8e96a1c41d..000000000000 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta3.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta340756d5090364637", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "d75d0aa6-d5dc-4ff0-8091-84322beb0e44" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b1814b41-6003-00c8-24c2-62a141000000", - "Date" : "Wed, 04 Sep 2019 01:45:54 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://azstoragesdkaccount.queue.core.windows.net/queueaysncapitestssetinvalidmeta340756d5090364637?comp=metadata", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-azure-storage-queue/12.0.0-preview.3 1.8.0_222; Windows 10 10.0", - "x-ms-client-request-id" : "3ee895e0-a77b-42b7-ae06-5718965dd119" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "Content-Length" : "278", - "StatusCode" : "400", - "x-ms-request-id" : "b1814b45-6003-00c8-27c2-62a141000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:b1814b45-6003-00c8-27c2-62a141000000\nTime:2019-09-04T01:45:54.7522883Zvalue", - "Date" : "Wed, 04 Sep 2019 01:45:54 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "queueaysncapitestssetinvalidmeta340756d5090364637" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/swagger/README.md b/sdk/storage/azure-storage-queue/swagger/README.md index 390763ea64a3..dde795a1bfa8 100644 --- a/sdk/storage/azure-storage-queue/swagger/README.md +++ b/sdk/storage/azure-storage-queue/swagger/README.md @@ -33,6 +33,9 @@ generate-client-interfaces: false sync-methods: none license-header: MICROSOFT_MIT_SMALL add-context-parameter: true +models-subpackage: implementation.models +custom-types: StorageError,StorageErrorException,StorageErrorCode,SignedIdentifier,EnqueuedMessage,DequeuedMessage,PeekedMessage,QueueMessage,QueueItem,StorageServiceProperties,StorageServiceStats,CorsRule,AccessPolicy,Logging,Metrics,RetentionPolicy +custom-types-subpackage: models ``` ### /{queueName} diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index ae6c798b7cf7..9defadb883e0 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -50,6 +50,9 @@ stages: - name: azure-storage-file safeName: azurestoragefile stagingProfileId: 88192f04117501 +# - name: azure-storage-file-datalake +# safeName: azurestoragefiledatalake +# stagingProfileId: 88192f04117501 - name: azure-storage-queue safeName: azurestoragequeue stagingProfileId: 88192f04117501 diff --git a/sdk/storage/pom.service.xml b/sdk/storage/pom.service.xml index 20933185a462..dd6b3eb45b2c 100644 --- a/sdk/storage/pom.service.xml +++ b/sdk/storage/pom.service.xml @@ -18,6 +18,7 @@ azure-storage-blob azure-storage-blob-cryptography azure-storage-file + azure-storage-file-datalake azure-storage-queue azure-storage-queue-cryptography diff --git a/sdk/tracing/azure-core-tracing-opencensus/CHANGELOG.md b/sdk/tracing/azure-core-tracing-opencensus/CHANGELOG.md new file mode 100644 index 000000000000..98a9a77ed70d --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/CHANGELOG.md @@ -0,0 +1,19 @@ +# Release History + +## Version 1.0.0-preview.3 (2019-10-07) +For details on the Azure SDK for Java (October 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview3-java). + +Version 1.0.0-preview.3 added tracing support for AMQP client libraries across different languages and platforms as possible. +See this package's + [documentation](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/tracing/azure-core-tracing-opencensus/README.md) and + [samples](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus) demonstrate the new API. + +## Version 1.0.0-preview.2 (2019-09-09) +For details on the Azure SDK for Java (August 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview2-java). + +Version 1.0.0-preview.2 added tracing support to all of the HTTP based Azure SDK Java libraries. + +## Version 1.0.0-preview.1 +Version 1.0.0-preview.1 is the first preview of our efforts to provide low level interfaces and helper methods to support tracing for Java client libraries. This library includes [OpenTelemetry](https://opentelemetry.io/) implementation of the interface, + For more information about this, and preview releases of other Azure SDK libraries, please visit +https://aka.ms/azure-sdk-preview2-java. diff --git a/sdk/tracing/azure-core-tracing-opencensus/README.md b/sdk/tracing/azure-core-tracing-opencensus/README.md new file mode 100644 index 000000000000..cc38f69cd7df --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/README.md @@ -0,0 +1,228 @@ +# Azure Tracing client library for Java +This package enables distributed tracing across Azure SDK Java libraries through [Opencensus][opencensus]. OpenCensus is an open source, vendor-agnostic, single distribution of libraries to provide metrics collection and distributed tracing for services. +The Azure core tracing package provides: +- Context propagation, in order to correlate activities and requests between services with an initial customer action. +- Tracing user requests to the system, allowing to pinpoint failures and performance issues. + +[Source code][source_code] | [API reference documentation][api_documentation] | [Product +documentation][api_documentation] | [Samples][samples] + +## Getting started +### Prerequisites +- Java Development Kit (JDK) with version 8 or above +- [Maven][maven] +```xml + + io.opencensus + opencensus-api + 0.21.0 + + + + io.opencensus + opencensus-impl + 0.21.0 + +``` + +### Adding the package to your product +```xml + + com.azure + azure-core-tracing-opencensus + 1.0.0-preview.3 + +``` + +### Default HTTP Client +All client libraries support a pluggable HTTP transport layer. Users can specify an HTTP client specific for their needs by including the following dependency in the Maven pom.xml file: + +```xml + + com.azure + azure-core-http-netty + 1.0.0-preview.4 + +``` + +This will automatically configure all client libraries on the same classpath to make use of Netty for the HTTP client. Netty is the recommended HTTP client for most applications. OkHttp is recommended only when the application being built is deployed to Android devices. + +If, instead of Netty it is preferable to use OkHTTP, there is a HTTP client available for that too. Simply include the following dependency instead: + +```xml + + com.azure + azure-core-http-okhttp + 1.0.0-preview.4 + +``` + +### Configuring HTTP clients +When an HTTP client is included on the classpath, as shown above, it is not necessary to specify it in the client library [builders][create-eventhubs-builders], unless you want to customize the HTTP client in some fashion. If this is desired, the `httpClient` builder method is often available to achieve just this, by allowing users to provide a custom (or customized) `com.azure.core.http.HttpClient` instances. + +For starters, by having the Netty or OkHTTP dependencies on your classpath, as shown above, you can create new instances of these `HttpClient` types using their builder APIs. For example, here is how you would create a Netty HttpClient instance: + +```java +HttpClient client = new NettyAsyncHttpClientBuilder() + .port(8080) + .wiretap(true) + .build(); +``` + +## Key concepts +### Trace +A trace is a tree of spans showing the path of work through a system. A trace on its own is distinguishable by a unique 16 byte sequence called a TraceID. +### Span +A span represents a single operation in a trace. A span could be representative of an HTTP request, a remote procedure call (RPC), a database query, or even the path that a code takes. + +## Examples +The following sections provides examples of using the azure-core-tracing-opencensus plugin with some of the Azure Java SDK libraries: +### Using the plugin package with HTTP client libraries +- Sync create a secret using [azure-keyvault-secrets][azure-keyvault-secrets] with tracing enabled. + + Users can additionally pass the value of the current tracing span to the SDKs using key **"opencensus-span"** on the [Context][context] parameter of the calling method: + ```java + import com.azure.identity.credential.DefaultAzureCredentialBuilder; + import com.azure.security.keyvault.secrets.SecretClientBuilder; + import com.azure.security.keyvault.secrets.SecretClient; + import com.azure.security.keyvault.secrets.models.Secret; + import io.opencensus.common.Scope; + import io.opencensus.trace.Tracer; + import io.opencensus.trace.Tracing; + import com.azure.core.util.Context; + + import static com.azure.core.implementation.tracing.Tracer.OPENCENSUS_SPAN_KEY; + + SecretClient client = new SecretClientBuilder() + .endpoint("") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + + Tracer tracer = Tracing.getTracer(); + + try (Scope scope = tracer.spanBuilder("tracing-user-span").startScopedSpan()) { + + // Create context with key "opencensus-span" and current tracing span as value + Context tracingContext = new Context(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); + + // Set secret and pass tracing context to pass the user-span to calling methods + Secret secret = secretClient.setSecretWithResponse(new Secret("secret_name", "secret_value", tracingContext)); + System.out.printf("Secret is created with name %s and value %s %n", secret.getName(), secret.getValue()); + } + ``` +- Async create a secret using [azure-keyvault-secrets][azure-keyvault-secrets] with tracing enabled. + + To enabled tracing in async clients, users can additionally pass the value of the current tracing span to the SDKs using key **"opencensus-span"** on the subscriberContext of the calling method: + ```java + import com.azure.identity.credential.DefaultAzureCredentialBuilder; + import com.azure.security.keyvault.secrets.SecretClientBuilder; + import com.azure.security.keyvault.secrets.SecretAsyncClient; + import com.azure.security.keyvault.secrets.models.Secret; + import io.opencensus.common.Scope; + import io.opencensus.trace.Tracer; + import io.opencensus.trace.Tracing; + import com.azure.core.util.Context; + + import static com.azure.core.implementation.tracing.Tracer.OPENCENSUS_SPAN_KEY; + + SecretAsyncClient secretAsyncClient = new SecretClientBuilder() + .endpoint("") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + + Tracer tracer = Tracing.getTracer(); + + Scope scope = tracer.spanBuilder("tracing-user-span").startScopedSpan()) + // Set secret and pass tracing context with method call + secretAsyncClient.setSecret(new Secret("secret_name", "secret_value") + .subscriberContext(Context.of(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()).doFinally(secret -> + System.out.printf("Secret is created with name %s and value %s %n", secret.getName(), secret.getValue())); + scope.close(); + ``` + +### Using the plugin package with AMQP client libraries +Async send single event using [azure-messaging-eventhubs][azure-messaging-eventhubs] with tracing. + +Users can additionally pass the value of the current tracing span to the EventData object with key **"opencensus-span"** on the [Context][context] object: + +```java +import io.opencensus.common.Scope; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import com.azure.core.util.Context; +import com.azure.messaging.eventhubs.EventData; +import com.azure.messaging.eventhubs.EventHubAsyncClient; +import com.azure.messaging.eventhubs.EventHubAsyncProducer; +import com.azure.messaging.eventhubs.EventHubClientBuilder; + +EventHubAsyncClient client = new EventHubClientBuilder() + .connectionString("<< CONNECTION STRING FOR SPECIFIC EVENT HUB INSTANCE >>") + .buildAsyncClient(); +EventHubAsyncProducer producer = client.createProducer(); + +Scope scope = tracer.spanBuilder("tracing-user-span").startScopedSpan()) +Context tracingContext = new Context(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); +// Create an event to send +final EventData eventData = new EventData("Hello world!".getBytes(UTF_8)); +// Add tracing context to the event +eventData.context(tracingContext); +producer.send(eventData).doFinally((ignored) -> System.out.println("Event sent.")); +scope.close(); +``` + +## Troubleshooting +### General + +For more information on Opencensus Java support for tracing, see [Opencensus Java Quickstart][opencensus-quickstart]. + +Please refer to the [Quickstart Zipkin][zipkin-quickstart] for more documentation on using a Zipkin exporter. + +## Next steps +### Samples +Several Java SDK samples are available to you in the SDKs GitHub repository. +These following samples provide example code for additional scenarios commonly encountered while working with Tracing: + +#### Enqueue and dequeue messages using Storage Queue client +* [HelloWorld.java][sample_helloWorld] and [HelloWorldAsync.java][sample_helloWorldAsync] - Contains samples for following scenarios with tracing support: + * Create a Queue client using [azure-storage-queue][azure-storage-queue] Java SDK. + * Enqueue and dequeue messages using the created Queue client. +#### List Operations for secrets in a Key Vault +* [ListOperations.java][sample_list] and [ListOperationsAsync.java][sample_list_async] - Contains samples for following scenarios with tracing support: + * Create a secret. + * List secrets. + * Create new version of an existing secret. + * List versions of an existing secret. +#### Publish multiple Events to an Event Hub +* [PublishEvents.java][sample_publish_events] - Contains sample for publishing multiple events with tracing support. + +### Additional Documentation +For more extensive documentation on OpenCensus, see the [API reference documentation][opencensus]. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. + + +[api_documentation]: https://azure.github.io/azure-sdk-for-java/track2reports/index.html +[azure-keyvault-secrets]: ../keyvault/azure-keyvault-secrets +[azure-messaging-eventhubs]: ../eventhubs/azure-messaging-eventhubs +[azure-storage-queue]: ../storage/azure-storage-queue +[context]: ../core/azure-core/src/main/java/com/azure/core/util/Context.java +[create-eventhubs-builders]: ../eventhubs/azure-messaging-eventhubs#create-an-event-hub-client-using-a-connection-string +[maven]: https://maven.apache.org/ +[source_code]: src +[api_documentation]: https://aka.ms/java-docs +[sample_helloWorld]: ./src/samples/java/com/azure/core/tracing//HelloWorld.java +[sample_helloWorldAsync]: ./src/samples/java/com/azure/core/tracing/HelloWorldAsync.java +[sample_list]: ./src/samples/java/com/azure/core/tracing//ListOperationsTracing.java +[sample_list_async]: ./src/samples/java/com/azure/core/tracing//ListOperationsAsync.java +[sample_publish_events]: ./src/samples/java/com/azure/core/tracing/PublishEvents.java +[samples]: ./src/samples/java/com/azure/core/tracing/ +[opencensus]: https://opencensus.io/quickstart/java/tracing/ +[opencensus-quickstart]: https://opencensus.io/quickstart/java/tracing/ +[zipkin-quickstart]: https://zipkin.io/pages/quickstart + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/tracing/README.png) diff --git a/sdk/tracing/azure-core-tracing-opencensus/pom.xml b/sdk/tracing/azure-core-tracing-opencensus/pom.xml new file mode 100644 index 000000000000..ea3266750f80 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/pom.xml @@ -0,0 +1,81 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.4.0 + ../../../pom.client.xml + + + com.azure + azure-core-tracing-opencensus + 1.0.0-preview.3 + + Microsoft Azure OpenCensus tracing plugin + This package contains the OpenCensus tracing plugin for Azure client libraries. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + com.azure + azure-core + 1.0.0-preview.5 + + + io.opencensus + opencensus-api + + + + io.opencensus + opencensus-exporter-trace-zipkin + 0.20.0 + test + + + junit + junit + test + + + com.azure + azure-storage-queue + 12.0.0-preview.4 + test + + + com.azure + azure-keyvault-secrets + 4.0.0-preview.4 + test + + + com.azure + azure-identity + 1.0.0-preview.4 + test + + + com.azure + azure-messaging-eventhubs + 5.0.0-preview.4 + test + + + diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryHttpPolicy.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusHttpPolicy.java similarity index 89% rename from sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryHttpPolicy.java rename to sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusHttpPolicy.java index 2d2ae1ebf25a..97228999a03e 100644 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryHttpPolicy.java +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusHttpPolicy.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.tracing.opentelemetry; +package com.azure.core.tracing.opencensus; import com.azure.core.exception.HttpResponseException; 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.http.policy.AfterRetryPolicyProvider; +import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.implementation.util.ImplUtils; -import com.azure.tracing.opentelemetry.implementation.HttpTraceUtil; +import com.azure.core.tracing.opencensus.implementation.HttpTraceUtil; import io.opencensus.trace.AttributeValue; import io.opencensus.trace.Span; import io.opencensus.trace.Span.Kind; @@ -27,22 +27,22 @@ import java.util.Optional; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + /** - * Pipeline policy that creates an OpenTelemetry span which traces the service request. + * Pipeline policy that creates an OpenCensus span which traces the service request. */ -public class OpenTelemetryHttpPolicy implements AfterRetryPolicyProvider, HttpPipelinePolicy { +public class OpenCensusHttpPolicy implements AfterRetryPolicyProvider, HttpPipelinePolicy { /** - * @return a OpenTelemetry HTTP policy. + * @return a OpenCensus HTTP policy. */ public HttpPipelinePolicy create() { return this; } - // Singleton OpenTelemetry tracer capable of starting and exporting spans. + // Singleton OpenCensus tracer capable of starting and exporting spans. private static final Tracer TRACER = Tracing.getTracer(); - private static final String OPENTELEMETRY_SPAN_KEY = - com.azure.core.util.tracing.Tracer.OPENTELEMETRY_SPAN_KEY; // standard attributes with http call information private static final String HTTP_USER_AGENT = "http.user_agent"; @@ -57,7 +57,7 @@ public HttpPipelinePolicy create() { @Override public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - Span parentSpan = (Span) context.getData(OPENTELEMETRY_SPAN_KEY).orElse(TRACER.getCurrentSpan()); + Span parentSpan = (Span) context.getData(OPENCENSUS_SPAN_KEY).orElse(TRACER.getCurrentSpan()); HttpRequest request = context.getHttpRequest(); // Build new child span representing this outgoing request. @@ -82,7 +82,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN // run the next policy and handle success and error return next.process() - .doOnEach(OpenTelemetryHttpPolicy::handleResponse) + .doOnEach(OpenCensusHttpPolicy::handleResponse) .subscriberContext(Context.of("TRACING_SPAN", span, "REQUEST", request)); } @@ -162,7 +162,7 @@ private static void spanEnd(Span span, HttpResponse response, Throwable error) { private final TextFormat.Setter contextSetter = new TextFormat.Setter() { @Override public void put(HttpRequest request, String key, String value) { - request.setHeader(key, value); + request.getHeaders().put(key, value); } }; } diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java new file mode 100644 index 000000000000..acde457e5583 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/OpenCensusTracer.java @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.core.util.tracing.ProcessKind; +import com.azure.core.implementation.util.ImplUtils; +import com.azure.core.tracing.opencensus.implementation.AmqpPropagationFormatUtil; +import com.azure.core.tracing.opencensus.implementation.AmqpTraceUtil; +import com.azure.core.tracing.opencensus.implementation.HttpTraceUtil; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.Link; +import io.opencensus.trace.Span; +import io.opencensus.trace.Span.Options; +import io.opencensus.trace.SpanBuilder; +import io.opencensus.trace.SpanContext; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; + +import java.util.Objects; +import java.util.Optional; + +import static io.opencensus.trace.Link.Type.PARENT_LINKED_SPAN; + +/** + * Basic tracing implementation class for use with REST and AMQP Service Clients to create {@link Span} and in-process + * context propagation. + * + *

    + * This helper class supports W3C distributed tracing protocol and injects SpanContext into the outgoing HTTP + * and AMQP requests. + */ +public class OpenCensusTracer implements com.azure.core.util.tracing.Tracer { + // Singleton OpenCensus tracer capable of starting and exporting spans. + private static final Tracer TRACER = Tracing.getTracer(); + + // standard attributes with AMQP request + private static final String COMPONENT = "component"; + private static final String MESSAGE_BUS_DESTINATION = "message_bus.destination"; + private static final String PEER_ENDPOINT = "peer.address"; + + private final ClientLogger logger = new ClientLogger(OpenCensusTracer.class); + + /** + * {@inheritDoc} + */ + @Override + public Context start(String methodName, Context context) { + Objects.requireNonNull(methodName, "'methodName' cannot be null."); + Objects.requireNonNull(context, "'context' cannot be null."); + + SpanBuilder spanBuilder = getSpanBuilder(methodName, context); + Span span = spanBuilder.startSpan(); + + return context.addData(OPENCENSUS_SPAN_KEY, span); + } + + /** + * {@inheritDoc} + */ + @Override + public Context start(String spanName, Context context, ProcessKind processKind) { + Objects.requireNonNull(spanName, "'methodName' cannot be null."); + Objects.requireNonNull(context, "'context' cannot be null."); + Objects.requireNonNull(processKind, "'processKind' cannot be null."); + + Span span; + SpanBuilder spanBuilder; + + switch (processKind) { + case SEND: + spanBuilder = getSpanBuilder(spanName, context); + span = spanBuilder.setSpanKind(Span.Kind.CLIENT).startSpan(); + if (span.getOptions().contains(Span.Options.RECORD_EVENTS)) { + // If span is sampled in, add additional request attributes + addSpanRequestAttributes(span, context, spanName); + } + return context.addData(OPENCENSUS_SPAN_KEY, span); + case RECEIVE: + spanBuilder = getSpanBuilder(spanName, context); + span = spanBuilder.startSpan(); + // Add diagnostic Id and traceheaders to Context + context = setContextData(span); + return context.addData(OPENCENSUS_SPAN_KEY, span); + case PROCESS: + return startScopedSpan(spanName, context); + default: + return Context.NONE; + } + } + + /** + * {@inheritDoc} + */ + @Override + public void end(int responseCode, Throwable throwable, Context context) { + Objects.requireNonNull(context, "'context' cannot be null"); + final Span span = getSpan(context); + if (span == null) { + return; + } + + if (span.getOptions().contains(Options.RECORD_EVENTS)) { + span.setStatus(HttpTraceUtil.parseResponseStatus(responseCode, throwable)); + } + + span.end(); + } + + /** + * {@inheritDoc} + */ + @Override + public void setAttribute(String key, String value, Context context) { + if (ImplUtils.isNullOrEmpty(value)) { + logger.info("Failed to set span attribute since value is null or empty."); + return; + } + + final Span span = getSpan(context); + if (span != null) { + span.putAttribute(key, AttributeValue.stringAttributeValue(value)); + } else { + logger.warning("Failed to find span to add attribute."); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Context setSpanName(String spanName, Context context) { + return context.addData(OPENCENSUS_SPAN_NAME_KEY, spanName); + } + + /** + * {@inheritDoc} + */ + @Override + public void end(String statusMessage, Throwable throwable, Context context) { + final Span span = getSpan(context); + if (span == null) { + logger.warning("Failed to find span to end it."); + return; + } + + if (span.getOptions().contains(Options.RECORD_EVENTS)) { + span.setStatus(AmqpTraceUtil.parseStatusMessage(statusMessage, throwable)); + } + + span.end(); + } + + /** + * {@inheritDoc} + */ + @Override + public void addLink(Context context) { + final Span span = getSpan(context); + if (span == null) { + logger.warning("Failed to find span to link it."); + return; + } + + final SpanContext spanContext = getSpanContext(context); + if (spanContext == null) { + logger.warning("Failed to find span context to link it."); + return; + } + // TODO: Needs to be updated with Open Telemetry support to addLink using Span Context before span is started + // and no link type is needed. + span.addLink(Link.fromSpanContext(spanContext, PARENT_LINKED_SPAN)); + } + + /** + * {@inheritDoc} + */ + @Override + public Context extractContext(String diagnosticId, Context context) { + return AmqpPropagationFormatUtil.extractContext(diagnosticId, context); + } + + /** + * Starts a new child {@link Span} with parent being the remote and uses the {@link Span} is in the current Context, + * to return an object that represents that scope. + *

    The scope is exited when the returned object is closed.

    + * + * @param spanName The name of the returned Span. + * @param context The {@link Context} containing the {@link SpanContext}. + * @return The returned {@link Span} and the scope in a {@link Context} object. + */ + private Context startScopedSpan(String spanName, Context context) { + Objects.requireNonNull(spanName, "'spanName' cannot be null."); + Objects.requireNonNull(context, "'context' cannot be null."); + Span span; + SpanContext spanContext = getSpanContext(context); + if (spanContext != null) { + span = startSpanWithRemoteParent(spanName, spanContext); + } else { + SpanBuilder spanBuilder = getSpanBuilder(spanName, context); + span = spanBuilder.setSpanKind(Span.Kind.SERVER).startSpan(); + } + return context.addData(OPENCENSUS_SPAN_KEY, span).addData("scope", TRACER.withSpan(span)); + } + + /** + * Creates a {@link SpanBuilder} to create and start a new child {@link Span} with parent being the remote and + * designated by the {@link SpanContext}. + * + * @param spanName The name of the returned Span. + * @param spanContext The remote parent context of the returned Span. + * @return A {@link Span} with parent being the remote {@link Span} designated by the {@link SpanContext}. + */ + private Span startSpanWithRemoteParent(String spanName, SpanContext spanContext) { + SpanBuilder spanBuilder = TRACER.spanBuilderWithRemoteParent(spanName, spanContext); + spanBuilder.setSpanKind(Span.Kind.SERVER); + return spanBuilder.startSpan(); + } + + /** + * Extracts the {@link SpanContext trace identifiers} and the {@link SpanContext} of the current tracing span as + * text and returns in a {@link Context} object. + * + * @param span The current tracing span. + * @return The {@link Context} containing the {@link SpanContext} and traceparent of the current span. + */ + private Context setContextData(Span span) { + SpanContext spanContext = span.getContext(); + final String traceparent = AmqpPropagationFormatUtil.getDiagnosticId(spanContext); + return new Context(DIAGNOSTIC_ID_KEY, traceparent).addData(SPAN_CONTEXT, spanContext); + } + + /** + * Extracts request attributes from the given {@code context} and adds it to the started span. + * + * @param span The span to which request attributes are to be added. + * @param context The context containing the request attributes. + * @param spanName The name of the returned Span containing the component value. + */ + private void addSpanRequestAttributes(Span span, Context context, String spanName) { + Objects.requireNonNull(span, "'span' cannot be null."); + + span.putAttribute(COMPONENT, AttributeValue.stringAttributeValue(parseComponentValue(spanName))); + span.putAttribute( + MESSAGE_BUS_DESTINATION, + AttributeValue.stringAttributeValue(getRequestKeyAttribute(context, ENTITY_PATH))); + span.putAttribute( + PEER_ENDPOINT, + AttributeValue.stringAttributeValue(getRequestKeyAttribute(context, HOST_NAME))); + } + + /** + * Extracts component name from the given span name. + * + * @param spanName The spanName containing the component name. + * @return The component name contained in the context. + */ + private static String parseComponentValue(String spanName) { + return spanName.substring(spanName.indexOf(".") + 1, spanName.lastIndexOf(".")); + } + + /** + * Extracts request attributes from the given {@code context} and provided key. + * + * @param context The context containing the entity path. + * @param key The name of the attribute that needs to be extracted from the {@code Context}. + * @return The value for the provided key contained in the context. + */ + private String getRequestKeyAttribute(Context context, String key) { + final Optional optionalObject = context.getData(key); + + if (!optionalObject.isPresent()) { + logger.warning("Failed to find {} in the context.", key); + return ""; + } + + final Object value = optionalObject.get(); + if (!(value instanceof String)) { + logger.warning("Could not extract {}. Data is not of type String. Actual class: {}", + key, + value.getClass()); + return ""; + } + + return value.toString(); + } + + /** + * Extracts a {@link Span} from the given {@code context}. + * + * @param context The context containing the span. + * @return The {@link Span} contained in the context, and {@code null} if it does not. + */ + private Span getSpan(Context context) { + final Optional spanOptional = context.getData(OPENCENSUS_SPAN_KEY); + if (!spanOptional.isPresent()) { + logger.warning("Failed to find span in the context."); + return null; + } + + final Object value = spanOptional.get(); + if (!(value instanceof Span)) { + logger.warning("Could not extract span. Data in {} is not of type Span. Actual class: {}", + OPENCENSUS_SPAN_KEY, + value.getClass()); + return null; + } + + return (Span) value; + } + + /** + * Extracts the span name from the given {@code context}. + * + * @param context The context containing the span name. + * @return The span name contained in the context, and {@code null} if it does not. + */ + private String getSpanName(Context context) { + final Optional spanNameOptional = context.getData(OPENCENSUS_SPAN_NAME_KEY); + if (!spanNameOptional.isPresent()) { + logger.warning("Failed to find span name in the context."); + return null; + } + + final Object value = spanNameOptional.get(); + if (!(value instanceof String)) { + logger.warning("Could not extract span name. Data in {} is not of type String. Actual class: {}", + OPENCENSUS_SPAN_NAME_KEY, + value.getClass()); + return null; + } + + return value.toString(); + } + + /** + * Extracts a {@link SpanContext} from the given {@code context}. + * + * @param context The context containing the span context. + * @return The {@link SpanContext} contained in the context, and {@code null} if it does not. + */ + private SpanContext getSpanContext(Context context) { + final Optional spanContextOptional = context.getData(SPAN_CONTEXT); + if (!spanContextOptional.isPresent()) { + logger.warning("Failed to find span context in the context."); + return null; + } + + final Object value = spanContextOptional.get(); + if (!(value instanceof SpanContext)) { + logger.warning("Could not extract span context. Data is not of type SpanContext. Actual class: {}", + value.getClass()); + return null; + } + + return (SpanContext) value; + } + + /** + * Returns a {@link SpanBuilder} to create and start a new child {@link Span} with parent being the designated + * {@code Span}. + * + * @param spanName The name of the returned Span. + * @param context The context containing the span and the span name. + * @return A {@code SpanBuilder} to create and start a new {@code Span}. + */ + private SpanBuilder getSpanBuilder(String spanName, Context context) { + Span parentSpan = getSpan(context) == null ? TRACER.getCurrentSpan() : getSpan(context); + String spanNameKey = getSpanName(context) == null ? spanName : getSpanName(context); + SpanBuilder spanBuilder = TRACER.spanBuilderWithExplicitParent(spanNameKey, parentSpan); + return spanBuilder; + } +} diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpPropagationFormatUtil.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtil.java similarity index 90% rename from sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpPropagationFormatUtil.java rename to sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtil.java index 14589b23ecff..4c54407e5849 100644 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpPropagationFormatUtil.java +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtil.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.tracing.opentelemetry.implementation; +package com.azure.core.tracing.opencensus.implementation; import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; @@ -11,6 +11,8 @@ import io.opencensus.trace.TraceOptions; import io.opencensus.trace.Tracestate; +import java.util.Objects; + public class AmqpPropagationFormatUtil { private AmqpPropagationFormatUtil() { } @@ -33,11 +35,13 @@ public static Context extractContext(String diagnosticId, Context context) { * for more information on the conversion of these fields to Span Context format. * * @param spanContext is a specification defines an agreed-upon format for the exchange of trace context propagation - * data - * @retrun The dignostic Id providing an unique identifier for individual traces and requests, + * data. + * @return The dignostic Id providing an unique identifier for individual traces and requests, * allowing trace data of multiple providers to be linked together. + * @throws NullPointerException if {@code spanContext} is {@code null}. */ public static String getDiagnosticId(SpanContext spanContext) { + Objects.requireNonNull(spanContext, "'spanContext' cannot be null"); char[] chars = new char[55]; chars[0] = '0'; chars[1] = '0'; diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpTraceUtil.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java similarity index 95% rename from sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpTraceUtil.java rename to sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java index 48cc2c2810d1..25c330c0d002 100644 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/AmqpTraceUtil.java +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtil.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.tracing.opentelemetry.implementation; +package com.azure.core.tracing.opencensus.implementation; import io.opencensus.trace.Status; diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/HttpTraceUtil.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtil.java similarity index 95% rename from sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/HttpTraceUtil.java rename to sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtil.java index 6f9bd5049c66..68be48a05f3c 100644 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/implementation/HttpTraceUtil.java +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtil.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.tracing.opentelemetry.implementation; +package com.azure.core.tracing.opencensus.implementation; import io.opencensus.trace.Status; @@ -28,18 +28,18 @@ public final class HttpTraceUtil { private HttpTraceUtil() { } /** - * Parse OpenTelemetry Status from HTTP response status code. + * Parse OpenCensus Status from HTTP response status code. * *

    This method serves a default routine to map HTTP status code to Open Census Status. The * mapping is defined in Google API * canonical error code, and the behavior is defined in OpenTelemetry + * href="https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/HTTP.md">OpenCensus * Specs. * * @param statusCode the HTTP response status code. {@code 0} means invalid response. * @param error the error occurred during response transmission (optional). - * @return the corresponding OpenTelemetry {@code Status}. + * @return the corresponding OpenCensus {@code Status}. */ public static Status parseResponseStatus(int statusCode, Throwable error) { String message = null; diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/package-info.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/package-info.java new file mode 100644 index 000000000000..7103e663493f --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/com/azure/core/tracing/opencensus/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * An OpenCensus implementation of the tracing APIs required by azure-core to enable users to effectively trace their + * calls and have this information submitted to an OpenCensus backend. + */ +package com.azure.core.tracing.opencensus; diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/main/java/module-info.java b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/module-info.java new file mode 100644 index 000000000000..fd8201ad2b0e --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/java/module-info.java @@ -0,0 +1,11 @@ +module com.azure.core.tracing.opencensus { + requires com.azure.core; + requires opencensus.api; + + exports com.azure.core.tracing.opencensus; + + provides com.azure.core.util.tracing.Tracer + with com.azure.core.tracing.opencensus.OpenCensusTracer; + provides com.azure.core.http.policy.AfterRetryPolicyProvider + with com.azure.core.tracing.opencensus.OpenCensusHttpPolicy; +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.implementation.http.policy.spi.AfterRetryPolicyProvider b/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.implementation.http.policy.spi.AfterRetryPolicyProvider new file mode 100644 index 000000000000..ce924dfff53b --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.implementation.http.policy.spi.AfterRetryPolicyProvider @@ -0,0 +1 @@ +com.azure.core.tracing.opencensus.OpenCensusHttpPolicy diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer b/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer new file mode 100644 index 000000000000..46d0f4640c99 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer @@ -0,0 +1 @@ +com.azure.core.tracing.opencensus.OpenCensusTracer diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorld.java b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorld.java new file mode 100644 index 000000000000..0fde58e61558 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorld.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.core.util.Context; +import com.azure.storage.queue.QueueClient; +import com.azure.storage.queue.QueueClientBuilder; +import io.opencensus.common.Scope; +import io.opencensus.exporter.trace.zipkin.ZipkinTraceExporter; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + +/* + * This example shows tracing support in azure-storage-queue SDK using azure-core-tracing plugin package. + */ +public class HelloWorld { + private static final String ACCOUNT_NAME = System.getenv("AZURE_STORAGE_ACCOUNT_NAME"); + private static final String QUEUE_NAME = "queue_name"; + + /** + * The main method shows how we do the basic operations of enqueueing and dequeueing messages on async queue client + * with tracing enabled support. This example relies on user the having started a Zipkin exporter localhost on port + * 9411. + * + * Please refer to the Quickstart Zipkin for more documentation on + * using a Zipkin exporter. + * + * @param args No args needed for main method. + */ + public static void main(String[] args) { + ZipkinTraceExporter.createAndRegister("http://localhost:9411/api/v2/spans", "tracing-to-zipkin-service"); + + TraceConfig traceConfig = Tracing.getTraceConfig(); + TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + + Tracer tracer = Tracing.getTracer(); + + Scope scope = tracer.spanBuilder("user-parent-span").startScopedSpan(); + try { + QueueClient queueClient = new QueueClientBuilder() + .endpoint(String.format("https://%s.queue.core.windows.net/%s%s", ACCOUNT_NAME, QUEUE_NAME, "")) + .buildClient(); + + // Create a queue, enqueue two messages. + Context tracingContext = new Context(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); + queueClient.createWithResponse(null, null, tracingContext); + queueClient.enqueueMessageWithResponse("This is message 1", null, null, null, tracingContext); + queueClient.enqueueMessageWithResponse("This is message 2", null, null, null, tracingContext); + System.out.println("Enqueuing of messages has completed!"); + + } finally { + scope.close(); + Tracing.getExportComponent().shutdown(); + } + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorldAsync.java b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorldAsync.java new file mode 100644 index 000000000000..7ff5d44ea55e --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/HelloWorldAsync.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.storage.queue.QueueAsyncClient; +import com.azure.storage.queue.QueueClientBuilder; +import io.opencensus.common.Scope; +import io.opencensus.exporter.trace.zipkin.ZipkinTraceExporter; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; +import reactor.util.context.Context; + +import java.util.concurrent.Semaphore; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + +/* + * This example shows tracing support in azure-storage-queue SDK using azure-core-tracing plugin package. + */ +public class HelloWorldAsync { + private static final String ACCOUNT_NAME = System.getenv("AZURE_STORAGE_ACCOUNT_NAME"); + private static final String QUEUE_NAME = "queue_name"; + + /** + * The main method shows how we do the basic operations of enqueueing and dequeueing messages on async queue client + * with tracing enabled support. This example relies on user the having started a Zipkin exporter localhost on port + * 9411. + * + * Please refer to the Quickstart Zipkin for more documentation on + * using a Zipkin exporter. + * + * @param args No args needed for main method. + * @throws InterruptedException when the thread is interrupted in sleep mode. + */ + public static void main(String[] args) throws InterruptedException { + ZipkinTraceExporter.createAndRegister("http://localhost:9411/api/v2/spans", "tracing-to-zipkin-service"); + + TraceConfig traceConfig = Tracing.getTraceConfig(); + TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + + Tracer tracer = Tracing.getTracer(); + Semaphore semaphore = new Semaphore(1); + Scope scope = tracer.spanBuilder("user-parent-span").startScopedSpan(); + + semaphore.acquire(); + String queueURL = String.format("https://%s.queue.core.windows.net/%s%s", ACCOUNT_NAME, QUEUE_NAME, ""); + QueueAsyncClient queueAsyncClient = new QueueClientBuilder().endpoint(queueURL).buildAsyncClient(); + + // Create a queue, enqueue two messages. + queueAsyncClient.create() + .doOnSuccess(response -> queueAsyncClient.enqueueMessage("This is message 1")) + .then(queueAsyncClient.enqueueMessage("This is message 2")) + .subscriberContext(Context.of(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan())) + .subscribe( + response -> System.out.printf("Message successfully enqueued by queueAsyncClient. Message id: %s%n", + response.getMessageId()), + err -> { + System.out.printf("Error thrown when enqueue the message. Error message: %s%n", + err.getMessage()); + scope.close(); + semaphore.release(); + }, + () -> { + scope.close(); + semaphore.release(); + System.out.println("The enqueue has been completed."); + Tracing.getExportComponent().shutdown(); + }); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperations.java b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperations.java new file mode 100644 index 000000000000..42474eb27b98 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperations.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.core.util.Context; +import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.security.keyvault.secrets.SecretClient; +import com.azure.security.keyvault.secrets.SecretClientBuilder; +import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.SecretBase; +import io.opencensus.common.Scope; +import io.opencensus.exporter.trace.zipkin.ZipkinTraceExporter; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + +/** + * Sample demonstrates how to list secrets and versions of a given secret in the key vault with tracing enabled. + */ +public class ListOperations { + /** + * Authenticates with the key vault and shows how to list secrets and list versions of a specific secret in the key + * vault with trace spans exported to Zipkin. + * + * Please refer to the Quickstart Zipkin for more documentation on + * using a Zipkin exporter. + * + * @param args Unused. Arguments to the program. + * @throws IllegalArgumentException when invalid key vault endpoint is passed. + */ + public static void main(String[] args) throws IllegalArgumentException { + ZipkinTraceExporter.createAndRegister("http://localhost:9411/api/v2/spans", "tracing-to-zipkin-service"); + + TraceConfig traceConfig = Tracing.getTraceConfig(); + TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + + Tracer tracer = Tracing.getTracer(); + + // Instantiate a client that will be used to call the service. Notice that the client is using default Azure + // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', + // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. + SecretClient client = new SecretClientBuilder() + .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + + Scope scope = tracer.spanBuilder("user-parent-span").startScopedSpan(); + try { + + Context traceContext = new Context(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); + // Let's create secrets holding storage and bank accounts credentials. if the secret + // already exists in the key vault, then a new version of the secret is created. + client.setSecretWithResponse(new Secret("StorageAccountPassword", "password"), traceContext); + + client.setSecretWithResponse(new Secret("BankAccountPassword", "password"), traceContext); + + // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. + // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. + for (SecretBase secret : client.listSecrets(traceContext)) { + Secret secretWithValue = client.getSecretWithResponse(secret, traceContext).getValue(); + System.out.printf("Received secret with name %s and value %s%n", secretWithValue.getName(), secretWithValue.getValue()); + } + + // The bank account password got updated, so you want to update the secret in key vault to ensure it reflects the new password. + // Calling setSecret on an existing secret creates a new version of the secret in the key vault with the new value. + client.setSecret("BankAccountPassword", "newPassword"); + + // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. + for (SecretBase secret : client.listSecretVersions("BankAccountPassword", traceContext)) { + Secret secretWithValue = client.getSecretWithResponse(secret, traceContext).getValue(); + System.out.printf("Received secret's version with name %s and value %s%n", secretWithValue.getName(), secretWithValue.getValue()); + } + } finally { + scope.close(); + Tracing.getExportComponent().shutdown(); + } + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperationsAsync.java b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperationsAsync.java new file mode 100644 index 000000000000..19c679b97509 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/ListOperationsAsync.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.identity.credential.DefaultAzureCredentialBuilder; +import com.azure.security.keyvault.secrets.SecretAsyncClient; +import com.azure.security.keyvault.secrets.SecretClientBuilder; +import com.azure.security.keyvault.secrets.models.Secret; +import io.opencensus.common.Scope; +import io.opencensus.exporter.trace.zipkin.ZipkinTraceExporter; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; +import reactor.util.context.Context; + +import java.util.concurrent.Semaphore; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; + +/** + * Sample demonstrates how to list secrets and versions of a given secret in the key vault with tracing enabled. + */ +public class ListOperationsAsync { + /** + * Authenticates with the key vault and shows how to list secrets and list versions of a specific secret in the key + * vault with trace spans exported to Zipkin. + * + * Please refer to the Quickstart Zipkin for more documentation on + * using a Zipkin exporter. + * + * @param args Unused. Arguments to the program. + * @throws IllegalArgumentException when invalid key vault endpoint is passed. + * @throws InterruptedException when the thread is interrupted in sleep mode. + */ + public static void main(String[] args) throws IllegalArgumentException, InterruptedException { + ZipkinTraceExporter.createAndRegister("http://localhost:9411/api/v2/spans", "tracing-to-zipkin-service"); + + TraceConfig traceConfig = Tracing.getTraceConfig(); + TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + + Tracer tracer = Tracing.getTracer(); + + // Instantiate a client that will be used to call the service. Notice that the client is using default Azure + // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', + // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. + SecretAsyncClient client = new SecretClientBuilder() + .endpoint("https://{YOUR_VAULT_NAME}.vault.azure.net") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildAsyncClient(); + + Semaphore semaphore = new Semaphore(1); + Scope scope = tracer.spanBuilder("user-parent-span").startScopedSpan(); + + semaphore.acquire(); + Context traceContext = Context.of(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); + // Let's create secrets holding storage and bank accounts credentials. if the secret + // already exists in the key vault, then a new version of the secret is created. + client.setSecret(new Secret("StorageAccountPassword", "password")) + .then(client.setSecret(new Secret("BankAccountPassword", "password"))) + .subscriberContext(traceContext) + .subscribe(secretResponse -> + System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue()), + err -> { + System.out.printf("Error thrown when enqueue the message. Error message: %s%n", + err.getMessage()); + scope.close(); + semaphore.release(); + }, + () -> { + semaphore.release(); + }); + + semaphore.acquire(); + // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. + // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. + client.listSecrets() + .subscriberContext(traceContext) + .subscribe(secretBase -> client.getSecret(secretBase) + .subscriberContext(traceContext) + .subscribe(secret -> System.out.printf("Received secret with name %s and value %s%n", + secret.getName(), secret.getValue()))); + + // The bank account password got updated, so you want to update the secret in key vault to ensure it reflects the new password. + // Calling setSecret on an existing secret creates a new version of the secret in the key vault with the new value. + client.setSecret("BankAccountPassword", "new password") + .subscriberContext(traceContext) + .subscribe(secretResponse -> + System.out.printf("Secret is created with name %s and value %s %n", secretResponse.getName(), secretResponse.getValue()), + err -> { + System.out.printf("Error thrown when enqueue the message. Error message: %s%n", + err.getMessage()); + scope.close(); + semaphore.release(); + }, + () -> { + semaphore.release(); + }); + + semaphore.acquire(); + + // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. + client.listSecretVersions("BankAccountPassword") + .subscriberContext(traceContext) + .subscribe(secretBase -> System.out.printf("Received secret's version with name %s%n", + secretBase.getName())); + + scope.close(); + Tracing.getExportComponent().shutdown(); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/PublishEvents.java b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/PublishEvents.java new file mode 100644 index 000000000000..9dad2840cad9 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/samples/java/com/azure/core/tracing/opencensus/PublishEvents.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.core.util.Context; +import com.azure.messaging.eventhubs.EventData; +import com.azure.messaging.eventhubs.EventHubAsyncClient; +import com.azure.messaging.eventhubs.EventHubAsyncProducer; +import com.azure.messaging.eventhubs.EventHubClientBuilder; +import io.opencensus.common.Scope; +import io.opencensus.exporter.trace.zipkin.ZipkinTraceExporter; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceConfig; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.samplers.Samplers; +import reactor.core.publisher.Flux; + +import java.io.IOException; +import java.util.concurrent.Semaphore; + +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Sample demonstrates how to send a message to an Azure Event Hub with tracing support. + */ +public class PublishEvents { + private static final String CONNECTION_STRING = System.getenv("AZURE_EVENTHUBS_CONNECTION_STRING"); + + /** + * Main method to invoke this demo on how to send a message to an Azure Event Hub with trace spans exported to + * Zipkin. + * + * Please refer to the Quickstart Zipkin for more documentation on + * using a Zipkin exporter. + * + * @param args Unused arguments to the program. + * @throws InterruptedException when the thread is interrupted in sleep mode. + */ + public static void main(String[] args) throws InterruptedException { + ZipkinTraceExporter.createAndRegister("http://localhost:9411/api/v2/spans", "tracing-to-zipkin-service"); + + TraceConfig traceConfig = Tracing.getTraceConfig(); + TraceParams activeTraceParams = traceConfig.getActiveTraceParams(); + traceConfig.updateActiveTraceParams(activeTraceParams.toBuilder().setSampler(Samplers.alwaysSample()).build()); + + Tracer tracer = Tracing.getTracer(); + Semaphore semaphore = new Semaphore(1); + Scope scope = tracer.spanBuilder("user-parent-span").startScopedSpan(); + + semaphore.acquire(); + // The connection string value can be obtained by: + // 1. Going to your Event Hubs namespace in Azure Portal. + // 2. Creating an Event Hub instance. + // 3. Creating a "Shared access policy" for your Event Hub instance. + // 4. Copying the connection string from the policy's properties. + + // Instantiate a client that will be used to call the service. + EventHubAsyncClient client = new EventHubClientBuilder() + .connectionString(CONNECTION_STRING) + .buildAsyncClient(); + + Context context = new Context(OPENCENSUS_SPAN_KEY, tracer.getCurrentSpan()); + final int count = 2; + final byte[] body = "Hello World!".getBytes(UTF_8); + final Flux testData = Flux.range(0, count).flatMap(number -> { + final EventData data = new EventData(body, context); + return Flux.just(data); + }); + + // Create a producer. This overload of `createProducer` does not accept any arguments. Consequently, events + // sent from this producer are load balanced between all available partitions in the Event Hub instance. + EventHubAsyncProducer producer = client.createProducer(); + + // Send those events. This call returns a Mono, which we subscribe to. It completes successfully when the + // event has been delivered to the Event Hub. It completes with an error if an exception occurred while sending + // the event. + producer.send(testData).subscribe( + response -> System.out.println("Message successfully sent"), + err -> { + System.out.printf("Error thrown when sending the message. Error message: %s%n", + err.getMessage()); + scope.close(); + semaphore.release(); + }, + () -> { + semaphore.release(); + System.out.println("The process has been completed."); + }); + semaphore.acquire(); + try { + producer.close(); + } catch (IOException e) { + System.err.println("Error encountered while closing producer: " + e.toString()); + } + + client.close(); + scope.close(); + Tracing.getExportComponent().shutdown(); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java new file mode 100644 index 000000000000..823cc5397f56 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/OpenCensusTracerTest.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.tracing.opencensus; + +import com.azure.core.util.tracing.ProcessKind; +import com.azure.core.tracing.opencensus.implementation.AmqpPropagationFormatUtil; +import com.azure.core.util.Context; +import io.opencensus.trace.Span; +import io.opencensus.trace.SpanContext; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import static com.azure.core.util.tracing.Tracer.DIAGNOSTIC_ID_KEY; +import static com.azure.core.util.tracing.Tracer.OPENCENSUS_SPAN_KEY; +import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertTrue; + +// TODO: samvaity - Need to add integration test - https://github.com/Azure/azure-sdk-for-java/issues/5156 +public class OpenCensusTracerTest { + private static final String METHOD_NAME = "Azure.eventhubs.send"; + private OpenCensusTracer openCensusTracer; + + @Before + public void setup() { + openCensusTracer = new OpenCensusTracer(); + } + + @Test(expected = NullPointerException.class) + public void startSpanNullPointerException() { + // Act + openCensusTracer.start("", null); + } + + @Test + public void startSpanReturnsNewSpanTest() { + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, Context.NONE); + + // Assert + Assert.assertNotNull(updatedContext.getData(OPENCENSUS_SPAN_KEY)); + assertTrue(updatedContext.getData(OPENCENSUS_SPAN_KEY).get() instanceof Span); + } + + @Test(expected = NullPointerException.class) + public void startSpanOverloadNullPointerException() { + // Act + openCensusTracer.start("", Context.NONE, null); + } + + @Test + public void startSpanSendOperation() { + // Act + final Context updatedContext = openCensusTracer.start(METHOD_NAME, Context.NONE, ProcessKind.SEND); + + // Assert + assertTrue(updatedContext.getData(OPENCENSUS_SPAN_KEY).get() instanceof Span); + } + + @Test + public void startSpanReceiveOperation() { + // Act + final Context returnedContext = openCensusTracer.start(METHOD_NAME, Context.NONE, ProcessKind.RECEIVE); + + // Assert + assertTrue(returnedContext.getData(OPENCENSUS_SPAN_KEY).get() instanceof Span); + assertNotNull(returnedContext.getData(DIAGNOSTIC_ID_KEY)); + assertNotNull(returnedContext.getData(SPAN_CONTEXT)); + String diagnosticId = (String) returnedContext.getData(DIAGNOSTIC_ID_KEY).get(); + SpanContext returnedSpanContext = (SpanContext) returnedContext.getData(SPAN_CONTEXT).get(); + // validate the span context and diagnostic Id are the same + assertEquals(diagnosticId, AmqpPropagationFormatUtil.getDiagnosticId(returnedSpanContext)); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtilTest.java b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtilTest.java new file mode 100644 index 000000000000..6e8017d223d0 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpPropagationFormatUtilTest.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.core.tracing.opencensus.implementation; + +import com.azure.core.util.Context; +import io.opencensus.trace.*; +import org.junit.Assert; +import org.junit.Test; + +import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT; + +public class AmqpPropagationFormatUtilTest { + + @Test + public void extractContextReturnsSpanContext() { + // Act + Context context = AmqpPropagationFormatUtil.extractContext("", Context.NONE); + + // Assert + Assert.assertNotNull(context); + Assert.assertTrue(context.getData(SPAN_CONTEXT).isPresent()); + } + + @Test + public void getInvalidSpanContext() { + // Act + Context context = AmqpPropagationFormatUtil.extractContext("", Context.NONE); + + // Assert + Assert.assertNotNull(context); + Assert.assertFalse("Invalid diagnostic Id, returns invalid SpanContext ", + ((SpanContext) context.getData(SPAN_CONTEXT).get()).getTraceId().isValid()); + } + + @Test + public void getValidSpanContext() { + // Act + Context context = AmqpPropagationFormatUtil.extractContext("00-0af7651916cd43dd8448eb211c80319c-b9c7c989f97918e1-01", Context.NONE); + + // Assert + Assert.assertNotNull(context); + Assert.assertTrue("Valid diagnostic Id, returns valid SpanContext ", + ((SpanContext) context.getData(SPAN_CONTEXT).get()).getTraceId().isValid()); + } + + @Test + public void getValidDiagnosticId() { + //Arrange + final String testDiagnosticID = "00-0af7651916cd43dd8448eb211c80319c-b9c7c989f97918e1-01"; + final Context context = AmqpPropagationFormatUtil.extractContext(testDiagnosticID, Context.NONE); + final SpanContext spanContext = (SpanContext) context.getData(SPAN_CONTEXT).get(); + + // Act + String diagnosticId = AmqpPropagationFormatUtil.getDiagnosticId(spanContext); + + // Assert + Assert.assertNotNull(diagnosticId); + Assert.assertEquals(testDiagnosticID, diagnosticId); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtilTest.java b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtilTest.java new file mode 100644 index 000000000000..67903337bbd6 --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/AmqpTraceUtilTest.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.core.tracing.opencensus.implementation; + +import io.opencensus.trace.Status; +import org.junit.Assert; +import org.junit.Test; + +public class AmqpTraceUtilTest { + + @Test + public void parseUnknownStatusMessage() { + // Act + + Status status = AmqpTraceUtil.parseStatusMessage("", null); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.UNKNOWN.withDescription(""), status); + } + + @Test + public void parseSuccessStatusMessage() { + // Act + + Status status = AmqpTraceUtil.parseStatusMessage("success", null); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.OK, status); + } + + @Test + public void parseStatusMessageOnError() { + // Act + + Status status = AmqpTraceUtil.parseStatusMessage("", new Error("testError")); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.UNKNOWN.withDescription("testError"), status); + } +} diff --git a/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtilTest.java b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtilTest.java new file mode 100644 index 000000000000..734ef156ec8c --- /dev/null +++ b/sdk/tracing/azure-core-tracing-opencensus/src/test/java/com/azure/core/tracing/opencensus/implementation/HttpTraceUtilTest.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.core.tracing.opencensus.implementation; + +import io.opencensus.trace.Status; +import org.junit.Assert; +import org.junit.Test; + +public class HttpTraceUtilTest { + @Test + public void parseUnknownStatusCode() { + // Act + + Status status = HttpTraceUtil.parseResponseStatus(1, null); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.UNKNOWN.withDescription(null), status); + } + + @Test + public void parseUnauthenticatedStatusCode() { + //Arrange + final String errorMessage = "unauthenticated test user"; + + // Act + Status status = HttpTraceUtil.parseResponseStatus(401, new Error(errorMessage)); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.UNAUTHENTICATED.withDescription(errorMessage), status); + } + + @Test + public void parseNullError() { + // Act + Status status = HttpTraceUtil.parseResponseStatus(504, null); + + // Assert + Assert.assertNotNull(status); + Assert.assertEquals(Status.DEADLINE_EXCEEDED.withDescription(null), status); + } +} diff --git a/sdk/tracing/ci.yml b/sdk/tracing/ci.yml index d43cfa04b30d..0ccbc2036fa6 100644 --- a/sdk/tracing/ci.yml +++ b/sdk/tracing/ci.yml @@ -38,6 +38,6 @@ stages: parameters: ServiceDirectory: tracing Artifacts: - - name: tracing-opentelemetry - safeName: tracingopentelemetry - stagingProfileId: 88192f04117501 \ No newline at end of file + - name: azure-core-tracing-opencensus + safeName: azurecoretracingopencensus + stagingProfileId: 88192f04117501 diff --git a/sdk/tracing/pom.service.xml b/sdk/tracing/pom.service.xml index b5b793f3d10b..0d3a66c010ae 100644 --- a/sdk/tracing/pom.service.xml +++ b/sdk/tracing/pom.service.xml @@ -10,6 +10,14 @@ 1.0.0 ../core/azure-core - tracing-opentelemetry + ../core/azure-core-amqp + ../core/azure-core-test + ../core/azure-core-http-netty + ../identity/azure-identity + ../storage/azure-storage-queue + ../storage/azure-storage-common + ../eventhubs/azure-messaging-eventhubs + ../keyvault/azure-keyvault-secrets + azure-core-tracing-opencensus diff --git a/sdk/tracing/tracing-opentelemetry/CHANGELOG.md b/sdk/tracing/tracing-opentelemetry/CHANGELOG.md deleted file mode 100644 index b23006fe5f56..000000000000 --- a/sdk/tracing/tracing-opentelemetry/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -## Version 1.0.0-preview.1: - -Version 1.0.0-preview.1 is the first preview of our efforts to provide low level interfaces and helper methods to support tracing for Java client libraries. This library includes [OpenTelemetry](https://opentelemetry.io/) implementation of the interface, - For more information about this, and preview releases of other Azure SDK libraries, please visit -https://aka.ms/azure-sdk-preview2-java. diff --git a/sdk/tracing/tracing-opentelemetry/README.md b/sdk/tracing/tracing-opentelemetry/README.md deleted file mode 100644 index 32f1ffca0789..000000000000 --- a/sdk/tracing/tracing-opentelemetry/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Azure Tracing client library for Java - -## Getting started - -## Key concepts - -## Examples - -## Troubleshooting - -## Next steps - -## Contributing - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/tracing/tracing-opentelemetry/README.png) \ No newline at end of file diff --git a/sdk/tracing/tracing-opentelemetry/pom.xml b/sdk/tracing/tracing-opentelemetry/pom.xml deleted file mode 100644 index 410514b46c1c..000000000000 --- a/sdk/tracing/tracing-opentelemetry/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.4.0 - ../../../pom.client.xml - - - com.azure - tracing-opentelemetry - 1.0.0-preview.3 - - Microsoft Azure OpenTelemetry tracing plugin - This package contains the OpenTelemetry tracing plugin for Azure client libraries. - https://github.com/Azure/azure-sdk-for-java - - - - azure-java-build-docs - ${site.url}/site/${project.artifactId} - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - - com.azure - azure-core - 1.0.0-preview.5 - - - io.opencensus - opencensus-api - - - com.azure - azure-core - 1.0.0-preview.5 - compile - - - diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryTracer.java b/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryTracer.java deleted file mode 100644 index 564499d464fe..000000000000 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/OpenTelemetryTracer.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.tracing.opentelemetry; - -import com.azure.core.implementation.tracing.ProcessKind; -import com.azure.core.implementation.util.ImplUtils; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.tracing.opentelemetry.implementation.AmqpPropagationFormatUtil; -import com.azure.tracing.opentelemetry.implementation.AmqpTraceUtil; -import com.azure.tracing.opentelemetry.implementation.HttpTraceUtil; -import io.opencensus.trace.AttributeValue; -import io.opencensus.trace.Link; -import io.opencensus.trace.Span; -import io.opencensus.trace.Span.Options; -import io.opencensus.trace.SpanBuilder; -import io.opencensus.trace.SpanContext; -import io.opencensus.trace.Tracer; -import io.opencensus.trace.Tracing; - -import java.util.Locale; -import java.util.Optional; - -import static io.opencensus.trace.Link.Type.PARENT_LINKED_SPAN; - -/** - * OpenTelemetry span - */ -public class OpenTelemetryTracer implements com.azure.core.util.tracing.Tracer { - // Singleton OpenTelemetry tracer capable of starting and exporting spans. - private static final Tracer TRACER = Tracing.getTracer(); - - // standard attributes with AMQP call information - private static final String COMPONENT = "component"; - private static final String MESSAGE_BUS_DESTINATION = "message_bus.destination"; - private static final String PEER_ENDPOINT = "peer.address"; - - private final ClientLogger logger = new ClientLogger(OpenTelemetryTracer.class); - - @Override - public Context start(String methodName, Context context) { - Span parentSpan = (Span) context.getData(OPENTELEMETRY_SPAN_KEY).orElse(TRACER.getCurrentSpan()); - String spanName = (String) context.getData(OPENTELEMETRY_SPAN_NAME_KEY).orElse(methodName); - - SpanBuilder spanBuilder = TRACER.spanBuilderWithExplicitParent(spanName, parentSpan); - Span span = spanBuilder.startSpan(); - - return context.addData(OPENTELEMETRY_SPAN_KEY, span); - } - - @Override - public Context start(String spanName, Context context, ProcessKind processKind) { - Span span; - SpanBuilder spanBuilder; - switch (processKind) { - case SEND: - spanBuilder = startSpanWithExplicitParent(spanName, context); - span = spanBuilder.setSpanKind(Span.Kind.CLIENT).startSpan(); - if (span.getOptions().contains(Span.Options.RECORD_EVENTS)) { - // If span is sampled in, add additional TRACING attributes - addSpanRequestAttributes(span, context, spanName); - } - return context.addData(OPENTELEMETRY_SPAN_KEY, span); - case RECEIVE: - spanBuilder = startSpanWithExplicitParent(spanName, context); - span = spanBuilder.startSpan(); - // Add diagnostic Id to Context - context = setContextData(span); - return context.addData(OPENTELEMETRY_SPAN_KEY, span); - case PROCESS: - return startScopedSpan(spanName, context); - default: - return Context.NONE; - } - } - - @Override - public void end(int responseCode, Throwable throwable, Context context) { - final Span span = getSpan(context); - if (span == null) { - return; - } - - if (span.getOptions().contains(Options.RECORD_EVENTS)) { - span.setStatus(HttpTraceUtil.parseResponseStatus(responseCode, throwable)); - } - - span.end(); - } - - @Override - public void setAttribute(String key, String value, Context context) { - if (ImplUtils.isNullOrEmpty(value)) { - logger.info("Failed to set span attribute since value is null or empty."); - return; - } - - final Span span = getSpan(context); - if (span != null) { - span.putAttribute(key, AttributeValue.stringAttributeValue(value)); - } else { - logger.warning("Failed to find span to add attribute."); - } - } - - @Override - public Context setSpanName(String spanName, Context context) { - return context.addData(OPENTELEMETRY_SPAN_NAME_KEY, spanName); - } - - @Override - public void end(String statusMessage, Throwable throwable, Context context) { - final Span span = getSpan(context); - if (span == null) { - logger.warning("Failed to find span to end it."); - return; - } - - if (span.getOptions().contains(Options.RECORD_EVENTS)) { - span.setStatus(AmqpTraceUtil.parseStatusMessage(statusMessage, throwable)); - } - - span.end(); - } - - @Override - public void addLink(Context eventContext) { - final Span span = getSpan(eventContext); - if (span == null) { - logger.warning("Failed to find span to link it."); - return; - } - - final Optional spanContextOptional = eventContext.getData(SPAN_CONTEXT); - if (!spanContextOptional.isPresent()) { - logger.warning("Failed to find Span context to link it."); - return; - } else if (!(spanContextOptional.get() instanceof SpanContext)) { - logger.warning("Context in event is not of type SpanContext. Actual: {}", - spanContextOptional.get().getClass()); - return; - } - - final SpanContext spanContext = (SpanContext) spanContextOptional.get(); - - // TODO: Needs to be updated with Open Telemetry support to addLink using Span Context before span is started - // and no link type is needed. - span.addLink(Link.fromSpanContext(spanContext, PARENT_LINKED_SPAN)); - } - - @Override - public Context extractContext(String diagnosticId, Context context) { - return AmqpPropagationFormatUtil.extractContext(diagnosticId, context); - } - - private Context startScopedSpan(String spanName, Context context) { - Span span; - Optional optionalSpanContext = context.getData(SPAN_CONTEXT); - if (optionalSpanContext.isPresent() && optionalSpanContext.get() instanceof SpanContext) { - span = startSpanWithRemoteParent(spanName, (SpanContext) optionalSpanContext.get()); - } else { - SpanBuilder spanBuilder = startSpanWithExplicitParent(spanName, context); - span = spanBuilder.setSpanKind(Span.Kind.SERVER).startSpan(); - } - return context.addData(OPENTELEMETRY_SPAN_KEY, span).addData("scope", TRACER.withSpan(span)); - } - - private SpanBuilder startSpanWithExplicitParent(String spanName, Context context) { - Optional optionalSpanKey = context.getData(OPENTELEMETRY_SPAN_KEY); - Optional optionalSpanNameKey = context.getData(OPENTELEMETRY_SPAN_NAME_KEY); - Span parentSpan = null; - String spanNameKey = null; - - if (optionalSpanKey.get() instanceof Span && optionalSpanNameKey.get() instanceof String) { - parentSpan = (Span) context.getData(OPENTELEMETRY_SPAN_KEY).orElse(TRACER.getCurrentSpan()); - spanNameKey = (String) context.getData(OPENTELEMETRY_SPAN_NAME_KEY).orElse(spanName); - } else { - logger.warning(String.format(Locale.US, - "Parent span type is not of type Span, but type: %s. Failed to add span links.", - optionalSpanKey.get() != null ? optionalSpanKey.get().getClass() : "null")); - } - - SpanBuilder spanBuilder = TRACER.spanBuilderWithExplicitParent(spanNameKey, parentSpan); - return spanBuilder; - } - - private Span startSpanWithRemoteParent(String spanName, SpanContext spanContext) { - SpanBuilder spanBuilder = TRACER.spanBuilderWithRemoteParent(spanName, spanContext); - spanBuilder.setSpanKind(Span.Kind.SERVER); - return spanBuilder.startSpan(); - - } - - private Context setContextData(Span span) { - final String traceparent = AmqpPropagationFormatUtil.getDiagnosticId(span.getContext()); - Context parentContext = new Context(DIAGNOSTIC_ID_KEY, traceparent).addData(SPAN_CONTEXT, span.getContext()); - return parentContext; - } - - private static void addSpanRequestAttributes(Span span, Context context, String spanName) { - if (context.getData(ENTITY_PATH).isPresent() && context.getData(HOST_NAME).isPresent()) { - span.putAttribute(COMPONENT, AttributeValue.stringAttributeValue(parseComponentValue(spanName))); - span.putAttribute( - MESSAGE_BUS_DESTINATION, - AttributeValue.stringAttributeValue(context.getData(ENTITY_PATH).get().toString())); - span.putAttribute( - PEER_ENDPOINT, - AttributeValue.stringAttributeValue(context.getData(HOST_NAME).get().toString())); - } - } - - private static String parseComponentValue(String spanName) { - return spanName.substring(spanName.indexOf(".") + 1, spanName.lastIndexOf(".")); - } - - /** - * Extracts a {@link Span} from the given {@code context}. - * - * @param context The context containing the span. - * @return The {@link Span} contained in the context, and {@code null} if it does not. - */ - private Span getSpan(Context context) { - final Optional spanOptional = context.getData(OPENTELEMETRY_SPAN_KEY); - if (!spanOptional.isPresent()) { - logger.warning("Failed to find span in the context."); - return null; - } - - final Object value = spanOptional.get(); - if (!(value instanceof Span)) { - logger.warning("Could not extract span. Data in {} is not of type Span. Actual class: {}", - OPENTELEMETRY_SPAN_KEY, - value.getClass()); - return null; - } - - return (Span) value; - } -} diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/package-info.java b/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/package-info.java deleted file mode 100644 index 0632e1f800fe..000000000000 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/com/azure/tracing/opentelemetry/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -/** - * An OpenTelemetry implementation of the tracing APIs required by azure-core to enable users to effectively trace their - * calls and have this information submitted to an OpenTelemetry backend. - */ -package com.azure.tracing.opentelemetry; diff --git a/sdk/tracing/tracing-opentelemetry/src/main/java/module-info.java b/sdk/tracing/tracing-opentelemetry/src/main/java/module-info.java deleted file mode 100644 index e33f19b2ec23..000000000000 --- a/sdk/tracing/tracing-opentelemetry/src/main/java/module-info.java +++ /dev/null @@ -1,12 +0,0 @@ -module com.azure.tracing.opentelemetry { - requires com.azure.core; - - requires opencensus.api; - - exports com.azure.tracing.opentelemetry; - - provides com.azure.core.util.tracing.Tracer - with com.azure.tracing.opentelemetry.OpenTelemetryTracer; - provides com.azure.core.http.policy.AfterRetryPolicyProvider - with com.azure.tracing.opentelemetry.OpenTelemetryHttpPolicy; -} diff --git a/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.http.policy.AfterRetryPolicyProvider b/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.http.policy.AfterRetryPolicyProvider deleted file mode 100644 index c2342fa80322..000000000000 --- a/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.http.policy.AfterRetryPolicyProvider +++ /dev/null @@ -1 +0,0 @@ -com.azure.tracing.opentelemetry.OpenTelemetryHttpPolicy diff --git a/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer b/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer deleted file mode 100644 index 0138e5f35f9b..000000000000 --- a/sdk/tracing/tracing-opentelemetry/src/main/resources/META-INF/services/com.azure.core.util.tracing.Tracer +++ /dev/null @@ -1 +0,0 @@ -com.azure.tracing.opentelemetry.OpenTelemetryTracer diff --git a/storage/resource-manager/v2019_04_01/pom.xml b/storage/resource-manager/v2019_04_01/pom.xml index c27b715546aa..db8e6621c6d9 100644 --- a/storage/resource-manager/v2019_04_01/pom.xml +++ b/storage/resource-manager/v2019_04_01/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-storage - 1.0.0-beta-1 + 1.0.0-beta-2 jar Microsoft Azure SDK for Storage Management This package contains Microsoft Storage Management SDK. diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/LargeFileSharesState.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/LargeFileSharesState.java new file mode 100644 index 000000000000..d44bd97c7ef1 --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/LargeFileSharesState.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_04_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LargeFileSharesState. + */ +public final class LargeFileSharesState extends ExpandableStringEnum { + /** Static value Disabled for LargeFileSharesState. */ + public static final LargeFileSharesState DISABLED = fromString("Disabled"); + + /** Static value Enabled for LargeFileSharesState. */ + public static final LargeFileSharesState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a LargeFileSharesState from its string representation. + * @param name a name to look for + * @return the corresponding LargeFileSharesState + */ + @JsonCreator + public static LargeFileSharesState fromString(String name) { + return fromString(name, LargeFileSharesState.class); + } + + /** + * @return known LargeFileSharesState values + */ + public static Collection values() { + return values(LargeFileSharesState.class); + } +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java index e681cea1848a..5a083c7fffb2 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java @@ -81,6 +81,11 @@ public interface StorageAccount extends HasInner, Resource, */ Kind kind(); + /** + * @return the largeFileSharesState value. + */ + LargeFileSharesState largeFileSharesState(); + /** * @return the lastGeoFailoverTime value. */ @@ -261,6 +266,18 @@ interface WithIsHnsEnabled { WithCreate withIsHnsEnabled(Boolean isHnsEnabled); } + /** + * The stage of the storageaccount definition allowing to specify LargeFileSharesState. + */ + interface WithLargeFileSharesState { + /** + * Specifies largeFileSharesState. + * @param largeFileSharesState Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withLargeFileSharesState(LargeFileSharesState largeFileSharesState); + } + /** * The stage of the storageaccount definition allowing to specify NetworkRuleSet. */ @@ -278,13 +295,13 @@ interface WithNetworkRuleSet { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithNetworkRuleSet { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithNetworkRuleSet { } } /** * The template for a StorageAccount update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { } /** @@ -375,6 +392,18 @@ interface WithKind { Update withKind(Kind kind); } + /** + * The stage of the storageaccount update allowing to specify LargeFileSharesState. + */ + interface WithLargeFileSharesState { + /** + * Specifies largeFileSharesState. + * @param largeFileSharesState Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + * @return the next update stage + */ + Update withLargeFileSharesState(LargeFileSharesState largeFileSharesState); + } + /** * The stage of the storageaccount update allowing to specify NetworkRuleSet. */ diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java index b0ff92f40fca..d8c7b7dc36f3 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java @@ -106,6 +106,13 @@ public class StorageAccountCreateParameters { @JsonProperty(value = "properties.isHnsEnabled") private Boolean isHnsEnabled; + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + /** * Get required. Gets or sets the SKU name. * @@ -346,4 +353,24 @@ public StorageAccountCreateParameters withIsHnsEnabled(Boolean isHnsEnabled) { return this; } + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java index 14180711401f..24f969061990 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java @@ -84,6 +84,13 @@ public class StorageAccountUpdateParameters { @JsonProperty(value = "properties.networkAcls") private NetworkRuleSet networkRuleSet; + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + /** * Optional. Indicates the type of storage account. Currently only * StorageV2 value supported by server. Possible values include: 'Storage', @@ -272,6 +279,26 @@ public StorageAccountUpdateParameters withNetworkRuleSet(NetworkRuleSet networkR return this; } + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + /** * Get optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. * diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java index 9c14e2f82761..60397ba74a9f 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java @@ -21,6 +21,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.GeoReplicationStats; import com.microsoft.azure.management.storage.v2019_04_01.Identity; import com.microsoft.azure.management.storage.v2019_04_01.Kind; +import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.Endpoints; import com.microsoft.azure.management.storage.v2019_04_01.ProvisioningState; @@ -138,6 +139,11 @@ public Kind kind() { return this.inner().kind(); } + @Override + public LargeFileSharesState largeFileSharesState() { + return this.inner().largeFileSharesState(); + } + @Override public DateTime lastGeoFailoverTime() { return this.inner().lastGeoFailoverTime(); @@ -279,6 +285,16 @@ public StorageAccountImpl withIdentity(Identity identity) { return this; } + @Override + public StorageAccountImpl withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + if (isInCreateMode()) { + this.createParameter.withLargeFileSharesState(largeFileSharesState); + } else { + this.updateParameter.withLargeFileSharesState(largeFileSharesState); + } + return this; + } + @Override public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { if (isInCreateMode()) { diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java index a18bb10bd43d..8f4954da3403 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java @@ -20,6 +20,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.AzureFilesIdentityBasedAuthentication; import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.GeoReplicationStats; +import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -175,6 +176,13 @@ public class StorageAccountInner extends Resource { @JsonProperty(value = "properties.failoverInProgress", access = JsonProperty.Access.WRITE_ONLY) private Boolean failoverInProgress; + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once + * it is enabled. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.largeFileSharesState") + private LargeFileSharesState largeFileSharesState; + /** * Get gets the SKU. * @@ -408,4 +416,24 @@ public Boolean failoverInProgress() { return this.failoverInProgress; } + /** + * Get allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @return the largeFileSharesState value + */ + public LargeFileSharesState largeFileSharesState() { + return this.largeFileSharesState; + } + + /** + * Set allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'. + * + * @param largeFileSharesState the largeFileSharesState value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withLargeFileSharesState(LargeFileSharesState largeFileSharesState) { + this.largeFileSharesState = largeFileSharesState; + return this; + } + } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java index c49c2ea9aa3a..fc73afdde433 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java @@ -112,10 +112,10 @@ public PagedList list() { public Observable listAsync() { StorageAccountsInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>() { + .flatMapIterable(new Func1, Iterable>() { @Override - public Observable call(Page innerPage) { - return Observable.from(innerPage.items()); + public Iterable call(Page page) { + return page.items(); } }) .map(new Func1() { diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java index 7174b750f392..8d7a6fa7381c 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java @@ -13,7 +13,9 @@ import com.microsoft.azure.arm.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.storage.v2019_04_01.AccountSasParameters; import com.microsoft.azure.management.storage.v2019_04_01.ServiceSasParameters; import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountCheckNameAvailabilityParameters; @@ -40,6 +42,7 @@ import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -134,6 +137,10 @@ interface StorageAccountsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys") Observable> revokeUserDelegationKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_04_01.StorageAccounts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -742,16 +749,17 @@ private ServiceResponse updateDelegate(Response object if successful. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StorageAccountInner> object if successful. */ public PagedList list() { - PageImpl page = new PageImpl<>(); - page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); - page.setNextPageLink(null); - return new PagedList(page) { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return null; + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -760,34 +768,64 @@ public Page nextPage(String nextPageLink) { * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * - * @return the observable to the List<StorageAccountInner> object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> object */ public Observable> listAsync() { - return listWithServiceResponseAsync().map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - PageImpl page = new PageImpl<>(); - page.setItems(response.body()); - return page; - } - }); + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * - * @return the observable to the List<StorageAccountInner> object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listWithServiceResponseAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -795,17 +833,12 @@ public Observable>> listWithServiceRes throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - List items = null; - if (result.body() != null) { - items = result.body().items(); - } - ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -813,9 +846,9 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1516,4 +1549,115 @@ private ServiceResponse revokeUserDelegationKeysDelegate(Response listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StorageAccountInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StorageAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + }

    * Please refer to the Azure * Docs for more information. */ -@ServiceClient(builder = BlobClientBuilder.class) -public final class PageBlobClient extends BlobClient { +@ServiceClient(builder = SpecializedBlobClientBuilder.class) +public final class PageBlobClient extends BlobClientBase { private final PageBlobAsyncClient pageBlobAsyncClient; /** @@ -60,7 +56,7 @@ public final class PageBlobClient extends BlobClient { public static final int MAX_PUT_PAGES_BYTES = PageBlobAsyncClient.MAX_PUT_PAGES_BYTES; /** - * Package-private constructor for use by {@link BlobClientBuilder}. + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. * * @param pageBlobAsyncClient the async page blob client */ @@ -104,13 +100,13 @@ public BlobOutputStream getBlobOutputStream(long length, BlobAccessConditions ac * *