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 7974e0546cd5..cc252d33809f 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
@@ -383,7 +383,7 @@
-
+
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 885fd7e68923..1599ca727957 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
@@ -8,7 +8,6 @@
import com.azure.messaging.eventhubs.models.PartitionOwnership;
import com.azure.storage.blob.BlobContainerAsyncClient;
import com.azure.storage.blob.BlobContainerClientBuilder;
-
import java.util.StringJoiner;
/**
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 76ddcc304b52..1b1159219b5d 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
@@ -13,9 +13,8 @@
import com.azure.messaging.eventhubs.models.PartitionContext;
import com.azure.storage.blob.BlobContainerAsyncClient;
import com.azure.storage.blob.BlobContainerClientBuilder;
-import reactor.core.publisher.Mono;
-
import java.util.concurrent.TimeUnit;
+import reactor.core.publisher.Mono;
/**
* Sample for using {@link BlobPartitionManager} with {@link EventProcessor}.
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 953d7ad5b2c7..af4edef307bb 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
@@ -104,7 +104,7 @@ public BlobAsyncClient buildAsyncClient() {
public BlobClientBuilder endpoint(String endpoint) {
try {
URL url = new URL(endpoint);
- BlobURLParts parts = BlobURLParts.parse(url);
+ BlobUrlParts parts = BlobUrlParts.parse(url);
this.endpoint = parts.getScheme() + "://" + parts.getHost();
this.containerName = parts.getBlobContainerName();
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
index 57e4f698d7cb..e7ddc5e8425a 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
@@ -3,6 +3,9 @@
package com.azure.storage.blob;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
@@ -18,9 +21,9 @@
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.BlobContainerAccessConditions;
import com.azure.storage.blob.models.BlobContainerAccessPolicies;
import com.azure.storage.blob.models.BlobItem;
-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;
@@ -30,8 +33,6 @@
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.blob.models.StorageException;
import com.azure.storage.common.Utility;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -40,9 +41,7 @@
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.implementation.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method
@@ -143,7 +142,7 @@ public String getBlobContainerUrl() {
* @return The name of container.
*/
public String getBlobContainerName() {
- return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName();
+ return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName();
}
/**
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java
index 66dfdd95c45a..195c27154fee 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java
@@ -18,11 +18,10 @@
import com.azure.storage.blob.models.SignedIdentifier;
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.common.Utility;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.util.List;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java
index 02e6786dfd7c..77aece5705f2 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java
@@ -8,7 +8,6 @@
import com.azure.core.implementation.util.ImplUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.storage.blob.implementation.AzureBlobStorageBuilder;
-
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Objects;
@@ -93,7 +92,7 @@ public BlobContainerAsyncClient buildAsyncClient() {
public BlobContainerClientBuilder endpoint(String endpoint) {
try {
URL url = new URL(endpoint);
- BlobURLParts parts = BlobURLParts.parse(url);
+ BlobUrlParts parts = BlobUrlParts.parse(url);
this.endpoint = parts.getScheme() + "://" + parts.getHost();
this.containerName = parts.getBlobContainerName();
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 8dad684c6c19..034d6f985c22 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,6 +3,9 @@
package com.azure.storage.blob;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.credentials.TokenCredential;
import com.azure.core.http.HttpPipeline;
@@ -27,15 +30,11 @@
import com.azure.storage.blob.models.StorageServiceStats;
import com.azure.storage.blob.models.UserDelegationKey;
import com.azure.storage.common.Utility;
-import reactor.core.publisher.Mono;
-
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.implementation.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does
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 0bb9ecc96066..27cc6fb593b7 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
@@ -18,11 +18,10 @@
import com.azure.storage.blob.models.StorageServiceStats;
import com.azure.storage.blob.models.UserDelegationKey;
import com.azure.storage.common.Utility;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does
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 6ffeb09ecaf8..1cf884c8f4a4 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
@@ -8,7 +8,6 @@
import com.azure.core.implementation.util.ImplUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.storage.blob.implementation.AzureBlobStorageBuilder;
-
import java.net.MalformedURLException;
import java.net.URL;
@@ -76,7 +75,7 @@ public BlobServiceClientBuilder endpoint(String endpoint) {
URL url = new URL(endpoint);
super.endpoint = url.getProtocol() + "://" + url.getAuthority();
- String sasToken = BlobURLParts.parse(url).getSasQueryParameters().encode();
+ String sasToken = BlobUrlParts.parse(url).getSasQueryParameters().encode();
if (!ImplUtils.isNullOrEmpty(sasToken)) {
super.sasToken(sasToken);
}
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
similarity index 88%
rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java
rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java
index 7d6869a87842..fa7cd69963fb 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
@@ -23,7 +23,7 @@
* existing URL into its parts with the {@link #parse(URL)} class. You may construct a URL from parts by calling {@link
* #toURL()}.
*/
-public final class BlobURLParts {
+public final class BlobUrlParts {
private String scheme;
private String host;
private String containerName;
@@ -33,9 +33,9 @@ public final class BlobURLParts {
private Map unparsedParameters;
/**
- * Initializes a BlobURLParts object which helps aid in the construction of a Blob Storage URL.
+ * Initializes a BlobUrlParts object which helps aid in the construction of a Blob Storage URL.
*/
- public BlobURLParts() {
+ public BlobUrlParts() {
unparsedParameters = new HashMap<>();
}
@@ -52,9 +52,9 @@ public String getScheme() {
* Sets the URL scheme, ex. "https://".
*
* @param scheme The URL scheme.
- * @return the updated BlobURLParts object.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setScheme(String scheme) {
+ public BlobUrlParts setScheme(String scheme) {
this.scheme = scheme;
return this;
}
@@ -72,9 +72,9 @@ public String getHost() {
* Sets the URL host, ex. "account.blob.core.windows.net".
*
* @param host The URL host.
- * @return the updated BlobURLParts object.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setHost(String host) {
+ public BlobUrlParts setHost(String host) {
this.host = host;
return this;
}
@@ -92,9 +92,9 @@ public String getBlobContainerName() {
* Sets the container name that will be used as part of the URL path.
*
* @param containerName The container nme.
- * @return the updated BlobURLParts object.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setContainerName(String containerName) {
+ public BlobUrlParts setContainerName(String containerName) {
this.containerName = containerName;
return this;
}
@@ -112,9 +112,9 @@ public String getBlobName() {
* Sets the blob name that will be used as part of the URL path.
*
* @param blobName The blob name.
- * @return the updated BlobURLParts object.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setBlobName(String blobName) {
+ public BlobUrlParts setBlobName(String blobName) {
this.blobName = blobName;
return this;
}
@@ -132,9 +132,9 @@ public String getSnapshot() {
* 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.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setSnapshot(String snapshot) {
+ public BlobUrlParts setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
@@ -154,9 +154,9 @@ public BlobServiceSasQueryParameters getSasQueryParameters() {
* generate the SAS token for this URL.
*
* @param blobServiceSasQueryParameters The SAS query parameters.
- * @return the updated BlobURLParts object.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setSasQueryParameters(BlobServiceSasQueryParameters blobServiceSasQueryParameters) {
+ public BlobUrlParts setSasQueryParameters(BlobServiceSasQueryParameters blobServiceSasQueryParameters) {
this.blobServiceSasQueryParameters = blobServiceSasQueryParameters;
return this;
}
@@ -174,9 +174,9 @@ public Map getUnparsedParameters() {
* 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.
+ * @return the updated BlobUrlParts object.
*/
- public BlobURLParts setUnparsedParameters(Map unparsedParameters) {
+ public BlobUrlParts setUnparsedParameters(Map unparsedParameters) {
this.unparsedParameters = unparsedParameters;
return this;
}
@@ -185,7 +185,7 @@ public BlobURLParts setUnparsedParameters(Map unparsedParamete
* Converts the blob URL parts to a {@link URL}.
*
* @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
+ * @throws MalformedURLException The fields present on the BlobUrlParts object were insufficient to construct a
* valid URL or were ill-formatted.
*/
public URL toURL() throws MalformedURLException {
@@ -221,16 +221,16 @@ public URL toURL() throws MalformedURLException {
}
/**
- * URLParser parses a string URL initializing BlobURLParts' fields including any SAS-related and snapshot query
+ * 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.
+ * 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.
+ * @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) {
+ public static BlobUrlParts parse(String url, ClientLogger logger) {
try {
return parse(new URL(url));
} catch (MalformedURLException e) {
@@ -240,16 +240,16 @@ public static BlobURLParts parse(String url, ClientLogger logger) {
}
/**
- * Parses an existing URL into a BlobURLParts.
+ * 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.
+ * @return A {@link BlobUrlParts} object containing all the components of a BlobURL.
*/
- public static BlobURLParts parse(URL url) {
+ public static BlobUrlParts parse(URL url) {
final String scheme = url.getProtocol();
final String host = url.getHost();
@@ -287,7 +287,7 @@ public static BlobURLParts parse(URL url) {
BlobServiceSasQueryParameters blobServiceSasQueryParameters =
new BlobServiceSasQueryParameters(queryParamsMap, true);
- return new BlobURLParts()
+ return new BlobUrlParts()
.setScheme(scheme)
.setHost(host)
.setContainerName(containerName)
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java
similarity index 85%
rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java
rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java
index b13fa48a2acb..efba9e6f43ef 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HttpGetterInfo.java
@@ -10,10 +10,10 @@
import java.time.Duration;
/**
- * HTTPGetterInfo is a passed to the getter function of a reliable download to specify parameters needed for the GET
+ * HttpGetterInfo is a passed to the getter function of a reliable download to specify parameters needed for the GET
* request.
*/
-public final class HTTPGetterInfo {
+public final class HttpGetterInfo {
private long offset = 0;
private Long count = null;
@@ -31,9 +31,9 @@ public long getOffset() {
* Sets the start offset that is used when creating the Range header. If unchanged this will default to 0.
*
* @param offset Start offset
- * @return the updated HTTPGetterInfo object
+ * @return the updated HttpGetterInfo object
*/
- public HTTPGetterInfo setOffset(long offset) {
+ public HttpGetterInfo setOffset(long offset) {
this.offset = offset;
return this;
}
@@ -51,9 +51,9 @@ public Long getCount() {
* default and indicates that the entire rest of the blob should be retrieved.
*
* @param count Count of bytes
- * @return the updated HTTPGetterInfo object
+ * @return the updated HttpGetterInfo object
*/
- public HTTPGetterInfo setCount(Long count) {
+ public HttpGetterInfo setCount(Long count) {
if (count != null) {
Utility.assertInBounds("count", count, 0, Long.MAX_VALUE);
}
@@ -76,9 +76,9 @@ public String getETag() {
* properties}. Defaults to null.
*
* @param eTag Resource's eTag
- * @return the updated HTTPGetterInfo object
+ * @return the updated HttpGetterInfo object
*/
- public HTTPGetterInfo setETag(String eTag) {
+ public HttpGetterInfo setETag(String eTag) {
this.eTag = eTag;
return this;
}
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
index d50317535180..1f366064fbb0 100644
--- 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
@@ -3,6 +3,9 @@
package com.azure.storage.blob.specialized;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.blob.implementation.PostProcessor.postProcessResponse;
+
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
import com.azure.core.http.rest.Response;
@@ -11,8 +14,8 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.storage.blob.BlobProperties;
-import com.azure.storage.blob.BlobURLParts;
-import com.azure.storage.blob.HTTPGetterInfo;
+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;
@@ -31,10 +34,6 @@
import com.azure.storage.blob.models.StorageException;
import com.azure.storage.common.Constants;
import com.azure.storage.common.Utility;
-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;
@@ -47,9 +46,9 @@
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;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Schedulers;
/**
* This class provides a client that contains all operations that apply to any blob type.
@@ -123,7 +122,7 @@ public String getBlobUrl() {
* @return The name of the container.
*/
public final String getContainerName() {
- return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName();
+ return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobContainerName();
}
/**
@@ -136,7 +135,7 @@ public final String getContainerName() {
* @return The name of the blob.
*/
public final String getBlobName() {
- return BlobURLParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobName();
+ return BlobUrlParts.parse(this.azureBlobStorage.getUrl(), logger).getBlobName();
}
/**
@@ -456,7 +455,7 @@ Mono download(BlobRange range, BlobAccessConditions acces
range = range == null ? new BlobRange(0) : range;
Boolean getMD5 = rangeGetContentMD5 ? rangeGetContentMD5 : null;
accessConditions = accessConditions == null ? new BlobAccessConditions() : accessConditions;
- HTTPGetterInfo info = new HTTPGetterInfo()
+ HttpGetterInfo info = new HttpGetterInfo()
.setOffset(range.getOffset())
.setCount(range.getCount())
.setETag(accessConditions.getModifiedAccessConditions().getIfMatch());
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
index 18bbb6774ae3..4fb21899d661 100644
--- 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
@@ -25,8 +25,6 @@
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.blob.models.StorageException;
import com.azure.storage.common.Utility;
-import reactor.core.publisher.Mono;
-
import java.io.IOException;
import java.io.OutputStream;
import java.io.UncheckedIOException;
@@ -34,6 +32,7 @@
import java.nio.file.FileAlreadyExistsException;
import java.time.Duration;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all operations that apply to any blob type.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java
index 7e4cdafa92cb..f795f1801c06 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasQueryParameters.java
@@ -8,7 +8,7 @@
import com.azure.storage.common.BaseSasQueryParameters;
import com.azure.storage.common.Constants;
import com.azure.storage.common.IpRange;
-import com.azure.storage.common.SASProtocol;
+import com.azure.storage.common.SasProtocol;
import com.azure.storage.common.Utility;
import java.time.OffsetDateTime;
@@ -26,9 +26,9 @@ public final class BlobServiceSasQueryParameters extends BaseSasQueryParameters
private final String identifier;
- private final String keyOid;
+ private final String keyObjectId;
- private final String keyTid;
+ private final String keyTenantId;
private final OffsetDateTime keyStart;
@@ -61,9 +61,9 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole
super(queryParamsMap, removeSASParametersFromMap);
this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER,
removeSASParametersFromMap);
- this.keyOid = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID,
+ this.keyObjectId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID,
removeSASParametersFromMap);
- this.keyTid = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_TENANT_ID,
+ this.keyTenantId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_TENANT_ID,
removeSASParametersFromMap);
this.keyStart = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_START,
removeSASParametersFromMap, Utility::parseDate);
@@ -102,7 +102,7 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole
* @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,
+ 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) {
@@ -117,15 +117,15 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole
this.contentType = contentType;
if (key != null) {
- this.keyOid = key.getSignedOid();
- this.keyTid = key.getSignedTid();
+ this.keyObjectId = key.getSignedOid();
+ this.keyTenantId = key.getSignedTid();
this.keyStart = key.getSignedStart();
this.keyExpiry = key.getSignedExpiry();
this.keyService = key.getSignedService();
this.keyVersion = key.getSignedVersion();
} else {
- this.keyOid = null;
- this.keyTid = null;
+ this.keyObjectId = null;
+ this.keyTenantId = null;
this.keyStart = null;
this.keyExpiry = null;
this.keyService = null;
@@ -187,15 +187,15 @@ public String getContentType() {
/**
* @return the object ID of the key.
*/
- public String getKeyOid() {
- return keyOid;
+ public String getKeyObjectId() {
+ return keyObjectId;
}
/**
* @return the tenant ID of the key.
*/
- public String getKeyTid() {
- return keyTid;
+ public String getKeyTenantId() {
+ return keyTenantId;
}
/**
@@ -229,10 +229,10 @@ public String getKeyVersion() {
UserDelegationKey userDelegationKey() {
return new UserDelegationKey()
.setSignedExpiry(this.keyExpiry)
- .setSignedOid(this.keyOid)
+ .setSignedOid(this.keyObjectId)
.setSignedService(this.keyService)
.setSignedStart(this.keyStart)
- .setSignedTid(this.keyTid)
+ .setSignedTid(this.keyTenantId)
.setSignedVersion(this.keyVersion);
}
@@ -254,8 +254,8 @@ public String encode() {
tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, formatQueryParameterDate(this.expiryTime));
tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.ipRange);
tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier);
- tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, this.keyOid);
- tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, this.keyTid);
+ tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, this.keyObjectId);
+ tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, this.keyTenantId);
tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START,
formatQueryParameterDate(this.keyStart));
tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY,
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java
index 3f4187ad1d3a..565d31a794ae 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValues.java
@@ -9,7 +9,7 @@
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.SasProtocol;
import com.azure.storage.common.Utility;
import com.azure.storage.common.credentials.SharedKeyCredential;
@@ -39,7 +39,7 @@ public final class BlobServiceSasSignatureValues {
private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION;
- private SASProtocol protocol;
+ private SasProtocol protocol;
private OffsetDateTime startTime;
@@ -93,7 +93,7 @@ public BlobServiceSasSignatureValues() {
this.identifier = identifier;
}
- public BlobServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime,
+ 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) {
@@ -133,19 +133,19 @@ public BlobServiceSasSignatureValues setVersion(String version) {
}
/**
- * @return the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * @return the {@link SasProtocol} which determines the protocols allowed by the SAS.
*/
- public SASProtocol getProtocol() {
+ public SasProtocol getProtocol() {
return protocol;
}
/**
- * Sets the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * Sets the {@link SasProtocol} which determines the protocols allowed by the SAS.
*
* @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;
}
@@ -450,7 +450,7 @@ public BlobServiceSasSignatureValues setContentType(String contentType) {
* @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);
@@ -472,7 +472,7 @@ public BlobServiceSasQueryParameters generateSASQueryParameters(SharedKeyCredent
* @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);
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java
index 1eba60c444fe..e59878350865 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/DownloadAsyncResponse.java
@@ -4,7 +4,7 @@
package com.azure.storage.blob.specialized;
import com.azure.core.http.rest.ResponseBase;
-import com.azure.storage.blob.HTTPGetterInfo;
+import com.azure.storage.blob.HttpGetterInfo;
import com.azure.storage.blob.models.BlobDownloadHeaders;
import com.azure.storage.blob.models.ReliableDownloadOptions;
import com.azure.storage.common.Utility;
@@ -31,16 +31,16 @@
* retry mechanism.
*/
public final class DownloadAsyncResponse {
- private final HTTPGetterInfo info;
+ private final HttpGetterInfo info;
private final ResponseBase> rawResponse;
- private final Function> getter;
+ private final Function> getter;
// The constructor is package-private because customers should not be creating their own responses.
DownloadAsyncResponse(ResponseBase> response,
- HTTPGetterInfo info, Function> getter) {
+ HttpGetterInfo info, Function> getter) {
Utility.assertNotNull("getter", getter);
Utility.assertNotNull("info", info);
Utility.assertNotNull("info.eTag", info.getETag());
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
index 1e5f431cef89..6feb4a73d8e5 100644
--- 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
@@ -8,7 +8,7 @@
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.BlobUrlParts;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.implementation.AzureBlobStorageBuilder;
import com.azure.storage.blob.implementation.AzureBlobStorageImpl;
@@ -202,7 +202,7 @@ public SpecializedBlobClientBuilder containerAsyncClient(BlobContainerAsyncClien
public SpecializedBlobClientBuilder endpoint(String endpoint) {
try {
URL url = new URL(endpoint);
- BlobURLParts parts = BlobURLParts.parse(url);
+ BlobUrlParts parts = BlobUrlParts.parse(url);
this.endpoint = parts.getScheme() + "://" + parts.getHost();
this.containerName = parts.getBlobContainerName();
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 f0a199d5294d..4fad58a9aa1a 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
@@ -14,8 +14,6 @@
import com.azure.storage.blob.models.RehydratePriority;
import com.azure.storage.blob.models.ReliableDownloadOptions;
import com.azure.storage.blob.specialized.BlobAsyncClientBase;
-import reactor.core.publisher.Flux;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
@@ -26,6 +24,7 @@
import java.util.Base64;
import java.util.Collections;
import java.util.Map;
+import reactor.core.publisher.Flux;
/**
* Code snippets for {@link BlobAsyncClient}
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 fc7ab8622035..e68edcee67ac 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
@@ -17,7 +17,6 @@
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.blob.specialized.BlobClientBase;
import com.azure.storage.common.Constants;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
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
index 1e9520302f9f..842877dd4888 100644
--- 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
@@ -12,7 +12,6 @@
import com.azure.storage.blob.models.ModifiedAccessConditions;
import com.azure.storage.blob.models.PublicAccessType;
import com.azure.storage.blob.models.SignedIdentifier;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Collections;
diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java
index 743a4f8bd461..374084c4513b 100644
--- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java
+++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java
@@ -6,8 +6,8 @@
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.BlobContainerAccessPolicies;
+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;
@@ -16,7 +16,6 @@
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.blob.models.StorageErrorCode;
import com.azure.storage.blob.models.StorageException;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Collections;
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 acd4dc10390d..6c499f745c80 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
@@ -12,7 +12,6 @@
import com.azure.storage.blob.models.RetentionPolicy;
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.blob.models.StorageServiceProperties;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Collections;
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
index 03b5faa90702..7441ed1670f9 100644
--- 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
@@ -13,7 +13,6 @@
import com.azure.storage.blob.models.ParallelTransferOptions;
import com.azure.storage.blob.models.RehydratePriority;
import com.azure.storage.blob.models.ReliableDownloadOptions;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
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
index 73bf9057425e..84ceb5788492 100644
--- 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
@@ -17,7 +17,6 @@
import com.azure.storage.blob.models.ReliableDownloadOptions;
import com.azure.storage.blob.models.StorageAccountInfo;
import com.azure.storage.common.Constants;
-
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.UncheckedIOException;
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 cb2b3457b647..889736f0220d 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
@@ -35,8 +35,8 @@ import com.azure.storage.blob.specialized.LeaseClient
import com.azure.storage.blob.specialized.LeaseClientBuilder
import com.azure.storage.common.BaseClientBuilder
import com.azure.storage.common.Constants
-
import com.azure.storage.common.credentials.SharedKeyCredential
+import com.azure.storage.common.implementation.credentials.SasTokenCredential
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import spock.lang.Requires
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 31f1601b4dac..69e0f72ab08c 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
@@ -94,15 +94,15 @@ class BlobAPITest extends APISpec {
/*
This is to test the appropriate integration of DownloadResponse, including setting the correct range values on
- HTTPGetterInfo.
+ HttpGetterInfo.
*/
def "Download with retry range"() {
/*
We are going to make a request for some range on a blob. The Flux returned will throw an exception, forcing
a retry per the ReliableDownloadOptions. The next request should have the same range header, which was generated
- from the count and offset values in HTTPGetterInfo that was constructed on the initial call to download. We
+ from the count and offset values in HttpGetterInfo that was constructed on the initial call to download. We
don't need to check the data here, but we want to ensure that the correct range is set each time. This will
- test the correction of a bug that was found which caused HTTPGetterInfo to have an incorrect offset when it was
+ test the correction of a bug that was found which caused HttpGetterInfo to have an incorrect offset when it was
constructed in BlobClient.download().
*/
setup:
@@ -1459,7 +1459,7 @@ class BlobAPITest extends APISpec {
.setExpiryTime(OffsetDateTime.now().plusHours(1))
.setPermissions(new BlobSasPermission().setReadPermission(true))
.setCanonicalName(bc.getBlobUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
bcCopy.copyFromURLWithResponse(new URL(bc.getBlobUrl().toString() + "?" + sas), null, tier2, null, null, null, null)
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 dd66b60a4c33..69d90c0120ef 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
@@ -96,7 +96,7 @@ class CPKTest extends APISpec {
.setExpiryTime(OffsetDateTime.now().plusHours(1))
.setPermissions(new BlobSasPermission().setReadPermission(true))
.setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def response = cpkBlockBlob.stageBlockFromURLWithResponse(getBlockID(), new URL(sourceBlob.getBlobUrl().toString() + "?" + sas),
@@ -151,7 +151,7 @@ class CPKTest extends APISpec {
.setExpiryTime(OffsetDateTime.now().plusHours(1))
.setPermissions(new BlobSasPermission().setReadPermission(true))
.setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def response = cpkPageBlob.uploadPagesFromURLWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1),
@@ -202,7 +202,7 @@ class CPKTest extends APISpec {
.setExpiryTime(OffsetDateTime.now().plusHours(1))
.setPermissions(new BlobSasPermission().setReadPermission(true))
.setCanonicalName(sourceBlob.getBlobUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def response = cpkAppendBlob.appendBlockFromUrlWithResponse(new URL(sourceBlob.getBlobUrl().toString() + "?" + sas),
null, null, null, null, null, null)
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 3ff1e79a07d8..ad400b36046f 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
@@ -10,13 +10,13 @@ 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.AccountSasResourceType
+import com.azure.storage.common.AccountSasService
+import com.azure.storage.common.AccountSasPermission
+import com.azure.storage.common.AccountSasSignatureValues
import com.azure.storage.common.Constants
import com.azure.storage.common.IpRange
-import com.azure.storage.common.SASProtocol
+import com.azure.storage.common.SasProtocol
import com.azure.storage.common.Utility
import com.azure.storage.common.credentials.SharedKeyCredential
import spock.lang.Ignore
@@ -110,7 +110,7 @@ class SASTest extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -131,7 +131,7 @@ class SASTest extends APISpec {
.setContentType(contentType)
.setCanonicalName(bu.getBlobUrl(), primaryCredential.getAccountName())
.setSnapshotId(bu.getSnapshotId())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient()
@@ -171,7 +171,7 @@ class SASTest extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -192,7 +192,7 @@ class SASTest extends APISpec {
.setContentType(contentType)
.setCanonicalName(snapshotBlob.getBlobUrl(), primaryCredential.getAccountName())
.setSnapshotId(snapshotBlob.getSnapshotId())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient()
@@ -234,7 +234,7 @@ class SASTest extends APISpec {
.setIdentifier(identifier.getId())
.setCanonicalName(cc.getBlobContainerUrl(), primaryCredential.getAccountName())
.setResource(Constants.UrlConstants.SAS_CONTAINER_CONSTANT)
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
def client1 = getContainerClient(sasWithId, cc.getBlobContainerUrl())
@@ -245,9 +245,8 @@ class SASTest extends APISpec {
.setPermissions(permissions)
.setExpiryTime(expiryTime)
.setCanonicalName(cc.getBlobContainerUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
-
def client2 = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl())
client2.listBlobsFlat().iterator().hasNext()
@@ -279,7 +278,7 @@ class SASTest extends APISpec {
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -303,7 +302,7 @@ class SASTest extends APISpec {
.setCanonicalName(bu.getBlobUrl().toString(), primaryCredential.getAccountName())
.setSnapshotId(bu.getSnapshotId())
.setVersion(key.getSignedVersion())
- .generateSASQueryParameters(key)
+ .generateSasQueryParameters(key)
.encode()
then:
@@ -346,7 +345,7 @@ class SASTest extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -367,7 +366,7 @@ class SASTest extends APISpec {
.setContentType(contentType)
.setCanonicalName(snapshotBlob.getBlobUrl(), primaryCredential.getAccountName())
.setSnapshotId(snapshotBlob.getSnapshotId())
- .generateSASQueryParameters(primaryCredential)
+ .generateSasQueryParameters(primaryCredential)
.encode()
and:
@@ -423,7 +422,7 @@ class SASTest extends APISpec {
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -447,7 +446,7 @@ class SASTest extends APISpec {
.setCanonicalName(snapshotBlob.getBlobUrl().toString(), primaryCredential.getAccountName())
.setSnapshotId(snapshotBlob.getSnapshotId())
.setVersion(key.getSignedVersion())
- .generateSASQueryParameters(key)
+ .generateSasQueryParameters(key)
.encode()
// base blob with snapshot SAS
@@ -498,7 +497,7 @@ class SASTest extends APISpec {
.setPermissions(permissions)
.setExpiryTime(expiryTime)
.setCanonicalName(cc.getBlobContainerUrl().toString(), primaryCredential.getAccountName())
- .generateSASQueryParameters(key)
+ .generateSasQueryParameters(key)
.encode()
def client = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl())
@@ -515,18 +514,18 @@ class SASTest extends APISpec {
def bu = cc.getBlobClient(blobName).getBlockBlobClient()
bu.upload(new ByteArrayInputStream(data), data.length)
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setBlob(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
def expiryTime = getUTCNow().plusDays(1)
when:
- def sas = AccountSASSignatureValues.generateAccountSAS(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient()
def os = new ByteArrayOutputStream()
@@ -543,18 +542,18 @@ class SASTest extends APISpec {
def bu = cc.getBlobClient(blobName).getBlockBlobClient()
bu.upload(new ByteArrayInputStream(data), data.length)
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setBlob(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
def expiryTime = getUTCNow().plusDays(1)
when:
- def sas = AccountSASSignatureValues.generateAccountSAS(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient()
client.delete()
@@ -565,19 +564,19 @@ class SASTest extends APISpec {
def "accountSAS network create container fails"() {
setup:
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setBlob(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
.setCreatePermission(false)
def expiryTime = getUTCNow().plusDays(1)
when:
- def sas = AccountSASSignatureValues.generateAccountSAS(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl())
sc.createBlobContainer(generateContainerName())
@@ -588,20 +587,19 @@ class SASTest extends APISpec {
def "accountSAS network create container succeeds"() {
setup:
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setBlob(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
.setCreatePermission(true)
def expiryTime = getUTCNow().plusDays(1)
when:
- def sas = AccountSASSignatureValues.generateAccountSAS(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
-
+ def sas = AccountSasSignatureValues.generateAccountSas(primaryCredential, service, resourceType, permissions, expiryTime, null, null, null, null)
def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl())
sc.createBlobContainer(generateContainerName())
@@ -643,7 +641,7 @@ class SASTest extends APISpec {
.setContentType(type)
v.setResource("bs")
- def token = v.generateSASQueryParameters(primaryCredential)
+ def token = v.generateSasQueryParameters(primaryCredential)
then:
token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign)
@@ -656,10 +654,10 @@ 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 | 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 | "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"
null | null | null | null | null | null | null | "encoding" | 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\n\nencoding\n\n"
@@ -702,7 +700,7 @@ class SASTest extends APISpec {
.setSignedService(keyService)
.setSignedVersion(keyVersion)
.setValue(keyValue)
- def token = v.generateSASQueryParameters(key)
+ def token = v.generateSasQueryParameters(key)
then:
token.getSignature() == Utility.computeHMac256(key.getValue(), expectedStringToSign)
@@ -719,9 +717,9 @@ class SASTest extends APISpec {
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 | 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=" | 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"
null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | 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\n\nencoding\n\n"
@@ -737,7 +735,7 @@ class SASTest extends APISpec {
.setVersion(version)
when:
- v.generateSASQueryParameters((SharedKeyCredential) creds)
+ v.generateSasQueryParameters((SharedKeyCredential) creds)
then:
def e = thrown(NullPointerException)
@@ -897,12 +895,12 @@ class SASTest extends APISpec {
@Unroll
def "SASProtocol parse"() {
expect:
- SASProtocol.parse(protocolStr) == protocol
+ SasProtocol.parse(protocolStr) == protocol
where:
protocolStr || protocol
- "https" || SASProtocol.HTTPS_ONLY
- "https,http" || SASProtocol.HTTPS_HTTP
+ "https" || SasProtocol.HTTPS_ONLY
+ "https,http" || SasProtocol.HTTPS_HTTP
}
@Unroll
@@ -921,9 +919,9 @@ class SASTest extends APISpec {
}
if (usingUserDelegation) {
- serviceSASSignatureValues.generateSASQueryParameters(new UserDelegationKey())
+ serviceSASSignatureValues.generateSasQueryParameters(new UserDelegationKey())
} else {
- serviceSASSignatureValues.generateSASQueryParameters(new SharedKeyCredential("", ""))
+ serviceSASSignatureValues.generateSasQueryParameters(new SharedKeyCredential("", ""))
}
then:
@@ -949,8 +947,8 @@ class SASTest extends APISpec {
@Unroll
def "accountSasSignatures string to sign"() {
when:
- def v = new AccountSASSignatureValues()
- def p = new AccountSASPermission()
+ def v = new AccountSasSignatureValues()
+ def p = new AccountSasPermission()
.setReadPermission(true)
v.setPermissions(p.toString())
.setServices("b")
@@ -964,7 +962,7 @@ class SASTest extends APISpec {
}
v.setProtocol(protocol)
- def token = v.generateSASQueryParameters(primaryCredential)
+ def token = v.generateSasQueryParameters(primaryCredential)
then:
token.getSignature() == primaryCredential.computeHmac256(String.format(expectedStringToSign, primaryCredential.getAccountName()))
@@ -973,13 +971,13 @@ class SASTest extends APISpec {
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 | 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"
+ 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"
}
@Unroll
def "accountSasSignatureValues IA"() {
setup:
- def v = new AccountSASSignatureValues()
+ def v = new AccountSasSignatureValues()
.setPermissions(permissions)
.setServices(service)
.setResourceTypes(resourceType)
@@ -987,7 +985,7 @@ class SASTest extends APISpec {
.setVersion(version)
when:
- v.generateSASQueryParameters(creds)
+ v.generateSasQueryParameters(creds)
then:
def e = thrown(NullPointerException)
@@ -1006,7 +1004,7 @@ class SASTest extends APISpec {
@Unroll
def "AccountSASPermissions toString"() {
setup:
- def perms = new AccountSASPermission()
+ def perms = new AccountSasPermission()
perms.setReadPermission(read)
.setWritePermission(write)
.setDeletePermission(delete)
@@ -1035,7 +1033,7 @@ class SASTest extends APISpec {
@Unroll
def "AccountSASPermissions parse"() {
when:
- def perms = AccountSASPermission.parse(permString)
+ def perms = AccountSasPermission.parse(permString)
then:
perms.getReadPermission() == read
@@ -1063,7 +1061,7 @@ class SASTest extends APISpec {
def "AccountSASPermissions parse IA"() {
when:
- AccountSASPermission.parse("rwaq")
+ AccountSasPermission.parse("rwaq")
then:
thrown(IllegalArgumentException)
@@ -1072,7 +1070,7 @@ class SASTest extends APISpec {
@Unroll
def "AccountSASResourceType toString"() {
setup:
- def resourceTypes = new AccountSASResourceType()
+ def resourceTypes = new AccountSasResourceType()
.setService(service)
.setContainer(container)
.setObject(object)
@@ -1091,12 +1089,12 @@ class SASTest extends APISpec {
@Unroll
def "AccountSASResourceType parse"() {
when:
- def resourceTypes = AccountSASResourceType.parse(resourceTypeString)
+ def resourceTypes = AccountSasResourceType.parse(resourceTypeString)
then:
resourceTypes.isService() == service
resourceTypes.isContainer() == container
- resourceTypes.getObject() == object
+ resourceTypes.isObject() == object
where:
resourceTypeString || service | container | object
@@ -1109,7 +1107,7 @@ class SASTest extends APISpec {
@Unroll
def "AccountSASResourceType IA"() {
when:
- AccountSASResourceType.parse("scq")
+ AccountSasResourceType.parse("scq")
then:
thrown(IllegalArgumentException)
@@ -1117,7 +1115,7 @@ class SASTest extends APISpec {
def "BlobURLParts"() {
setup:
- def parts = new BlobURLParts()
+ def parts = new BlobUrlParts()
parts.setScheme("http")
.setHost("host")
.setContainerName("container")
@@ -1128,7 +1126,7 @@ class SASTest extends APISpec {
.setCanonicalName("/containerName/blobName")
.setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))
.setResource("bs")
- parts.setSasQueryParameters(sasValues.generateSASQueryParameters(primaryCredential))
+ parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential))
when:
def splitParts = parts.toURL().toString().split("\\?")
@@ -1144,7 +1142,7 @@ class SASTest extends APISpec {
def "URLParser"() {
when:
- 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"))
+ 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"
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java
index 206bd57229b8..569b992cdda9 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java
@@ -6,7 +6,7 @@
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.HttpGetterInfo;
import com.azure.storage.blob.implementation.models.BlobsDownloadResponse;
import com.azure.storage.blob.models.BlobDownloadHeaders;
import com.azure.storage.blob.models.StorageErrorException;
@@ -30,7 +30,7 @@ class DownloadResponseMockFlux extends Flux {
private int scenario;
private int tryNumber;
- private HTTPGetterInfo info;
+ private HttpGetterInfo info;
private ByteBuffer scenarioData;
DownloadResponseMockFlux(int scenario, APISpec apiSpec) {
@@ -147,7 +147,7 @@ public void subscribe(CoreSubscriber super ByteBuffer> subscriber) {
}
}
- Mono getter(HTTPGetterInfo info) {
+ Mono getter(HttpGetterInfo info) {
this.tryNumber++;
this.info = info;
BlobsDownloadResponse rawResponse = new BlobsDownloadResponse(null, 200, new HttpHeaders(), this, new BlobDownloadHeaders());
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy
index 46e78f85c301..b796956437e7 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseTest.groovy
@@ -6,7 +6,7 @@ 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.HttpGetterInfo
import com.azure.storage.blob.models.ReliableDownloadOptions
import com.azure.storage.blob.models.StorageErrorException
import spock.lang.Unroll
@@ -36,7 +36,7 @@ class DownloadResponseTest extends APISpec {
setup:
DownloadResponseMockFlux flux = new DownloadResponseMockFlux(scenario, this)
- HTTPGetterInfo info = new HTTPGetterInfo()
+ HttpGetterInfo info = new HttpGetterInfo()
.setOffset(0)
.setCount(flux.getScenarioData().remaining())
.setETag("etag")
@@ -63,7 +63,7 @@ class DownloadResponseTest extends APISpec {
setup:
DownloadResponseMockFlux flux = new DownloadResponseMockFlux(scenario, this)
ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5)
- HTTPGetterInfo info = new HTTPGetterInfo().setETag("etag")
+ HttpGetterInfo info = new HttpGetterInfo().setETag("etag")
when:
DownloadAsyncResponse response = flux.getter(info).block()
@@ -94,7 +94,7 @@ class DownloadResponseTest extends APISpec {
DownloadResponseMockFlux flux = new DownloadResponseMockFlux(DownloadResponseMockFlux.DR_TEST_SCENARIO_SUCCESSFUL_ONE_CHUNK, this)
when:
- new DownloadAsyncResponse(flux.getter(info).block().getRawResponse(), info, { HTTPGetterInfo newInfo -> flux.getter(newInfo) })
+ new DownloadAsyncResponse(flux.getter(info).block().getRawResponse(), info, { HttpGetterInfo newInfo -> flux.getter(newInfo) })
then:
thrown(NullPointerException)
@@ -102,7 +102,7 @@ class DownloadResponseTest extends APISpec {
where:
info | _
null | _
- new HTTPGetterInfo().setETag(null) | _
+ new HttpGetterInfo().setETag(null) | _
}
def "Options IA"() {
@@ -118,8 +118,8 @@ class DownloadResponseTest extends APISpec {
DownloadResponseMockFlux flux = new DownloadResponseMockFlux(DownloadResponseMockFlux.DR_TEST_SCENARIO_SUCCESSFUL_ONE_CHUNK, this)
when:
- DownloadAsyncResponse response = new DownloadAsyncResponse(flux.getter(new HTTPGetterInfo()).block()
- .getRawResponse(), new HTTPGetterInfo().setETag("etag"), null)
+ DownloadAsyncResponse response = new DownloadAsyncResponse(flux.getter(new HttpGetterInfo()).block()
+ .getRawResponse(), new HttpGetterInfo().setETag("etag"), null)
response.body(null).blockFirst()
then:
@@ -129,7 +129,7 @@ class DownloadResponseTest extends APISpec {
def "Info"() {
setup:
DownloadResponseMockFlux flux = new DownloadResponseMockFlux(DownloadResponseMockFlux.DR_TEST_SCENARIO_INFO_TEST, this)
- HTTPGetterInfo info = new HTTPGetterInfo()
+ HttpGetterInfo info = new HttpGetterInfo()
.setOffset(20)
.setCount(10)
.setETag("etag")
@@ -146,7 +146,7 @@ class DownloadResponseTest extends APISpec {
def "Info count IA"() {
when:
- new HTTPGetterInfo().setCount(-1)
+ new HttpGetterInfo().setCount(-1)
then:
thrown(IllegalArgumentException)
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy
index 81223787366b..047d236d35be 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy
@@ -5,17 +5,16 @@ 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.BlobUrlParts
import com.azure.storage.blob.models.BlobRange
import com.azure.storage.blob.models.UserDelegationKey
-import com.azure.storage.common.AccountSASPermission
-import com.azure.storage.common.AccountSASResourceType
-import com.azure.storage.common.AccountSASSignatureValues
+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.SASProtocol
+import com.azure.storage.common.SasProtocol
import com.azure.storage.common.Utility
import com.azure.storage.common.credentials.SharedKeyCredential
import spock.lang.Unroll
@@ -121,7 +120,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,
@@ -149,10 +148,10 @@ class HelperTest extends APISpec {
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) | 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 | 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"
@@ -205,7 +204,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())
@@ -226,9 +225,9 @@ class HelperTest extends APISpec {
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 | 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=" | 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"
@@ -255,7 +254,7 @@ class HelperTest extends APISpec {
primaryCredential.getAccountName())
when:
- BlobServiceSasQueryParameters token = v.generateSASQueryParameters(primaryCredential)
+ BlobServiceSasQueryParameters token = v.generateSasQueryParameters(primaryCredential)
then:
token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign)
@@ -281,7 +280,7 @@ class HelperTest extends APISpec {
.setVersion(version)
when:
- v.generateSASQueryParameters((SharedKeyCredential)creds)
+ v.generateSasQueryParameters((SharedKeyCredential)creds)
then:
def e = thrown(NullPointerException)
@@ -442,12 +441,12 @@ class HelperTest extends APISpec {
@Unroll
def "SASProtocol parse"() {
expect:
- SASProtocol.parse(protocolStr) == protocol
+ SasProtocol.parse(protocolStr) == protocol
where:
protocolStr || protocol
- "https" || SASProtocol.HTTPS_ONLY
- "https,http" || SASProtocol.HTTPS_HTTP
+ "https" || SasProtocol.HTTPS_ONLY
+ "https,http" || SasProtocol.HTTPS_HTTP
}
/*
@@ -459,8 +458,8 @@ class HelperTest extends APISpec {
@Unroll
def "accountSasSignatures string to sign"() {
when:
- AccountSASSignatureValues v = new AccountSASSignatureValues()
- .setPermissions(new AccountSASPermission().setReadPermission(true).toString())
+ AccountSasSignatureValues v = new AccountSasSignatureValues()
+ .setPermissions(new AccountSasPermission().setReadPermission(true).toString())
.setServices("b")
.setResourceTypes("o")
.setStartTime(startTime)
@@ -471,7 +470,7 @@ class HelperTest extends APISpec {
v.setIpRange(new IpRange().setIpMin("ip"))
}
- def token = v.generateSASQueryParameters(primaryCredential)
+ def token = v.generateSasQueryParameters(primaryCredential)
expectedStringToSign = String.format(expectedStringToSign, primaryCredential.getAccountName())
@@ -482,13 +481,13 @@ class HelperTest extends APISpec {
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 | 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"
+ 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"
}
@Unroll
def "accountSasSignatureValues IA"() {
setup:
- AccountSASSignatureValues v = new AccountSASSignatureValues()
+ AccountSasSignatureValues v = new AccountSasSignatureValues()
.setPermissions(permissions)
.setServices(service)
.setResourceTypes(resourceType)
@@ -496,7 +495,7 @@ class HelperTest extends APISpec {
.setVersion(version)
when:
- v.generateSASQueryParameters(creds)
+ v.generateSasQueryParameters(creds)
then:
def e = thrown(NullPointerException)
@@ -515,7 +514,7 @@ class HelperTest extends APISpec {
@Unroll
def "AccountSASPermissions toString"() {
setup:
- AccountSASPermission perms = new AccountSASPermission()
+ AccountSasPermission perms = new AccountSasPermission()
.setReadPermission(read)
.setWritePermission(write)
.setDeletePermission(delete)
@@ -544,7 +543,7 @@ class HelperTest extends APISpec {
@Unroll
def "AccountSASPermissions parse"() {
when:
- AccountSASPermission perms = AccountSASPermission.parse(permString)
+ AccountSasPermission perms = AccountSasPermission.parse(permString)
then:
perms.getReadPermission() == read
@@ -572,7 +571,7 @@ class HelperTest extends APISpec {
def "AccountSASPermissions parse IA"() {
when:
- AccountSASPermission.parse("rwaq")
+ AccountSasPermission.parse("rwaq")
then:
thrown(IllegalArgumentException)
@@ -581,7 +580,7 @@ class HelperTest extends APISpec {
@Unroll
def "AccountSASResourceType toString"() {
setup:
- AccountSASResourceType resourceTypes = new AccountSASResourceType()
+ AccountSasResourceType resourceTypes = new AccountSasResourceType()
.setService(service)
.setContainer(container)
.setObject(object)
@@ -600,12 +599,12 @@ class HelperTest extends APISpec {
@Unroll
def "AccountSASResourceType parse"() {
when:
- AccountSASResourceType resourceTypes = AccountSASResourceType.parse(resourceTypeString)
+ AccountSasResourceType resourceTypes = AccountSasResourceType.parse(resourceTypeString)
then:
resourceTypes.isService() == service
resourceTypes.isContainer() == container
- resourceTypes.getObject() == object
+ resourceTypes.isObject() == object
where:
resourceTypeString || service | container | object
@@ -618,7 +617,7 @@ class HelperTest extends APISpec {
@Unroll
def "AccountSASResourceType IA"() {
when:
- AccountSASResourceType.parse("scq")
+ AccountSasResourceType.parse("scq")
then:
thrown(IllegalArgumentException)
@@ -626,7 +625,7 @@ class HelperTest extends APISpec {
def "BlobURLParts"() {
setup:
- BlobURLParts parts = new BlobURLParts()
+ BlobUrlParts parts = new BlobUrlParts()
.setScheme("http")
.setHost("host")
.setContainerName("container")
@@ -639,7 +638,7 @@ class HelperTest extends APISpec {
.setCanonicalName(String.format("/blob/%s/container/blob", primaryCredential.getAccountName()))
.setResource(Constants.UrlConstants.SAS_BLOB_SNAPSHOT_CONSTANT)
- parts.setSasQueryParameters(sasValues.generateSASQueryParameters(primaryCredential))
+ parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential))
when:
String[] splitParts = parts.toURL().toString().split("\\?")
@@ -655,7 +654,7 @@ class HelperTest extends APISpec {
def "URLParser"() {
when:
- 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"))
+ 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"
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java
similarity index 83%
rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASPermission.java
rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java
index 8e36fb8dbe88..28a5094758cf 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASPermission.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasPermission.java
@@ -9,10 +9,10 @@
* This is a helper class to construct a string representing the permissions granted by an AccountSAS. 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 an {@link
- * AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but the
+ * AccountSasSignatureValues} 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 AccountSASPermission {
+public final class AccountSasPermission {
private boolean readPermission;
@@ -31,22 +31,22 @@ public final class AccountSASPermission {
private boolean processMessagesPermission;
/**
- * Initializes an {@code AccountSASPermission} object with all fields set to false.
+ * Initializes an {@code AccountSasPermission} object with all fields set to false.
*/
- public AccountSASPermission() {
+ public AccountSasPermission() {
}
/**
- * Creates an {@code AccountSASPermission} from the specified permissions string. This method will throw an
+ * Creates an {@code AccountSasPermission} 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 SharedAccessAccountPermissions}.
- * @return An {@code AccountSASPermission} object generated from the given {@code String}.
+ * @return An {@code AccountSasPermission} object generated from the given {@code String}.
* @throws IllegalArgumentException If {@code permString} contains a character other than r, w, d, l, a, c, u, or
* p.
*/
- public static AccountSASPermission parse(String permString) {
- AccountSASPermission permissions = new AccountSASPermission();
+ public static AccountSasPermission parse(String permString) {
+ AccountSasPermission permissions = new AccountSasPermission();
for (int i = 0; i < permString.length(); i++) {
char c = permString.charAt(i);
@@ -95,9 +95,9 @@ public boolean getReadPermission() {
* Sets the read permission status.
*
* @param hasReadPermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setReadPermission(boolean hasReadPermission) {
+ public AccountSasPermission setReadPermission(boolean hasReadPermission) {
this.readPermission = hasReadPermission;
return this;
}
@@ -113,9 +113,9 @@ public boolean getAddPermission() {
* Sets the add permission status.
*
* @param hadAddPermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setAddPermission(boolean hadAddPermission) {
+ public AccountSasPermission setAddPermission(boolean hadAddPermission) {
this.addPermission = hadAddPermission;
return this;
}
@@ -131,9 +131,9 @@ public boolean getCreatePermission() {
* Sets the create permission status.
*
* @param hasCreatePermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setCreatePermission(boolean hasCreatePermission) {
+ public AccountSasPermission setCreatePermission(boolean hasCreatePermission) {
this.createPermission = hasCreatePermission;
return this;
}
@@ -149,9 +149,9 @@ public boolean getWritePermission() {
* Sets the write permission status.
*
* @param hasWritePermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setWritePermission(boolean hasWritePermission) {
+ public AccountSasPermission setWritePermission(boolean hasWritePermission) {
this.writePermission = hasWritePermission;
return this;
}
@@ -167,9 +167,9 @@ public boolean getDeletePermission() {
* Sets the delete permission status.
*
* @param hasDeletePermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setDeletePermission(boolean hasDeletePermission) {
+ public AccountSasPermission setDeletePermission(boolean hasDeletePermission) {
this.deletePermission = hasDeletePermission;
return this;
}
@@ -186,9 +186,9 @@ public boolean getListPermission() {
* directories, and files.
*
* @param hadListPermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setListPermission(boolean hadListPermission) {
+ public AccountSasPermission setListPermission(boolean hadListPermission) {
this.listPermission = hadListPermission;
return this;
}
@@ -206,9 +206,9 @@ public boolean getUpdatePermission() {
* Sets the update permission status, it allows the update of queue messages and tables.
*
* @param hasUpdatePermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setUpdatePermission(boolean hasUpdatePermission) {
+ public AccountSasPermission setUpdatePermission(boolean hasUpdatePermission) {
this.updatePermission = hasUpdatePermission;
return this;
}
@@ -226,9 +226,9 @@ public boolean getProcessMessages() {
* Sets the process messages permission, this allows the retrieval and deletion of queue messages.
*
* @param hasProcessMessagesPermission Permission status to set
- * @return the updated AccountSASPermission object
+ * @return the updated AccountSasPermission object
*/
- public AccountSASPermission setProcessMessages(boolean hasProcessMessagesPermission) {
+ public AccountSasPermission setProcessMessages(boolean hasProcessMessagesPermission) {
this.processMessagesPermission = hasProcessMessagesPermission;
return this;
}
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java
index 11f727c7ae3b..73355240ac31 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasQueryParameters.java
@@ -8,7 +8,7 @@
/**
* 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 AccountSASSignatureValues} type. Once generated, it can be set on a
+ * by the user; it is only generated by the {@link AccountSasSignatureValues} type. Once generated, it can be set on a
* ServiceClientBuilder 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
@@ -51,7 +51,7 @@ public AccountSasQueryParameters(Map queryParamsMap, boolean r
* @param permissions A {@code String} representing the storage permissions or {@code null}.
* @param signature A {@code String} representing the signature for the SAS token.
*/
- AccountSasQueryParameters(String version, String services, String resourceTypes, SASProtocol protocol,
+ AccountSasQueryParameters(String version, String services, String resourceTypes, SasProtocol protocol,
OffsetDateTime startTime, OffsetDateTime expiryTime, IpRange ipRange,
String permissions, String signature) {
super(version, protocol, startTime, expiryTime, ipRange, permissions, signature);
@@ -60,7 +60,7 @@ public AccountSasQueryParameters(Map queryParamsMap, boolean r
}
/**
- * @return The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASService} for
+ * @return The storage services being accessed (only for Account SAS). Please refer to {@link AccountSasService} for
* more details.
*/
public String getServices() {
@@ -69,7 +69,7 @@ public String getServices() {
/**
* @return The storage resource types being accessed (only for Account SAS). Please refer to {@link
- * AccountSASResourceType} for more details.
+ * AccountSasResourceType} for more details.
*/
public String getResourceTypes() {
return resourceTypes;
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASResourceType.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java
similarity index 82%
rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASResourceType.java
rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java
index e8c7df1119ee..e4490618f93c 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASResourceType.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasResourceType.java
@@ -9,10 +9,10 @@
* This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant access to that resource type. Once all the values
* are set, this should be serialized with toString and set as the resources field on an {@link
- * AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but the order
+ * AccountSasSignatureValues} object. It is possible to construct the resources string without this class, but the order
* of the resources is particular and this class guarantees correctness.
*/
-public final class AccountSASResourceType {
+public final class AccountSasResourceType {
private boolean service;
@@ -21,21 +21,21 @@ public final class AccountSASResourceType {
private boolean object;
/**
- * Initializes an {@code AccountSASResourceType} object with all fields set to false.
+ * Initializes an {@code AccountSasResourceType} object with all fields set to false.
*/
- public AccountSASResourceType() {
+ public AccountSasResourceType() {
}
/**
- * Creates an {@code AccountSASResourceType} from the specified resource types string. This method will throw an
+ * Creates an {@code AccountSasResourceType} from the specified resource types string. This method will throw an
* {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid resource type.
*
* @param resourceTypesString A {@code String} which represents the {@code AccountSASResourceTypes}.
- * @return A {@code AccountSASResourceType} generated from the given {@code String}.
+ * @return A {@code AccountSasResourceType} generated from the given {@code String}.
* @throws IllegalArgumentException If {@code resourceTypesString} contains a character other than s, c, or o.
*/
- public static AccountSASResourceType parse(String resourceTypesString) {
- AccountSASResourceType resourceType = new AccountSASResourceType();
+ public static AccountSasResourceType parse(String resourceTypesString) {
+ AccountSasResourceType resourceType = new AccountSasResourceType();
for (int i = 0; i < resourceTypesString.length(); i++) {
char c = resourceTypesString.charAt(i);
@@ -69,9 +69,9 @@ public boolean isService() {
* Sets the access status for service level APIs.
*
* @param service Access status to set
- * @return the updated AccountSASResourceType object.
+ * @return the updated AccountSasResourceType object.
*/
- public AccountSASResourceType setService(boolean service) {
+ public AccountSasResourceType setService(boolean service) {
this.service = service;
return this;
}
@@ -89,9 +89,9 @@ public boolean isContainer() {
* Shares.
*
* @param container Access status to set
- * @return the updated AccountSASResourceType object.
+ * @return the updated AccountSasResourceType object.
*/
- public AccountSASResourceType setContainer(boolean container) {
+ public AccountSasResourceType setContainer(boolean container) {
this.container = container;
return this;
}
@@ -100,7 +100,7 @@ public AccountSASResourceType setContainer(boolean container) {
* @return the access status for object level APIs, this grants access to Blobs, Table Entities, Queue Messages,
* Files.
*/
- public boolean getObject() {
+ public boolean isObject() {
return object;
}
@@ -109,9 +109,9 @@ public boolean getObject() {
* Files.
*
* @param object Access status to set
- * @return the updated AccountSASResourceType object.
+ * @return the updated AccountSasResourceType object.
*/
- public AccountSASResourceType setObject(boolean object) {
+ public AccountSasResourceType setObject(boolean object) {
this.object = object;
return this;
}
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASService.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java
similarity index 82%
rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASService.java
rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java
index 57c7351047f5..997b2e2da6a6 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASService.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasService.java
@@ -9,10 +9,10 @@
* This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value
* to true means that any SAS which uses these permissions will grant access to that service. Once all the
* values are set, this should be serialized with toString and set as the services field on an
- * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but
+ * {@link AccountSasSignatureValues} object. It is possible to construct the services string without this class, but
* the order of the services is particular and this class guarantees correctness.
*/
-public final class AccountSASService {
+public final class AccountSasService {
private boolean blob;
@@ -23,22 +23,22 @@ public final class AccountSASService {
private boolean table;
/**
- * Initializes an {@code AccountSASService} object with all fields set to false.
+ * Initializes an {@code AccountSasService} object with all fields set to false.
*/
- public AccountSASService() {
+ public AccountSasService() {
}
/**
- * Creates an {@code AccountSASService} from the specified services string. This method will throw an
+ * Creates an {@code AccountSasService} from the specified services string. This method will throw an
* {@code IllegalArgumentException} if it encounters a character that does not correspond to a valid service.
*
* @param servicesString A {@code String} which represents the {@code SharedAccessAccountServices}.
*
- * @return A {@code AccountSASService} generated from the given {@code String}.
+ * @return A {@code AccountSasService} generated from the given {@code String}.
* @throws IllegalArgumentException If {@code servicesString} contains a character other than b, f, q, or t.
*/
- public static AccountSASService parse(String servicesString) {
- AccountSASService services = new AccountSASService();
+ public static AccountSasService parse(String servicesString) {
+ AccountSasService services = new AccountSasService();
for (int i = 0; i < servicesString.length(); i++) {
char c = servicesString.charAt(i);
@@ -75,9 +75,9 @@ public boolean isBlob() {
* Sets the access status for blob resources.
*
* @param blob Access status to set
- * @return the updated AccountSASService object.
+ * @return the updated AccountSasService object.
*/
- public AccountSASService setBlob(boolean blob) {
+ public AccountSasService setBlob(boolean blob) {
this.blob = blob;
return this;
}
@@ -93,9 +93,9 @@ public boolean isFile() {
* Sets the access status for file resources.
*
* @param file Access status to set
- * @return the updated AccountSASService object.
+ * @return the updated AccountSasService object.
*/
- public AccountSASService setFile(boolean file) {
+ public AccountSasService setFile(boolean file) {
this.file = file;
return this;
}
@@ -111,9 +111,9 @@ public boolean isQueue() {
* Sets the access status for queue resources.
*
* @param queue Access status to set
- * @return the updated AccountSASService object.
+ * @return the updated AccountSasService object.
*/
- public AccountSASService setQueue(boolean queue) {
+ public AccountSasService setQueue(boolean queue) {
this.queue = queue;
return this;
}
@@ -129,9 +129,9 @@ public boolean isTable() {
* Sets the access status for table resources.
*
* @param table Access status to set
- * @return the updated AccountSASService object.
+ * @return the updated AccountSasService object.
*/
- public AccountSASService setTable(boolean table) {
+ public AccountSasService setTable(boolean table) {
this.table = table;
return this;
}
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASSignatureValues.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java
similarity index 77%
rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASSignatureValues.java
rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java
index c8b6fa5fad49..0ae8b168fdb2 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSASSignatureValues.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/AccountSasSignatureValues.java
@@ -8,7 +8,7 @@
import java.time.OffsetDateTime;
/**
- * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all
+ * AccountSasSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. 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 AccountSasQueryParameters} exist because
* the former is mutable and a logical representation while the latter is immutable and used to generate actual REST
@@ -27,11 +27,11 @@
* here
* for additional samples.
*/
-public final class AccountSASSignatureValues {
+public final class AccountSasSignatureValues {
private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION;
- private SASProtocol protocol;
+ private SasProtocol protocol;
private OffsetDateTime startTime;
@@ -46,34 +46,34 @@ public final class AccountSASSignatureValues {
private String resourceTypes;
/**
- * Initializes an {@code AccountSASSignatureValues} object with the version number set to the default and all other
+ * Initializes an {@code AccountSasSignatureValues} object with the version number set to the default and all other
* values empty.
*/
- public AccountSASSignatureValues() {
+ public AccountSasSignatureValues() {
}
/**
* Shared method between service clients to generate an account SAS.
*
* @param sharedKeyCredential The {@code SharedKeyCredential} shared key credential for the account SAS
- * @param accountSASService The {@code AccountSASService} services for the account SAS
- * @param accountSASResourceType An optional {@code AccountSASResourceType} resources for the account SAS
- * @param accountSASPermission The {@code AccountSASPermission} permission for the account SAS
+ * @param accountSASService The {@code AccountSasService} services for the account SAS
+ * @param accountSASResourceType An optional {@code AccountSasResourceType} resources for the account SAS
+ * @param accountSASPermission The {@code AccountSasPermission} permission for the account SAS
* @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 sasProtocol An optional {@code SASProtocol} protocol for the SAS
+ * @param sasProtocol An optional {@code SasProtocol} protocol for the SAS
* @return A string that represents the SAS token
* @throws NullPointerException If any of {@code sharedKeyCredentials}, {@code services}, {@code resourceTypes},
* {@code expiryTime}, {@code permissions} or {@code versions} is null
*/
- public static String generateAccountSAS(SharedKeyCredential sharedKeyCredential, AccountSASService
- accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission,
+ public static String generateAccountSas(SharedKeyCredential sharedKeyCredential, AccountSasService
+ accountSASService, AccountSasResourceType accountSASResourceType, AccountSasPermission accountSASPermission,
OffsetDateTime expiryTime, OffsetDateTime startTime, String version,
- IpRange ipRange, SASProtocol sasProtocol) {
+ IpRange ipRange, SasProtocol sasProtocol) {
- AccountSASSignatureValues values = new AccountSASSignatureValues();
+ AccountSasSignatureValues values = new AccountSasSignatureValues();
values.setServices(accountSASService == null ? null : accountSASService.toString());
values.setResourceTypes(accountSASResourceType == null ? null : accountSASResourceType.toString());
@@ -88,7 +88,7 @@ public static String generateAccountSAS(SharedKeyCredential sharedKeyCredential,
values.setIpRange(ipRange);
values.setProtocol(sasProtocol);
- AccountSasQueryParameters sasQueryParameters = values.generateSASQueryParameters(sharedKeyCredential);
+ AccountSasQueryParameters sasQueryParameters = values.generateSasQueryParameters(sharedKeyCredential);
return sasQueryParameters.encode();
}
@@ -106,27 +106,27 @@ public String getVersion() {
* library.
*
* @param version Target version to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setVersion(String version) {
+ public AccountSasSignatureValues setVersion(String version) {
this.version = version;
return this;
}
/**
- * @return the {@link SASProtocol} which determines the HTTP protocol that will be used.
+ * @return the {@link SasProtocol} which determines the HTTP protocol that will be used.
*/
- public SASProtocol getProtocol() {
+ public SasProtocol getProtocol() {
return protocol;
}
/**
- * Sets the {@link SASProtocol} which determines the HTTP protocol that will be used.
+ * Sets the {@link SasProtocol} which determines the HTTP protocol that will be used.
*
* @param protocol Protocol to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setProtocol(SASProtocol protocol) {
+ public AccountSasSignatureValues setProtocol(SasProtocol protocol) {
this.protocol = protocol;
return this;
}
@@ -142,9 +142,9 @@ public OffsetDateTime getStartTime() {
* Sets when the SAS will take effect.
*
* @param startTime Start time to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setStartTime(OffsetDateTime startTime) {
+ public AccountSasSignatureValues setStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
}
@@ -160,15 +160,15 @@ public OffsetDateTime getExpiryTime() {
* Sets the time after which the SAS will no longer work.
*
* @param expiryTime Expiry time to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setExpiryTime(OffsetDateTime expiryTime) {
+ public AccountSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) {
this.expiryTime = expiryTime;
return this;
}
/**
- * @return the operations the SAS user may perform. Please refer to {@link AccountSASPermission} to help determine
+ * @return the operations the SAS user may perform. Please refer to {@link AccountSasPermission} to help determine
* which permissions are allowed.
*/
public String getPermissions() {
@@ -176,13 +176,13 @@ public String getPermissions() {
}
/**
- * Sets the operations the SAS user may perform. Please refer to {@link AccountSASPermission} for help constructing
+ * Sets the operations the SAS user may perform. Please refer to {@link AccountSasPermission} for help constructing
* the permissions string.
*
* @param permissions Permissions string to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setPermissions(String permissions) {
+ public AccountSasSignatureValues setPermissions(String permissions) {
this.permissions = permissions;
return this;
}
@@ -198,15 +198,15 @@ public IpRange getIpRange() {
* 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 AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setIpRange(IpRange ipRange) {
+ public AccountSasSignatureValues setIpRange(IpRange ipRange) {
this.ipRange = ipRange;
return this;
}
/**
- * @return the services accessible with this SAS. Please refer to {@link AccountSASService} to help determine which
+ * @return the services accessible with this SAS. Please refer to {@link AccountSasService} to help determine which
* services are accessible.
*/
public String getServices() {
@@ -214,18 +214,18 @@ public String getServices() {
}
/**
- * Sets the services accessible with this SAS. Please refer to {@link AccountSASService} to construct this value.
+ * Sets the services accessible with this SAS. Please refer to {@link AccountSasService} to construct this value.
*
* @param services Allowed services string to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setServices(String services) {
+ public AccountSasSignatureValues setServices(String services) {
this.services = services;
return this;
}
/**
- * @return the resource types accessible with this SAS. Please refer to {@link AccountSASResourceType} to help
+ * @return the resource types accessible with this SAS. Please refer to {@link AccountSasResourceType} to help
* determine the resource types that are accessible.
*/
public String getResourceTypes() {
@@ -233,13 +233,13 @@ public String getResourceTypes() {
}
/**
- * Sets the resource types accessible with this SAS. Please refer to {@link AccountSASResourceType} to construct
+ * Sets the resource types accessible with this SAS. Please refer to {@link AccountSasResourceType} to construct
* this value.
*
* @param resourceTypes Allowed resource types string to set
- * @return the updated AccountSASSignatureValues object.
+ * @return the updated AccountSasSignatureValues object.
*/
- public AccountSASSignatureValues setResourceTypes(String resourceTypes) {
+ public AccountSasSignatureValues setResourceTypes(String resourceTypes) {
this.resourceTypes = resourceTypes;
return this;
}
@@ -254,7 +254,7 @@ public AccountSASSignatureValues setResourceTypes(String resourceTypes) {
* @throws NullPointerException If any of {@code sharedKeyCredentials}, {@code services}, {@code resourceTypes},
* {@code expiryTime}, {@code permissions} or {@code versions} is null
*/
- public AccountSasQueryParameters generateSASQueryParameters(SharedKeyCredential sharedKeyCredentials) {
+ public AccountSasQueryParameters generateSasQueryParameters(SharedKeyCredential sharedKeyCredentials) {
Utility.assertNotNull("SharedKeyCredential", sharedKeyCredentials);
Utility.assertNotNull("services", this.services);
Utility.assertNotNull("resourceTypes", this.resourceTypes);
@@ -272,7 +272,7 @@ public AccountSasQueryParameters generateSASQueryParameters(SharedKeyCredential
private String stringToSign(final SharedKeyCredential sharedKeyCredentials) {
return String.join("\n",
sharedKeyCredentials.getAccountName(),
- AccountSASPermission.parse(this.permissions).toString(), // guarantees ordering
+ AccountSasPermission.parse(this.permissions).toString(), // guarantees ordering
this.services,
resourceTypes,
this.startTime == null ? Constants.EMPTY_STRING
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java
index bd0b280f1c5d..9b0f8ad52a00 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/BaseSasQueryParameters.java
@@ -18,7 +18,7 @@ public abstract class BaseSasQueryParameters {
protected String version;
- protected SASProtocol protocol;
+ protected SasProtocol protocol;
protected OffsetDateTime startTime;
@@ -41,7 +41,7 @@ public BaseSasQueryParameters(Map queryParamsMap, boolean remo
this.version = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SERVICE_VERSION,
removeSASParametersFromMap);
this.protocol = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_PROTOCOL,
- removeSASParametersFromMap, SASProtocol::parse);
+ removeSASParametersFromMap, SasProtocol::parse);
this.startTime = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_START_TIME,
removeSASParametersFromMap, Utility::parseDate);
this.expiryTime = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_EXPIRY_TIME,
@@ -103,7 +103,7 @@ protected T getQueryParameter(Map parameters, String name,
* @param permissions A {@code String} representing the storage permissions or {@code null}.
* @param signature A {@code String} representing the signature for the SAS token.
*/
- public BaseSasQueryParameters(String version, SASProtocol protocol, OffsetDateTime startTime,
+ public BaseSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime,
OffsetDateTime expiryTime, IpRange ipRange, String permissions, String signature) {
this.version = version;
this.protocol = protocol;
@@ -122,9 +122,9 @@ public String getVersion() {
}
/**
- * @return The allowed HTTP protocol(s) or {@code null}. Please refer to {@link SASProtocol} for more details.
+ * @return The allowed HTTP protocol(s) or {@code null}. Please refer to {@link SasProtocol} for more details.
*/
- public SASProtocol getProtocol() {
+ public SasProtocol getProtocol() {
return protocol;
}
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SASProtocol.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java
similarity index 77%
rename from sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SASProtocol.java
rename to sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java
index 68c3a6282452..50c35db317f0 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SASProtocol.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/SasProtocol.java
@@ -8,7 +8,7 @@
/**
* Specifies the set of possible permissions for a shared access signature protocol.
*/
-public enum SASProtocol {
+public enum SasProtocol {
/**
* Permission to use SAS only through https granted.
*/
@@ -21,7 +21,7 @@ public enum SASProtocol {
private final String protocols;
- SASProtocol(String p) {
+ SasProtocol(String p) {
this.protocols = p;
}
@@ -30,17 +30,17 @@ public enum SASProtocol {
*
* @param str The value to try to parse.
*
- * @return A {@code SASProtocol} value that represents the string if possible.
+ * @return A {@code SasProtocol} value that represents the string if possible.
* @throws IllegalArgumentException If {@code str} doesn't equal "https" or "https,http"
*/
- public static SASProtocol parse(String str) {
+ public static SasProtocol parse(String str) {
if (str.equals(Constants.HTTPS)) {
- return SASProtocol.HTTPS_ONLY;
+ return SasProtocol.HTTPS_ONLY;
} else if (str.equals(Constants.HTTPS_HTTP)) {
- return SASProtocol.HTTPS_HTTP;
+ return SasProtocol.HTTPS_HTTP;
}
throw new IllegalArgumentException(String.format(Locale.ROOT,
- "%s could not be parsed into a SASProtocol value.", str));
+ "%s could not be parsed into a SasProtocol value.", str));
}
@Override
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/credentials/SasTokenCredential.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/credentials/SasTokenCredential.java
index 6c5d6cf377c7..74be7e4bf9e4 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/credentials/SasTokenCredential.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/credentials/SasTokenCredential.java
@@ -59,7 +59,7 @@ public static SasTokenCredential fromSasTokenString(String sasToken) {
*
* Code Samples
*
- * {@codesnippet com.azure.storage.common.credentials.SASTokenCredential.fromQueryParameters#Map}
+ * {@codesnippet com.azure.storage.common.credentials.SasTokenCredential.fromQueryParameters#Map}
*
* @param queryParameters URL query parameters
* @return a SAS token credential if {@code queryParameters} is not {@code null} and has
diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java
new file mode 100644
index 000000000000..2988a14cbd4b
--- /dev/null
+++ b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/credentials/SASTokenCredentialJavaDocCodeSnippets.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.common.credentials;
+
+import com.azure.storage.common.Utility;
+
+import com.azure.storage.common.implementation.credentials.SasTokenCredential;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+
+/**
+ * Code snippets for {@link SasTokenCredential}.
+ */
+public final class SASTokenCredentialJavaDocCodeSnippets {
+ private final URL url = new URL("https://www.example.com?queryString");
+
+ /**
+ * @throws MalformedURLException ignored
+ */
+ public SASTokenCredentialJavaDocCodeSnippets() throws MalformedURLException {
+ }
+
+ /**
+ * Code sample for {@link SasTokenCredential#fromSasTokenString(String)}.
+ */
+ public void fromSASTokenString() {
+ String preformattedSASToken = "sasToken";
+ // BEGIN: com.azure.storage.common.credentials.SasTokenCredential.fromSasTokenString#String
+ SasTokenCredential credential = SasTokenCredential.fromSasTokenString(preformattedSASToken);
+ // END: com.azure.storage.common.credentials.SasTokenCredential.fromSasTokenString#String
+ }
+
+ /**
+ * Code sample for {@link SasTokenCredential#fromQueryParameters(Map)}.
+ */
+ public void fromQueryParameters() {
+ // BEGIN: com.azure.storage.common.credentials.SasTokenCredential.fromQueryParameters#Map
+ SasTokenCredential credential = SasTokenCredential
+ .fromQueryParameters(Utility.parseQueryString(url.getQuery()));
+ // END: com.azure.storage.common.credentials.SasTokenCredential.fromQueryParameters#Map
+ }
+}
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 6af096fe948d..6ada93636d9f 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,6 +3,10 @@
package com.azure.storage.file;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.file.FileExtensions.filePermissionAndKeyHelper;
+import static com.azure.storage.file.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.rest.PagedFlux;
@@ -40,11 +44,6 @@
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;
-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.UncheckedIOException;
@@ -65,10 +64,10 @@
import java.util.concurrent.TimeoutException;
import java.util.function.Function;
import java.util.stream.Collectors;
-
-import static com.azure.core.implementation.util.FluxUtil.withContext;
-import static com.azure.storage.file.FileExtensions.filePermissionAndKeyHelper;
-import static com.azure.storage.file.PostProcessor.postProcessResponse;
+import reactor.core.Exceptions;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Schedulers;
/**
* This class provides a client that contains all the operations for interacting with file in Azure Storage File
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 65facb96362c..6bb90ad5bf51 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
@@ -20,14 +20,13 @@
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.nio.ByteBuffer;
import java.nio.file.FileAlreadyExistsException;
import java.time.Duration;
import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting files under Azure Storage File Service.
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 f6b016f8acfc..1a7e1cc29673 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,6 +3,9 @@
package com.azure.storage.file;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.file.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedResponse;
@@ -23,16 +26,12 @@
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.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
-
-import static com.azure.core.implementation.util.FluxUtil.withContext;
-import static com.azure.storage.file.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* This class provides a azureFileStorageClient that contains all the operations for interacting with a file account in
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 0f0e2448b640..ae4533dd8c85 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
@@ -15,10 +15,9 @@
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.time.Duration;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* This class provides a fileServiceAsyncClient that contains all the operations for interacting with a file account in
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
index 4d2be37d8f71..70abcc02ccb2 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
@@ -6,7 +6,7 @@
import com.azure.storage.common.BaseSasQueryParameters;
import com.azure.storage.common.Constants;
import com.azure.storage.common.IpRange;
-import com.azure.storage.common.SASProtocol;
+import com.azure.storage.common.SasProtocol;
import java.time.OffsetDateTime;
import java.util.Map;
@@ -75,7 +75,7 @@ public FileServiceSasQueryParameters(Map queryParamsMap, boole
* @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,
+ 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) {
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
index 4ff46fcff2ac..942a58cc8717 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
@@ -5,7 +5,7 @@
import com.azure.storage.common.Constants;
import com.azure.storage.common.IpRange;
-import com.azure.storage.common.SASProtocol;
+import com.azure.storage.common.SasProtocol;
import com.azure.storage.common.Utility;
import com.azure.storage.common.credentials.SharedKeyCredential;
@@ -32,7 +32,7 @@ public final class FileServiceSasSignatureValues {
private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION;
- private SASProtocol protocol;
+ private SasProtocol protocol;
private OffsetDateTime startTime;
@@ -84,7 +84,7 @@ public final class FileServiceSasSignatureValues {
this.identifier = identifier;
}
- FileServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime,
+ 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) {
@@ -124,19 +124,19 @@ public FileServiceSasSignatureValues setVersion(String version) {
}
/**
- * @return the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * @return the {@link SasProtocol} which determines the protocols allowed by the SAS.
*/
- public SASProtocol getProtocol() {
+ public SasProtocol getProtocol() {
return protocol;
}
/**
- * Sets the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * Sets the {@link SasProtocol} which determines the protocols allowed by the SAS.
*
* @param protocol Protocol for the SAS
* @return the updated FileServiceSasSignatureValues object
*/
- public FileServiceSasSignatureValues setProtocol(SASProtocol protocol) {
+ public FileServiceSasSignatureValues setProtocol(SasProtocol protocol) {
this.protocol = protocol;
return this;
}
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 e07cb6e6749d..e01c814eb893 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,6 +3,9 @@
package com.azure.storage.file;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.file.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.rest.PagedFlux;
@@ -29,17 +32,13 @@
import com.azure.storage.file.models.ShareStatistics;
import com.azure.storage.file.models.SignedIdentifier;
import com.azure.storage.file.models.StorageException;
-import reactor.core.publisher.Mono;
-
import java.time.OffsetDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
-
-import static com.azure.core.implementation.util.FluxUtil.withContext;
-import static com.azure.storage.file.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* This class provides a azureFileStorageClient that contains all the operations for interacting with a share in Azure
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 c1ce43c3600d..dfcbe1e07c7d 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
@@ -17,11 +17,10 @@
import com.azure.storage.file.models.ShareStatistics;
import com.azure.storage.file.models.SignedIdentifier;
import com.azure.storage.file.models.StorageException;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.util.List;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting with a share in Azure Storage Share.
diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java
index 3e9469de9f2c..094c4ba61a2c 100644
--- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryAsyncJavaDocCodeSamples.java
@@ -5,7 +5,6 @@
import com.azure.storage.common.credentials.SharedKeyCredential;
import com.azure.storage.file.models.FileHTTPHeaders;
import com.azure.storage.file.models.NtfsFileAttributes;
-
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
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 caf32d80748a..1923c2416b73 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
@@ -7,8 +7,6 @@
import com.azure.storage.file.models.FileProperties;
import com.azure.storage.file.models.FileRange;
import com.azure.storage.file.models.NtfsFileAttributes;
-import reactor.core.publisher.Flux;
-
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
@@ -21,6 +19,7 @@
import java.util.Collections;
import java.util.EnumSet;
import java.util.Map;
+import reactor.core.publisher.Flux;
/**
* Contains code snippets when generating javadocs through doclets for {@link FileClient} and {@link FileAsyncClient}.
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 767c6836d4cd..d4ed5f6b1ef2 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
@@ -15,7 +15,6 @@
import com.azure.storage.file.models.FileUploadInfo;
import com.azure.storage.file.models.FileUploadRangeFromUrlInfo;
import com.azure.storage.file.models.NtfsFileAttributes;
-
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
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 d6f511c97ace..3ccfb020b787 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
@@ -5,7 +5,6 @@
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;
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 77f5aa0dbd59..00f5a9418c42 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
@@ -7,7 +7,6 @@
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;
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 d74a8b5bd6c4..a86f801c76fb 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
@@ -7,7 +7,6 @@
import com.azure.storage.file.models.FileHTTPHeaders;
import com.azure.storage.file.models.NtfsFileAttributes;
import com.azure.storage.file.models.SignedIdentifier;
-
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
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 813b5591e541..9c970872c47e 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
@@ -13,7 +13,6 @@
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;
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 131c41664c06..ecc68d8a30db 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
@@ -1,12 +1,13 @@
package com.azure.storage.file
-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.AccountSasResourceType
+import com.azure.storage.common.AccountSasService
+import com.azure.storage.common.AccountSasPermission
+import com.azure.storage.common.AccountSasSignatureValues
+import com.azure.storage.common.SasProtocol
import com.azure.storage.common.Constants
import com.azure.storage.common.IpRange
-import com.azure.storage.common.SASProtocol
import com.azure.storage.common.credentials.SharedKeyCredential
import com.azure.storage.file.models.AccessPolicy
import com.azure.storage.file.models.SignedIdentifier
@@ -166,7 +167,7 @@ class FileSASTests extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -228,7 +229,7 @@ class FileSASTests extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
def cacheControl = "cache"
def contentDisposition = "disposition"
def contentEncoding = "encoding"
@@ -328,13 +329,13 @@ class FileSASTests extends APISpec {
def "AccountSAS FileService network test create delete share succeeds"() {
setup:
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setFile(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
.setCreatePermission(true)
.setDeletePermission(true)
@@ -342,7 +343,7 @@ class FileSASTests extends APISpec {
when:
def credential = SharedKeyCredential.fromConnectionString(connectionString)
- def sas = AccountSASSignatureValues.generateAccountSAS(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
then:
sas != null
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 2dddbacc2b52..c0f62f4b30e4 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,6 +2,9 @@
// Licensed under the MIT License.
package com.azure.storage.queue;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.queue.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.rest.PagedFlux;
@@ -26,17 +29,13 @@
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.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
-
-import static com.azure.core.implementation.util.FluxUtil.withContext;
-import static com.azure.storage.queue.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting with a queue in Azure Storage Queue.
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 445ac4e52cc0..b782aaa7c35e 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
@@ -15,11 +15,10 @@
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.time.Duration;
import java.util.List;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting with a queue in Azure Storage Queue.
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 055ef8b15f6f..945d96ecb4db 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,6 +2,9 @@
// Licensed under the MIT License.
package com.azure.storage.queue;
+import static com.azure.core.implementation.util.FluxUtil.withContext;
+import static com.azure.storage.queue.PostProcessor.postProcessResponse;
+
import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedResponse;
@@ -21,17 +24,13 @@
import com.azure.storage.queue.models.StorageException;
import com.azure.storage.queue.models.StorageServiceProperties;
import com.azure.storage.queue.models.StorageServiceStats;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
-
-import static com.azure.core.implementation.util.FluxUtil.withContext;
-import static com.azure.storage.queue.PostProcessor.postProcessResponse;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting with a queue account in Azure Storage.
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 fb18329856e1..605c814e9a4c 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
@@ -15,10 +15,9 @@
import com.azure.storage.queue.models.StorageException;
import com.azure.storage.queue.models.StorageServiceProperties;
import com.azure.storage.queue.models.StorageServiceStats;
-import reactor.core.publisher.Mono;
-
import java.time.Duration;
import java.util.Map;
+import reactor.core.publisher.Mono;
/**
* This class provides a client that contains all the operations for interacting with a queue account in Azure Storage.
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
index ce3d5de71237..b283f47a3829 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
@@ -6,7 +6,7 @@
import com.azure.storage.common.BaseSasQueryParameters;
import com.azure.storage.common.Constants;
import com.azure.storage.common.IpRange;
-import com.azure.storage.common.SASProtocol;
+import com.azure.storage.common.SasProtocol;
import java.time.OffsetDateTime;
import java.util.Map;
@@ -52,7 +52,7 @@ public QueueServiceSasQueryParameters(Map queryParamsMap, bool
* @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,
+ 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);
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
index 9d6d16a4a3c8..6ef1b2aec995 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
@@ -5,7 +5,7 @@
import com.azure.storage.common.Constants;
import com.azure.storage.common.IpRange;
-import com.azure.storage.common.SASProtocol;
+import com.azure.storage.common.SasProtocol;
import com.azure.storage.common.Utility;
import com.azure.storage.common.credentials.SharedKeyCredential;
@@ -32,7 +32,7 @@ public final class QueueServiceSasSignatureValues {
private String version = Constants.HeaderConstants.TARGET_STORAGE_VERSION;
- private SASProtocol protocol;
+ private SasProtocol protocol;
private OffsetDateTime startTime;
@@ -72,7 +72,7 @@ public final class QueueServiceSasSignatureValues {
this.identifier = identifier;
}
- QueueServiceSasSignatureValues(String version, SASProtocol sasProtocol, OffsetDateTime startTime,
+ QueueServiceSasSignatureValues(String version, SasProtocol sasProtocol, OffsetDateTime startTime,
OffsetDateTime expiryTime, String permission, IpRange ipRange, String identifier) {
if (version != null) {
this.version = version;
@@ -106,19 +106,19 @@ public QueueServiceSasSignatureValues setVersion(String version) {
}
/**
- * @return the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * @return the {@link SasProtocol} which determines the protocols allowed by the SAS.
*/
- public SASProtocol getProtocol() {
+ public SasProtocol getProtocol() {
return protocol;
}
/**
- * Sets the {@link SASProtocol} which determines the protocols allowed by the SAS.
+ * Sets the {@link SasProtocol} which determines the protocols allowed by the SAS.
*
* @param protocol Protocol for the SAS
* @return the updated QueueServiceSasSignatureValues object
*/
- public QueueServiceSasSignatureValues setProtocol(SASProtocol protocol) {
+ public QueueServiceSasSignatureValues setProtocol(SasProtocol protocol) {
this.protocol = protocol;
return this;
}
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
index cf6b3e4479e0..b8aac7689a64 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
@@ -6,7 +6,6 @@
import com.azure.storage.queue.models.AccessPolicy;
import com.azure.storage.queue.models.QueueProperties;
import com.azure.storage.queue.models.SignedIdentifier;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
index f69c08be8d64..a60c840ee412 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
@@ -11,7 +11,6 @@
import com.azure.storage.queue.models.QueueProperties;
import com.azure.storage.queue.models.SignedIdentifier;
import com.azure.storage.queue.models.UpdatedMessage;
-
import java.time.Duration;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java
index 36998f48e588..2db6612086c2 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java
@@ -6,7 +6,6 @@
import com.azure.storage.queue.models.QueuesSegmentOptions;
import com.azure.storage.queue.models.StorageServiceProperties;
import com.azure.storage.queue.models.StorageServiceStats;
-
import java.util.Collections;
import java.util.Map;
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java
index 2a91874c6bd9..74543642f120 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java
@@ -8,7 +8,6 @@
import com.azure.storage.queue.models.QueuesSegmentOptions;
import com.azure.storage.queue.models.StorageServiceProperties;
import com.azure.storage.queue.models.StorageServiceStats;
-
import java.time.Duration;
import java.util.Collections;
import java.util.Map;
diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy
index 3a63224a208a..17df71e3267b 100644
--- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy
+++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy
@@ -1,11 +1,13 @@
package com.azure.storage.queue
-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.AccountSasPermission
+import com.azure.storage.common.AccountSasResourceType
+import com.azure.storage.common.AccountSasService
+import com.azure.storage.common.AccountSasSignatureValues
+import com.azure.storage.common.SasProtocol
+
import com.azure.storage.common.IpRange
-import com.azure.storage.common.SASProtocol
import com.azure.storage.common.credentials.SharedKeyCredential
import com.azure.storage.queue.models.AccessPolicy
import com.azure.storage.queue.models.EnqueuedMessage
@@ -106,7 +108,7 @@ class QueueSASTests extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
when:
def credential = SharedKeyCredential.fromConnectionString(connectionString)
@@ -156,7 +158,7 @@ class QueueSASTests extends APISpec {
def ipRange = new IpRange()
.setIpMin("0.0.0.0")
.setIpMax("255.255.255.255")
- def sasProtocol = SASProtocol.HTTPS_HTTP
+ def sasProtocol = SasProtocol.HTTPS_HTTP
when:
def credential = SharedKeyCredential.fromConnectionString(connectionString)
@@ -235,13 +237,13 @@ class QueueSASTests extends APISpec {
@Test
def "Test Account QueueServiceSAS create queue delete queue"() {
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setQueue(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setReadPermission(true)
.setCreatePermission(true)
.setDeletePermission(true)
@@ -249,7 +251,7 @@ class QueueSASTests extends APISpec {
when:
def credential = SharedKeyCredential.fromConnectionString(connectionString)
- def sas = AccountSASSignatureValues.generateAccountSAS(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
def scBuilder = queueServiceBuilderHelper(interceptorManager)
scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl())
@@ -269,19 +271,19 @@ class QueueSASTests extends APISpec {
@Test
def "Test Account QueueServiceSAS list queues"() {
- def service = new AccountSASService()
+ def service = new AccountSasService()
.setQueue(true)
- def resourceType = new AccountSASResourceType()
+ def resourceType = new AccountSasResourceType()
.setContainer(true)
.setService(true)
.setObject(true)
- def permissions = new AccountSASPermission()
+ def permissions = new AccountSasPermission()
.setListPermission(true)
def expiryTime = getUTCNow().plusDays(1)
when:
def credential = SharedKeyCredential.fromConnectionString(connectionString)
- def sas = AccountSASSignatureValues.generateAccountSAS(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
+ def sas = AccountSasSignatureValues.generateAccountSas(credential, service, resourceType, permissions, expiryTime, null, null, null, null)
def scBuilder = queueServiceBuilderHelper(interceptorManager)
scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl())