Create a pipeline without configuration
* *- * HttpPipeline.builder() + * new HttpPipelineBuilder() * .build(); ** *
Create a pipeline using the default HTTP client and a retry policy
* *- * HttpPipeline.builder() + * new HttpPipelineBuilder() * .httpClient(HttpClient.createDefault()) * .policies(new RetryPolicy()) * .build(); diff --git a/storage/client/blob/pom.xml b/storage/client/blob/pom.xml index b661ff0ad7e2d..00132d720cd8c 100644 --- a/storage/client/blob/pom.xml +++ b/storage/client/blob/pom.xml @@ -49,7 +49,7 @@com.azure azure-core -1.0.0-preview.2 +1.0.0-preview.3 org.slf4j @@ -69,7 +69,7 @@com.azure azure-core-test -1.0.0-preview.2 +1.0.0-preview.3 test diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index c8ceb3f311d3f..1e5f741d3b8a6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -98,7 +98,7 @@ public class BlobAsyncClient { public BlockBlobAsyncClient asBlockBlobAsyncClient() { return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -110,7 +110,7 @@ public BlockBlobAsyncClient asBlockBlobAsyncClient() { public AppendBlobAsyncClient asAppendBlobAsyncClient() { return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -122,7 +122,7 @@ public AppendBlobAsyncClient asAppendBlobAsyncClient() { public PageBlobAsyncClient asPageBlobAsyncClient() { return new PageBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -136,7 +136,7 @@ public ContainerAsyncClient getContainerAsyncClient() { BlobURLParts parts = URLParser.parse(getBlobUrl()); return new ContainerAsyncClient(new AzureBlobStorageBuilder() .url(String.format("%s://%s/%s", parts.scheme(), parts.host(), parts.containerName())) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -147,13 +147,13 @@ public ContainerAsyncClient getContainerAsyncClient() { */ public URL getBlobUrl() { try { - UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.url()); + UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.getUrl()); if (snapshot != null) { urlBuilder.query("snapshot=" + snapshot); } return urlBuilder.toURL(); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } @@ -925,7 +925,7 @@ public String generateSAS(String identifier, BlobSASPermission permissions, Offs cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); SharedKeyCredential sharedKeyCredential = - Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); @@ -944,7 +944,7 @@ ServiceSASSignatureValues configureServiceSASSignatureValues(ServiceSASSignature String accountName) { // Set canonical name - serviceSASSignatureValues.canonicalName(this.azureBlobStorage.url(), accountName); + serviceSASSignatureValues.canonicalName(this.azureBlobStorage.getUrl(), accountName); // Set snapshotId serviceSASSignatureValues.snapshotId(getSnapshotId()); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index b0e3c98d8904a..4467ea5f6a01a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -120,7 +121,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java b/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java index 936bab6932528..f9cf29c3e79f0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java @@ -107,7 +107,7 @@ public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName) { public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName, String snapshot) { return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -140,7 +140,7 @@ public PageBlobAsyncClient getPageBlobAsyncClient(String blobName) { public PageBlobAsyncClient getPageBlobAsyncClient(String blobName, String snapshot) { return new PageBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -173,7 +173,7 @@ public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName) { public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName, String snapshot) { return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -202,7 +202,7 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { return new BlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -213,7 +213,7 @@ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { public StorageAsyncClient getStorageAsyncClient() { return new StorageAsyncClient(new AzureBlobStorageBuilder() .url(Utility.stripLastPathSegment(getContainerUrl()).toString()) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -224,9 +224,9 @@ public StorageAsyncClient getStorageAsyncClient() { */ public URL getContainerUrl() { try { - return new URL(azureBlobStorage.url()); + return new URL(azureBlobStorage.getUrl()); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } @@ -681,7 +681,7 @@ private Flux listBlobsHierarchyHelper(String delimiter, ListBlobsOptio } else { prefixes = Flux.empty(); } - Flux result = blobs.concatWith(prefixes.map(prefix -> new BlobItem().name(prefix.name()).isPrefix(true))); + Flux result = blobs.map(item -> item.isPrefix(false)).concatWith(prefixes.map(prefix -> new BlobItem().name(prefix.name()).isPrefix(true))); if (response.value().nextMarker() != null) { // Recursively add the continuation items to the observable. @@ -1102,7 +1102,7 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); SharedKeyCredential sharedKeyCredential = - Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); @@ -1119,7 +1119,7 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, */ private ServiceSASSignatureValues configureServiceSASSignatureValues(ServiceSASSignatureValues serviceSASSignatureValues, String accountName) { // Set canonical name - serviceSASSignatureValues.canonicalName(this.azureBlobStorage.url(), accountName); + serviceSASSignatureValues.canonicalName(this.azureBlobStorage.getUrl(), accountName); // Set snapshotId to null serviceSASSignatureValues.snapshotId(null); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java b/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java index 7c9e9543ffd94..97a05be2ed254 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -110,7 +111,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java b/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java index 9e4d0fb2140f5..e84d23ee1dbe0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java @@ -73,7 +73,7 @@ public final class StorageAsyncClient { public ContainerAsyncClient getContainerAsyncClient(String containerName) { return new ContainerAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getAccountUrl(), containerName).toString()) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -125,9 +125,9 @@ public Mono deleteContainer(String containerName) { */ public URL getAccountUrl() { try { - return new URL(azureBlobStorage.url()); + return new URL(azureBlobStorage.getUrl()); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } @@ -318,7 +318,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS accountSASSignatureValues.ipRange(ipRange); accountSASSignatureValues.protocol(sasProtocol); - SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); SASQueryParameters sasQueryParameters = accountSASSignatureValues.generateSASQueryParameters(sharedKeyCredential); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java b/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java index fbbdc0f438ac0..a73249dec8f70 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -104,7 +105,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index a6f486ff075f7..3439bb917017e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.AppendBlobsAppendBlockFromUrlResponse; @@ -56,28 +58,28 @@ public final class AppendBlobsImpl { * @param client the instance of the service client containing this operation class. */ public AppendBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(AppendBlobsService.class, client); + this.service = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for AppendBlobs to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageAppendBlobs + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs AppendBlob") + @ServiceInterface(name = "AzureBlobStorageAppendBlobs") private interface AppendBlobsService { - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); @@ -93,6 +95,7 @@ private interface AppendBlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -112,7 +115,7 @@ public Mono createWithRestResponseAsync(String contai String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -134,6 +137,7 @@ public Mono createWithRestResponseAsync(String contai * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "AppendBlob"; String blobContentType = null; @@ -183,7 +187,7 @@ public Mono createWithRestResponseAsync(String contai String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -197,6 +201,7 @@ public Mono createWithRestResponseAsync(String contai * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final String encryptionKey = null; @@ -212,7 +217,7 @@ public Mono appendBlockWithRestResponseAsync(Str String transactionalContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.appendBlock(containerName, blob, this.client.url(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -235,6 +240,7 @@ public Mono appendBlockWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "appendblock"; String leaseId = null; @@ -268,7 +274,7 @@ public Mono appendBlockWithRestResponseAsync(Str String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock(containerName, blob, this.client.url(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -282,6 +288,7 @@ public Mono appendBlockWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, Context context) { final String sourceRange = null; final Integer timeout = null; @@ -299,7 +306,7 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.appendBlockFromUrl(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -321,6 +328,7 @@ public Mono appendBlockFromUrlWithRestRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "appendblock"; String leaseId = null; @@ -372,6 +380,6 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrl(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java index c77d984c4e928..95eccfcca197c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java @@ -6,10 +6,12 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.ServiceClientBuilder; /** * A builder for creating a new instance of the AzureBlobStorage type. */ +@ServiceClientBuilder(serviceClients = AzureBlobStorageImpl.class) public final class AzureBlobStorageBuilder { /* * The URL of the service account, container, or blob that is the targe of the desired operation. @@ -73,10 +75,10 @@ public AzureBlobStorageImpl build() { } AzureBlobStorageImpl client = new AzureBlobStorageImpl(pipeline); if (this.url != null) { - client.url(this.url); + client.setUrl(this.url); } if (this.version != null) { - client.version(this.version); + client.setVersion(this.version); } return client; } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java index 6702b82da14ea..5fc9bc8ae2736 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java @@ -4,14 +4,13 @@ package com.azure.storage.blob.implementation; -import com.azure.core.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; /** * Initializes a new instance of the AzureBlobStorage type. */ -public final class AzureBlobStorageImpl extends ServiceClient { +public final class AzureBlobStorageImpl { /** * The URL of the service account, container, or blob that is the targe of the desired operation. */ @@ -22,7 +21,7 @@ public final class AzureBlobStorageImpl extends ServiceClient { * * @return the url value. */ - public String url() { + public String getUrl() { return this.url; } @@ -30,11 +29,9 @@ public String url() { * Sets The URL of the service account, container, or blob that is the targe of the desired operation. * * @param url the url value. - * @return the service client itself. */ - AzureBlobStorageImpl url(String url) { + void setUrl(String url) { this.url = url; - return this; } /** @@ -47,7 +44,7 @@ AzureBlobStorageImpl url(String url) { * * @return the version value. */ - public String version() { + public String getVersion() { return this.version; } @@ -55,11 +52,23 @@ public String version() { * Sets Specifies the version of the operation to use for this request. * * @param version the version value. - * @return the service client itself. */ - AzureBlobStorageImpl version(String version) { + void setVersion(String version) { this.version = version; - return this; + } + + /** + * The HTTP pipeline to send requests through. + */ + private HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; } /** @@ -159,7 +168,7 @@ public AzureBlobStorageImpl() { * @param httpPipeline The HTTP pipeline to send requests through. */ public AzureBlobStorageImpl(HttpPipeline httpPipeline) { - super(httpPipeline); + this.httpPipeline = httpPipeline; this.services = new ServicesImpl(this); this.containers = new ContainersImpl(this); this.blobs = new BlobsImpl(this); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index e89e8972aed35..eba1efa297e4b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -4,20 +4,22 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.DELETE; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HEAD; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.Delete; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.Head; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; @@ -71,98 +73,98 @@ public final class BlobsImpl { * @param client the instance of the service client containing this operation class. */ public BlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(BlobsService.class, client); + this.service = RestProxy.create(BlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for Blobs to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageBlobs to be + * used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs") + @ServiceInterface(name = "AzureBlobStorageBlobs") private interface BlobsService { - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @HEAD("{containerName}/{blob}") + @Head("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @DELETE("{containerName}/{blob}") + @Delete("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono undelete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono abortCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -177,6 +179,7 @@ private interface BlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -192,7 +195,7 @@ public Mono downloadWithRestResponseAsync(String containe final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.download(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -215,6 +218,7 @@ public Mono downloadWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, Boolean rangeGetContentMD5, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -238,7 +242,7 @@ public Mono downloadWithRestResponseAsync(String containe } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.download(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -250,6 +254,7 @@ public Mono downloadWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -263,7 +268,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getProperties(containerName, blob, this.client.url(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -284,6 +289,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -307,11 +313,11 @@ public Mono getPropertiesWithRestResponseAsync(Strin } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getProperties(containerName, blob, this.client.url(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the storage service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. * * @param containerName The container name. * @param blob The blob name. @@ -319,6 +325,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -330,11 +337,11 @@ public Mono deleteWithRestResponseAsync(String containerNam final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, blob, this.client.url(), snapshot, versionId, timeout, deleteSnapshots, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the storage service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. * * @param containerName The container name. * @param blob The blob name. @@ -349,6 +356,7 @@ public Mono deleteWithRestResponseAsync(String containerNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, DeleteSnapshotsOptionType deleteSnapshots, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -372,7 +380,7 @@ public Mono deleteWithRestResponseAsync(String containerNam } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, blob, this.client.url(), snapshot, versionId, timeout, deleteSnapshots, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -384,11 +392,12 @@ public Mono deleteWithRestResponseAsync(String containerNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono undeleteWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "undelete"; - return service.undelete(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, context); + return service.undelete(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -402,9 +411,10 @@ public Mono undeleteWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono undeleteWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, Context context) { final String comp = "undelete"; - return service.undelete(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, context); + return service.undelete(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -416,6 +426,7 @@ public Mono undeleteWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; @@ -431,7 +442,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setHTTPHeaders(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -448,6 +459,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String blobCacheControl = null; @@ -497,7 +509,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHTTPHeaders(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -509,6 +521,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; @@ -522,7 +535,7 @@ public Mono setMetadataWithRestResponseAsync(String co final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setMetadata(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -542,6 +555,7 @@ public Mono setMetadataWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "metadata"; String leaseId = null; @@ -566,7 +580,7 @@ public Mono setMetadataWithRestResponseAsync(String co } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadata(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -578,6 +592,7 @@ public Mono setMetadataWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Integer duration = null; @@ -589,7 +604,7 @@ public Mono acquireLeaseWithRestResponseAsync(String final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, blob, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -606,6 +621,7 @@ public Mono acquireLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "acquire"; @@ -627,7 +643,7 @@ public Mono acquireLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, blob, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -640,6 +656,7 @@ public Mono acquireLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -649,7 +666,7 @@ public Mono releaseLeaseWithRestResponseAsync(String final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -665,6 +682,7 @@ public Mono releaseLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "release"; @@ -686,7 +704,7 @@ public Mono releaseLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -699,6 +717,7 @@ public Mono releaseLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -708,7 +727,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -724,6 +743,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "renew"; @@ -745,7 +765,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -759,6 +779,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -768,7 +789,7 @@ public Mono changeLeaseWithRestResponseAsync(String co final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, blob, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -785,6 +806,7 @@ public Mono changeLeaseWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "change"; @@ -806,7 +828,7 @@ public Mono changeLeaseWithRestResponseAsync(String co } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, blob, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -818,6 +840,7 @@ public Mono changeLeaseWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Integer breakPeriod = null; @@ -828,7 +851,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, blob, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -844,6 +867,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "break"; @@ -865,7 +889,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, blob, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -877,6 +901,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; @@ -890,7 +915,7 @@ public Mono createSnapshotWithRestResponseAsync(Str final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.createSnapshot(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -910,6 +935,7 @@ public Mono createSnapshotWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "snapshot"; OffsetDateTime ifModifiedSince = null; @@ -934,7 +960,7 @@ public Mono createSnapshotWithRestResponseAsync(Str } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshot(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -947,6 +973,7 @@ public Mono createSnapshotWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final Map metadata = null; @@ -960,7 +987,7 @@ public Mono startCopyFromURLWithRestResponseAsync DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.startCopyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -979,6 +1006,7 @@ public Mono startCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { OffsetDateTime sourceIfModifiedSince = null; if (sourceModifiedAccessConditions != null) { @@ -1020,7 +1048,7 @@ public Mono startCopyFromURLWithRestResponseAsync DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.startCopyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1033,6 +1061,7 @@ public Mono startCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final Map metadata = null; @@ -1047,7 +1076,7 @@ public Mono copyFromURLWithRestResponseAsync(String co DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.copyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1066,6 +1095,7 @@ public Mono copyFromURLWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { final String xMsRequiresSync = "true"; OffsetDateTime sourceIfModifiedSince = null; @@ -1108,7 +1138,7 @@ public Mono copyFromURLWithRestResponseAsync(String co DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1121,13 +1151,14 @@ public Mono copyFromURLWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String leaseId = null; - return service.abortCopyFromURL(containerName, blob, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); } /** @@ -1143,6 +1174,7 @@ public Mono abortCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; @@ -1150,7 +1182,7 @@ public Mono abortCopyFromURLWithRestResponseAsync if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.abortCopyFromURL(containerName, blob, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); } /** @@ -1163,12 +1195,13 @@ public Mono abortCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "tier"; final String leaseId = null; - return service.setTier(containerName, blob, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId, context); + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -1184,13 +1217,14 @@ public Mono setTierWithRestResponseAsync(String containerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "tier"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.setTier(containerName, blob, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId, context); + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -1202,9 +1236,10 @@ public Mono setTierWithRestResponseAsync(String containerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccountInfoWithRestResponseAsync(String containerName, String blob, Context context) { final String restype = "account"; final String comp = "properties"; - return service.getAccountInfo(containerName, blob, this.client.url(), this.client.version(), restype, comp, context); + return service.getAccountInfo(containerName, blob, this.client.getUrl(), this.client.getVersion(), restype, comp, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 2c4645d2bd4bc..390c2436de9a3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -4,19 +4,21 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobHTTPHeaders; @@ -33,12 +35,11 @@ import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageErrorException; import io.netty.buffer.ByteBuf; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -61,38 +62,38 @@ public final class BlockBlobsImpl { * @param client the instance of the service client containing this operation class. */ public BlockBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(BlockBlobsService.class, client); + this.service = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for BlockBlobs to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageBlockBlobs + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs BlockBlob") + @ServiceInterface(name = "AzureBlobStorageBlockBlobs") private interface BlockBlobsService { - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono stageBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono stageBlockFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); @@ -109,6 +110,7 @@ private interface BlockBlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -128,7 +130,7 @@ public Mono uploadWithRestResponseAsync(String contain String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.upload(containerName, blob, this.client.url(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -151,6 +153,7 @@ public Mono uploadWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "BlockBlob"; String blobContentType = null; @@ -200,7 +203,7 @@ public Mono uploadWithRestResponseAsync(String contain String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.upload(containerName, blob, this.client.url(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -215,6 +218,7 @@ public Mono uploadWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, Context context) { final Integer timeout = null; final String encryptionKey = null; @@ -224,7 +228,7 @@ public Mono stageBlockWithRestResponseAsync(String final String comp = "block"; final String leaseId = null; String transactionalContentMD5Converted = null; - return service.stageBlock(containerName, blob, this.client.url(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -246,6 +250,7 @@ public Mono stageBlockWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "block"; String leaseId = null; @@ -253,7 +258,7 @@ public Mono stageBlockWithRestResponseAsync(String leaseId = leaseAccessConditions.leaseId(); } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - return service.stageBlock(containerName, blob, this.client.url(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -268,6 +273,7 @@ public Mono stageBlockWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, Context context) { final String sourceRange = null; final Integer timeout = null; @@ -282,7 +288,7 @@ public Mono stageBlockFromURLWithRestRespon String sourceContentMD5Converted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.stageBlockFromURL(containerName, blob, this.client.url(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -306,6 +312,7 @@ public Mono stageBlockFromURLWithRestRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, String sourceRange, byte[] sourceContentMD5, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "block"; String leaseId = null; @@ -331,7 +338,7 @@ public Mono stageBlockFromURLWithRestRespon String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURL(containerName, blob, this.client.url(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -344,6 +351,7 @@ public Mono stageBlockFromURLWithRestRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Context context) { final Integer timeout = null; final Map metadata = null; @@ -363,7 +371,7 @@ public Mono commitBlockListWithRestResponseAs String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.commitBlockList(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -385,6 +393,7 @@ public Mono commitBlockListWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "blocklist"; String blobCacheControl = null; @@ -434,7 +443,7 @@ public Mono commitBlockListWithRestResponseAs String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.commitBlockList(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -447,6 +456,7 @@ public Mono commitBlockListWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, Context context) { final String snapshot = null; final String versionId = null; @@ -454,7 +464,7 @@ public Mono getBlockListWithRestResponseAsync(St final String requestId = null; final String comp = "blocklist"; final String leaseId = null; - return service.getBlockList(containerName, blob, this.client.url(), snapshot, versionId, listType, timeout, this.client.version(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, versionId, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -472,12 +482,13 @@ public Mono getBlockListWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, String versionId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "blocklist"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getBlockList(containerName, blob, this.client.url(), snapshot, versionId, listType, timeout, this.client.version(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, versionId, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 780b3a356a619..598e19f68192a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -4,21 +4,23 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.DELETE; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.CollectionFormat; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.Delete; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.util.Context; import com.azure.storage.blob.models.ContainersAcquireLeaseResponse; @@ -41,11 +43,10 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.SignedIdentifier; import com.azure.storage.blob.models.StorageErrorException; -import reactor.core.publisher.Mono; - import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -68,83 +69,83 @@ public final class ContainersImpl { * @param client the instance of the service client containing this operation class. */ public ContainersImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(ContainersService.class, client); + this.service = RestProxy.create(ContainersService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for Containers to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageContainers + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs Containers") + @ServiceInterface(name = "AzureBlobStorageContainers") private interface ContainersService { - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @DELETE("{containerName}") + @Delete("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifierWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono acquireLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono releaseLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono renewLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono breakLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono changeLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listBlobFlatSegment(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listBlobHierarchySegment(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@PathParam("containerName") String containerName, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -158,13 +159,14 @@ private interface ContainersService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Map metadata = null; final PublicAccessType access = null; final String requestId = null; final String restype = "container"; - return service.create(containerName, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype, context); + return service.create(containerName, this.client.getUrl(), timeout, metadata, access, this.client.getVersion(), requestId, restype, context); } /** @@ -179,9 +181,10 @@ public Mono createWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, Integer timeout, Map metadata, PublicAccessType access, String requestId, Context context) { final String restype = "container"; - return service.create(containerName, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype, context); + return service.create(containerName, this.client.getUrl(), timeout, metadata, access, this.client.getVersion(), requestId, restype, context); } /** @@ -192,12 +195,13 @@ public Mono createWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "container"; final String leaseId = null; - return service.getProperties(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); } /** @@ -211,13 +215,14 @@ public Mono getPropertiesWithRestResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String restype = "container"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getProperties(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); } /** @@ -228,6 +233,7 @@ public Mono getPropertiesWithRestResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; @@ -235,7 +241,7 @@ public Mono deleteWithRestResponseAsync(String contain final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -250,6 +256,7 @@ public Mono deleteWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; String leaseId = null; @@ -266,7 +273,7 @@ public Mono deleteWithRestResponseAsync(String contain } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -277,6 +284,7 @@ public Mono deleteWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Map metadata = null; @@ -285,7 +293,7 @@ public Mono setMetadataWithRestResponseAsync(Stri final String comp = "metadata"; final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; - return service.setMetadata(containerName, this.client.url(), timeout, metadata, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); } /** @@ -301,6 +309,7 @@ public Mono setMetadataWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, Integer timeout, Map metadata, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; final String comp = "metadata"; @@ -313,7 +322,7 @@ public Mono setMetadataWithRestResponseAsync(Stri ifModifiedSince = modifiedAccessConditions.ifModifiedSince(); } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadata(containerName, this.client.url(), timeout, metadata, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); } /** @@ -324,13 +333,14 @@ public Mono setMetadataWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "container"; final String comp = "acl"; final String leaseId = null; - return service.getAccessPolicy(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); } /** @@ -344,6 +354,7 @@ public Mono getAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String restype = "container"; final String comp = "acl"; @@ -351,7 +362,7 @@ public Mono getAccessPolicyWithRestResponseAs if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getAccessPolicy(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); } /** @@ -362,6 +373,7 @@ public Mono getAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final PublicAccessType access = null; @@ -369,10 +381,10 @@ public Mono setAccessPolicyWithRestResponseAs final String restype = "container"; final String comp = "acl"; final String leaseId = null; - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(null); + SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(null); DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setAccessPolicy(containerName, this.client.url(), containerAclConverted, timeout, access, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -389,6 +401,7 @@ public Mono setAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithRestResponseAsync(String containerName, List containerAcl, Integer timeout, PublicAccessType access, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; final String comp = "acl"; @@ -404,10 +417,10 @@ public Mono setAccessPolicyWithRestResponseAs if (modifiedAccessConditions != null) { ifUnmodifiedSince = modifiedAccessConditions.ifUnmodifiedSince(); } - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); + SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(containerAcl); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setAccessPolicy(containerName, this.client.url(), containerAclConverted, timeout, access, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -418,6 +431,7 @@ public Mono setAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Integer duration = null; @@ -428,7 +442,7 @@ public Mono