From 593ebf2d056dd6096dd2a56307a8711a581c1c93 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 18 Jul 2019 18:27:15 -0700 Subject: [PATCH] Update Storage to azure-core preview 3 --- storage/client/blob/pom.xml | 4 +- .../blob/implementation/AppendBlobsImpl.java | 40 +-- .../AzureBlobStorageBuilder.java | 2 + .../implementation/AzureBlobStorageImpl.java | 19 +- .../blob/implementation/BlobsImpl.java | 105 +++++--- .../blob/implementation/BlockBlobsImpl.java | 55 ++-- .../blob/implementation/ContainersImpl.java | 85 ++++--- .../blob/implementation/PageBlobsImpl.java | 75 +++--- .../blob/implementation/ServicesImpl.java | 51 ++-- .../SignedIdentifiersWrapper.java | 2 +- .../storage/blob/models/AccessPolicy.java | 2 + .../AppendBlobAppendBlockFromUrlHeaders.java | 2 + .../models/AppendBlobAppendBlockHeaders.java | 2 + .../blob/models/AppendBlobCreateHeaders.java | 2 + .../AppendPositionAccessConditions.java | 2 + .../models/BlobAbortCopyFromURLHeaders.java | 2 + .../blob/models/BlobAcquireLeaseHeaders.java | 2 + .../blob/models/BlobBreakLeaseHeaders.java | 2 + .../blob/models/BlobChangeLeaseHeaders.java | 2 + .../blob/models/BlobCopyFromURLHeaders.java | 2 + .../models/BlobCreateSnapshotHeaders.java | 2 + .../blob/models/BlobDeleteHeaders.java | 2 + .../blob/models/BlobDownloadHeaders.java | 4 +- .../blob/models/BlobFlatListSegment.java | 2 + .../models/BlobGetAccountInfoHeaders.java | 2 + .../blob/models/BlobGetPropertiesHeaders.java | 4 +- .../storage/blob/models/BlobHTTPHeaders.java | 2 + .../blob/models/BlobHierarchyListSegment.java | 4 +- .../storage/blob/models/BlobMetadata.java | 2 + .../azure/storage/blob/models/BlobPrefix.java | 2 + .../storage/blob/models/BlobProperties.java | 2 + .../blob/models/BlobReleaseLeaseHeaders.java | 2 + .../blob/models/BlobRenewLeaseHeaders.java | 2 + .../models/BlobSetHTTPHeadersHeaders.java | 2 + .../blob/models/BlobSetMetadataHeaders.java | 2 + .../blob/models/BlobSetTierHeaders.java | 2 + .../models/BlobStartCopyFromURLHeaders.java | 2 + .../blob/models/BlobUndeleteHeaders.java | 2 + .../com/azure/storage/blob/models/Block.java | 2 + .../BlockBlobCommitBlockListHeaders.java | 2 + .../models/BlockBlobGetBlockListHeaders.java | 2 + .../BlockBlobStageBlockFromURLHeaders.java | 2 + .../models/BlockBlobStageBlockHeaders.java | 2 + .../blob/models/BlockBlobUploadHeaders.java | 2 + .../azure/storage/blob/models/BlockList.java | 2 + .../storage/blob/models/BlockLookupList.java | 2 + .../azure/storage/blob/models/ClearRange.java | 2 + .../models/ContainerAcquireLeaseHeaders.java | 2 + .../models/ContainerBreakLeaseHeaders.java | 2 + .../models/ContainerChangeLeaseHeaders.java | 2 + .../blob/models/ContainerCreateHeaders.java | 2 + .../blob/models/ContainerDeleteHeaders.java | 2 + .../ContainerGetAccessPolicyHeaders.java | 2 + .../ContainerGetAccountInfoHeaders.java | 2 + .../models/ContainerGetPropertiesHeaders.java | 4 +- .../storage/blob/models/ContainerItem.java | 2 + .../ContainerListBlobFlatSegmentHeaders.java | 2 + ...tainerListBlobHierarchySegmentHeaders.java | 2 + .../blob/models/ContainerProperties.java | 2 + .../models/ContainerReleaseLeaseHeaders.java | 2 + .../models/ContainerRenewLeaseHeaders.java | 2 + .../ContainerSetAccessPolicyHeaders.java | 2 + .../models/ContainerSetMetadataHeaders.java | 2 + .../azure/storage/blob/models/CorsRule.java | 2 + .../storage/blob/models/GeoReplication.java | 2 + .../azure/storage/blob/models/KeyInfo.java | 2 + .../blob/models/LeaseAccessConditions.java | 2 + .../models/ListBlobsFlatSegmentResponse.java | 2 + .../ListBlobsHierarchySegmentResponse.java | 2 + .../models/ListContainersSegmentResponse.java | 2 + .../azure/storage/blob/models/Logging.java | 2 + .../azure/storage/blob/models/Metrics.java | 2 + .../blob/models/ModifiedAccessConditions.java | 2 + .../models/PageBlobClearPagesHeaders.java | 2 + .../PageBlobCopyIncrementalHeaders.java | 2 + .../blob/models/PageBlobCreateHeaders.java | 2 + .../PageBlobGetPageRangesDiffHeaders.java | 2 + .../models/PageBlobGetPageRangesHeaders.java | 2 + .../blob/models/PageBlobResizeHeaders.java | 2 + .../PageBlobUpdateSequenceNumberHeaders.java | 2 + .../PageBlobUploadPagesFromURLHeaders.java | 2 + .../models/PageBlobUploadPagesHeaders.java | 2 + .../azure/storage/blob/models/PageList.java | 2 + .../azure/storage/blob/models/PageRange.java | 2 + .../storage/blob/models/RetentionPolicy.java | 2 + .../SequenceNumberAccessConditions.java | 2 + .../models/ServiceGetAccountInfoHeaders.java | 2 + .../models/ServiceGetPropertiesHeaders.java | 2 + .../models/ServiceGetStatisticsHeaders.java | 2 + .../ServiceGetUserDelegationKeyHeaders.java | 2 + .../ServiceListContainersSegmentHeaders.java | 2 + .../models/ServiceSetPropertiesHeaders.java | 2 + .../storage/blob/models/SignedIdentifier.java | 2 + .../SourceModifiedAccessConditions.java | 2 + .../storage/blob/models/StaticWebsite.java | 2 + .../storage/blob/models/StorageError.java | 2 + .../blob/models/StorageServiceProperties.java | 2 + .../blob/models/StorageServiceStats.java | 2 + .../blob/models/UserDelegationKey.java | 2 + .../storage/blob/models/package-info.java | 2 +- .../AzureFileStorageBuilder.java | 4 +- .../implementation/AzureFileStorageImpl.java | 19 +- .../file/implementation/DirectorysImpl.java | 57 +++-- .../file/implementation/FilesImpl.java | 81 +++--- .../file/implementation/ServicesImpl.java | 41 +-- .../file/implementation/SharesImpl.java | 79 +++--- .../storage/file/models/AccessPolicy.java | 2 + .../azure/storage/file/models/CorsRule.java | 2 + .../models/DeleteSnapshotsOptionType.java | 7 +- .../file/models/DirectoryCreateHeaders.java | 2 + .../file/models/DirectoryDeleteHeaders.java | 2 + .../DirectoryForceCloseHandlesHeaders.java | 2 + .../models/DirectoryGetPropertiesHeaders.java | 4 +- .../storage/file/models/DirectoryItem.java | 2 + ...ListFilesAndDirectoriesSegmentHeaders.java | 2 + .../models/DirectoryListHandlesHeaders.java | 2 + .../models/DirectorySetMetadataHeaders.java | 2 + .../file/models/FileAbortCopyHeaders.java | 2 + .../file/models/FileCreateHeaders.java | 2 + .../file/models/FileDeleteHeaders.java | 2 + .../file/models/FileDownloadHeaders.java | 14 +- .../models/FileForceCloseHandlesHeaders.java | 2 + .../file/models/FileGetPropertiesHeaders.java | 10 +- .../file/models/FileGetRangeListHeaders.java | 2 + .../storage/file/models/FileHTTPHeaders.java | 8 +- .../azure/storage/file/models/FileItem.java | 2 + .../file/models/FileListHandlesHeaders.java | 2 + .../storage/file/models/FileProperty.java | 2 + .../models/FileSetHTTPHeadersHeaders.java | 2 + .../file/models/FileSetMetadataHeaders.java | 2 + .../file/models/FileStartCopyHeaders.java | 2 + .../file/models/FileUploadRangeHeaders.java | 8 +- .../FilesAndDirectoriesListSegment.java | 2 + .../azure/storage/file/models/HandleItem.java | 2 + ...istFilesAndDirectoriesSegmentResponse.java | 2 + .../file/models/ListHandlesResponse.java | 2 + .../file/models/ListSharesResponse.java | 2 + .../azure/storage/file/models/Metrics.java | 2 + .../com/azure/storage/file/models/Range.java | 2 + .../storage/file/models/RetentionPolicy.java | 2 + .../models/ServiceGetPropertiesHeaders.java | 2 + .../ServiceListSharesSegmentHeaders.java | 2 + .../models/ServiceSetPropertiesHeaders.java | 2 + .../file/models/ShareCreateHeaders.java | 2 + .../models/ShareCreateSnapshotHeaders.java | 2 + .../file/models/ShareDeleteHeaders.java | 2 + .../models/ShareGetAccessPolicyHeaders.java | 2 + .../models/ShareGetPropertiesHeaders.java | 10 +- .../models/ShareGetStatisticsHeaders.java | 2 + .../azure/storage/file/models/ShareItem.java | 2 + .../storage/file/models/ShareProperties.java | 8 +- .../models/ShareSetAccessPolicyHeaders.java | 2 + .../file/models/ShareSetMetadataHeaders.java | 2 + .../file/models/ShareSetQuotaHeaders.java | 2 + .../azure/storage/file/models/ShareStats.java | 2 + .../storage/file/models/SignedIdentifier.java | 2 + .../storage/file/models/StorageError.java | 2 + .../file/models/StorageServiceProperties.java | 2 + .../AzureQueueStorageBuilder.java | 4 +- .../implementation/AzureQueueStorageImpl.java | 19 +- .../queue/implementation/MessageIdsImpl.java | 34 +-- .../queue/implementation/MessagesImpl.java | 44 ++-- .../queue/implementation/QueuesImpl.java | 55 ++-- .../queue/implementation/ServicesImpl.java | 45 ++-- .../storage/queue/models/AccessPolicy.java | 2 + .../azure/storage/queue/models/CorsRule.java | 2 + .../storage/queue/models/DequeuedMessage.java | 235 ++++++++++++++++++ .../storage/queue/models/EnqueuedMessage.java | 2 + .../storage/queue/models/GeoReplication.java | 2 + .../models/ListQueuesSegmentResponse.java | 2 + .../azure/storage/queue/models/Logging.java | 2 + .../queue/models/MessageIdDeleteHeaders.java | 2 + .../queue/models/MessageIdUpdateHeaders.java | 2 + .../queue/models/MessagesClearHeaders.java | 2 + .../queue/models/MessagesDequeueHeaders.java | 2 + .../queue/models/MessagesDequeueResponse.java | 6 +- .../queue/models/MessagesEnqueueHeaders.java | 2 + .../queue/models/MessagesPeekHeaders.java | 2 + .../azure/storage/queue/models/Metrics.java | 2 + .../queue/models/PeekedMessageItem.java | 2 + .../queue/models/QueueCreateHeaders.java | 2 + .../queue/models/QueueDeleteHeaders.java | 2 + .../models/QueueGetAccessPolicyHeaders.java | 2 + .../models/QueueGetPropertiesHeaders.java | 4 +- .../azure/storage/queue/models/QueueItem.java | 2 + .../storage/queue/models/QueueMessage.java | 2 + .../models/QueueSetAccessPolicyHeaders.java | 2 + .../queue/models/QueueSetMetadataHeaders.java | 2 + .../storage/queue/models/RetentionPolicy.java | 2 + .../models/ServiceGetPropertiesHeaders.java | 2 + .../models/ServiceGetStatisticsHeaders.java | 2 + .../ServiceListQueuesSegmentHeaders.java | 2 + .../models/ServiceSetPropertiesHeaders.java | 2 + .../queue/models/SignedIdentifier.java | 2 + .../storage/queue/models/StorageError.java | 2 + .../models/StorageServiceProperties.java | 2 + .../queue/models/StorageServiceStats.java | 2 + 197 files changed, 1202 insertions(+), 368 deletions(-) create mode 100644 storage/client/queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java 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/implementation/AppendBlobsImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index a6f486ff075f7..2763bb76a36d3 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,7 +58,7 @@ 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.httpPipeline()); this.client = client; } @@ -65,20 +67,20 @@ public AppendBlobsImpl(AzureBlobStorageImpl client) { * the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs AppendBlob") + @ServiceInterface(name = "AppendBlobs") 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}") - @ExpectedResponses({201}) + @Put("{containerName}/{blob}") + @ExpectedResponses({201, 304}) @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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; 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..5a9ae355966ed 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. 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..dd6f2da500b20 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. */ @@ -62,6 +61,20 @@ AzureBlobStorageImpl version(String 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 httpPipeline() { + return this.httpPipeline; + } + /** * The ServicesImpl object to access its operations. */ @@ -159,7 +172,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..71311863df22e 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,7 +73,7 @@ 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.httpPipeline()); this.client = client; } @@ -80,89 +82,89 @@ public BlobsImpl(AzureBlobStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs") + @ServiceInterface(name = "Blobs") private interface BlobsService { - @GET("{containerName}/{blob}") - @ExpectedResponses({200, 206}) + @Get("{containerName}/{blob}") + @ExpectedResponses({200, 206, 304}) @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}") - @ExpectedResponses({200}) + @Head("{containerName}/{blob}") + @ExpectedResponses({200, 304}) @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; @@ -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) { @@ -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; @@ -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) { @@ -311,7 +317,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin } /** - * 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; @@ -334,7 +341,7 @@ public Mono deleteWithRestResponseAsync(String containerNam } /** - * 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) { @@ -384,6 +392,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 undeleteWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; @@ -402,6 +411,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 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); @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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"; @@ -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; @@ -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"; @@ -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; @@ -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"; @@ -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; @@ -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"; @@ -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; @@ -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"; @@ -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; @@ -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; @@ -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; @@ -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) { @@ -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; @@ -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; @@ -1121,6 +1151,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 abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Context context) { final Integer timeout = null; final String requestId = null; @@ -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"; @@ -1163,6 +1195,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 setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Context context) { final Integer timeout = null; final String requestId = null; @@ -1184,6 +1217,7 @@ 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; @@ -1202,6 +1236,7 @@ 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"; 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..07f3f4f15061b 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,7 +62,7 @@ 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.httpPipeline()); this.client = client; } @@ -70,29 +71,29 @@ public BlockBlobsImpl(AzureBlobStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs BlockBlob") + @ServiceInterface(name = "BlockBlobs") 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}") - @ExpectedResponses({201}) + @Put("{containerName}/{blob}") + @ExpectedResponses({201, 304}) @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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -472,6 +482,7 @@ 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; 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..6070cff261a33 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; @@ -68,7 +70,7 @@ 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.httpPipeline()); this.client = client; } @@ -77,74 +79,74 @@ public ContainersImpl(AzureBlobStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs Containers") + @ServiceInterface(name = "Containers") 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); - @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,6 +160,7 @@ 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; @@ -179,6 +182,7 @@ 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); @@ -192,6 +196,7 @@ 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; @@ -211,6 +216,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 getPropertiesWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String restype = "container"; String leaseId = null; @@ -228,6 +234,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; @@ -250,6 +257,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; @@ -277,6 +285,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; @@ -301,6 +310,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"; @@ -324,6 +334,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 getAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; @@ -344,6 +355,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"; @@ -362,6 +374,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; @@ -389,6 +402,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"; @@ -418,6 +432,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; @@ -444,6 +459,7 @@ public Mono acquireLeaseWithRestResponseAsync(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 acquireLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -470,6 +486,7 @@ public Mono acquireLeaseWithRestResponseAsync(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 releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -493,6 +510,7 @@ public Mono releaseLeaseWithRestResponseAsync(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 releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -519,6 +537,7 @@ public Mono releaseLeaseWithRestResponseAsync(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 renewLeaseWithRestResponseAsync(String containerName, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -542,6 +561,7 @@ public Mono renewLeaseWithRestResponseAsync(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 leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -567,6 +587,7 @@ public Mono renewLeaseWithRestResponseAsync(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 breakLeaseWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Integer breakPeriod = null; @@ -591,6 +612,7 @@ public Mono breakLeaseWithRestResponseAsync(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 breakLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -618,6 +640,7 @@ public Mono breakLeaseWithRestResponseAsync(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 changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -642,6 +665,7 @@ public Mono changeLeaseWithRestResponseAsync(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 changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -667,6 +691,7 @@ public Mono changeLeaseWithRestResponseAsync(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 listBlobFlatSegmentWithRestResponseAsync(String containerName, Context context) { final String prefix = null; final String marker = null; @@ -693,6 +718,7 @@ public Mono listBlobFlatSegmentWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobFlatSegmentWithRestResponseAsync(String containerName, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; @@ -709,6 +735,7 @@ public Mono listBlobFlatSegmentWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobHierarchySegmentWithRestResponseAsync(String containerName, String delimiter, Context context) { final String prefix = null; final String marker = null; @@ -736,6 +763,7 @@ public Mono listBlobHierarchySegment * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobHierarchySegmentWithRestResponseAsync(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; @@ -751,6 +779,7 @@ public Mono listBlobHierarchySegment * @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, Context context) { final String restype = "account"; final String comp = "properties"; diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index f6f6d23380cd6..2f851914b9067 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.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; @@ -37,12 +39,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 @@ -65,7 +66,7 @@ public final class PageBlobsImpl { * @param client the instance of the service client containing this operation class. */ public PageBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(PageBlobsService.class, client); + this.service = RestProxy.create(PageBlobsService.class, client.httpPipeline()); this.client = client; } @@ -74,49 +75,49 @@ public PageBlobsImpl(AzureBlobStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs PageBlobs") + @ServiceInterface(name = "PageBlobs") private interface PageBlobsService { - @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-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("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 uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @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-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @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 clearPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") - @ExpectedResponses({201}) + @Put("{containerName}/{blob}") + @ExpectedResponses({201, 304}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono uploadPagesFromURL(@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, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @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); - @GET("{containerName}/{blob}") - @ExpectedResponses({200}) + @Get("{containerName}/{blob}") + @ExpectedResponses({200, 304}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getPageRanges(@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-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); - @GET("{containerName}/{blob}") - @ExpectedResponses({200}) + @Get("{containerName}/{blob}") + @ExpectedResponses({200, 304}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getPageRangesDiff(@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("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-range") String range, @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({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono resize(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @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({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono updateSequenceNumber(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-sequence-number-action") SequenceNumberActionType sequenceNumberAction, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @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({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono copyIncremental(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-copy-source") URL copySource, @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, Context context); @@ -133,6 +134,7 @@ private interface PageBlobsService { * @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, long blobContentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -177,6 +179,7 @@ public Mono createWithRestResponseAsync(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 createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, Long blobSequenceNumber, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "PageBlob"; String blobContentType = null; @@ -240,6 +243,7 @@ public Mono createWithRestResponseAsync(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 uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final String range = null; @@ -282,6 +286,7 @@ public Mono uploadPagesWithRestResponseAsync(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 uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, Integer timeout, String range, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "update"; @@ -333,6 +338,7 @@ public Mono uploadPagesWithRestResponseAsync(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 clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final String range = null; @@ -366,6 +372,7 @@ public Mono clearPagesWithRestResponseAsync(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 clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "clear"; @@ -419,6 +426,7 @@ public Mono clearPagesWithRestResponseAsync(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 uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, Context context) { final Integer timeout = null; final String requestId = null; @@ -460,6 +468,7 @@ public Mono uploadPagesFromURLWithRestRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "update"; @@ -528,6 +537,7 @@ public Mono uploadPagesFromURLWithRestRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -559,6 +569,7 @@ public Mono getPageRangesWithRestResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "pagelist"; String leaseId = null; @@ -595,6 +606,7 @@ public Mono getPageRangesWithRestResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -628,6 +640,7 @@ public Mono getPageRangesDiffWithRestRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String prevsnapshot, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "pagelist"; String leaseId = null; @@ -665,6 +678,7 @@ public Mono getPageRangesDiffWithRestRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Context context) { final Integer timeout = null; final String requestId = null; @@ -691,6 +705,7 @@ public Mono resizeWithRestResponseAsync(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 resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String leaseId = null; @@ -728,6 +743,7 @@ public Mono resizeWithRestResponseAsync(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 updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Context context) { final Integer timeout = null; final Long blobSequenceNumber = 0L; @@ -756,6 +772,7 @@ public Mono updateSequenceNumberWithRestR * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, Long blobSequenceNumber, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String leaseId = null; @@ -793,6 +810,7 @@ public Mono updateSequenceNumberWithRestR * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final String requestId = null; @@ -817,6 +835,7 @@ public Mono copyIncrementalWithRestResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "incrementalcopy"; OffsetDateTime ifModifiedSince = null; diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index a31982006724c..1720197cee69c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.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.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.POST; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.Post; +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.util.Context; import com.azure.storage.blob.models.KeyInfo; import com.azure.storage.blob.models.ListContainersIncludeType; @@ -50,7 +52,7 @@ public final class ServicesImpl { * @param client the instance of the service client containing this operation class. */ public ServicesImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(ServicesService.class, client); + this.service = RestProxy.create(ServicesService.class, client.httpPipeline()); this.client = client; } @@ -59,34 +61,34 @@ public ServicesImpl(AzureBlobStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs Service") + @ServiceInterface(name = "Services") private interface ServicesService { - @PUT("") + @Put("") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setProperties(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") StorageServiceProperties storageServiceProperties, @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("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@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, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getStatistics(@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, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listContainersSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") ListContainersIncludeType include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); - @POST("") + @Post("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getUserDelegationKey(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") KeyInfo keyInfo, @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("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -100,6 +102,7 @@ private interface ServicesService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Context context) { final Integer timeout = null; final String requestId = null; @@ -118,6 +121,7 @@ public Mono setPropertiesWithRestResponseAsync(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 setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; @@ -131,6 +135,7 @@ public Mono setPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; @@ -148,6 +153,7 @@ public Mono getPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; @@ -161,6 +167,7 @@ public Mono getPropertiesWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; @@ -178,6 +185,7 @@ public Mono getStatisticsWithRestResponseAsync(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 getStatisticsWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "stats"; @@ -191,6 +199,7 @@ public Mono getStatisticsWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listContainersSegmentWithRestResponseAsync(Context context) { final String prefix = null; final String marker = null; @@ -215,6 +224,7 @@ public Mono listContainersSegmentWithRest * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listContainersSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, ListContainersIncludeType include, Integer timeout, String requestId, Context context) { final String comp = "list"; return service.listContainersSegment(this.client.url(), prefix, marker, maxresults, include, timeout, this.client.version(), requestId, comp, context); @@ -228,6 +238,7 @@ public Mono listContainersSegmentWithRest * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getUserDelegationKeyWithRestResponseAsync(KeyInfo keyInfo, Context context) { final Integer timeout = null; final String requestId = null; @@ -246,6 +257,7 @@ public Mono getUserDelegationKeyWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getUserDelegationKeyWithRestResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "userdelegationkey"; @@ -259,6 +271,7 @@ public Mono getUserDelegationKeyWithRestRe * @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(Context context) { final String restype = "account"; final String comp = "properties"; diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java index 41bac045975b2..f431e1fe84a19 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java @@ -16,7 +16,7 @@ */ @JacksonXmlRootElement(localName = "SignedIdentifiers") public final class SignedIdentifiersWrapper { - @JacksonXmlProperty(localName = "SignedIdentifier") + @JacksonXmlProperty(localName = "SignedIdentifiers") private final List signedIdentifiers; /** diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java index 8b33f24bf5714..04ded069ff534 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * An Access policy. */ @JacksonXmlRootElement(localName = "AccessPolicy") +@Fluent public final class AccessPolicy { /* * the date-time the policy is active diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java index 8273338cb6676..8dcea49cd76c6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for AppendBlockFromUrl operation. */ @JacksonXmlRootElement(localName = "AppendBlob-AppendBlockFromUrl-Headers") +@Fluent public final class AppendBlobAppendBlockFromUrlHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java index 8fe788378e589..a12cefa924e68 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for AppendBlock operation. */ @JacksonXmlRootElement(localName = "AppendBlob-AppendBlock-Headers") +@Fluent public final class AppendBlobAppendBlockHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java index 45fd447bde387..c2e5a3e0929ed 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "AppendBlob-Create-Headers") +@Fluent public final class AppendBlobCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java index 5894e08f86e36..e63fabf516af6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * AppendBlobs_appendBlock, AppendBlobs_appendBlockFromUrl. */ @JacksonXmlRootElement(localName = "append-position-access-conditions") +@Fluent public final class AppendPositionAccessConditions { /* * Optional conditional header. The max length in bytes permitted for the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java index e439f5b8b0892..c27f9fcac790f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AbortCopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-AbortCopyFromURL-Headers") +@Fluent public final class BlobAbortCopyFromURLHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java index 5bf6ef2560117..d4649062bc60c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AcquireLease operation. */ @JacksonXmlRootElement(localName = "Blob-AcquireLease-Headers") +@Fluent public final class BlobAcquireLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java index b136802ce69ad..504b7201befe6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for BreakLease operation. */ @JacksonXmlRootElement(localName = "Blob-BreakLease-Headers") +@Fluent public final class BlobBreakLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java index 1c3010861eaf0..67d6971d9ff32 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ChangeLease operation. */ @JacksonXmlRootElement(localName = "Blob-ChangeLease-Headers") +@Fluent public final class BlobChangeLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java index 2568e1c566bcf..140b771f8cd64 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-CopyFromURL-Headers") +@Fluent public final class BlobCopyFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java index f185a465e483e..e27c4fde4964a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CreateSnapshot operation. */ @JacksonXmlRootElement(localName = "Blob-CreateSnapshot-Headers") +@Fluent public final class BlobCreateSnapshotHeaders { /* * Uniquely identifies the snapshot and indicates the snapshot version. It diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java index 7aeac53bc5a33..95e6289c3e40b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Blob-Delete-Headers") +@Fluent public final class BlobDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index aa56c2e6683c4..4e9e2997ebab0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -16,6 +17,7 @@ * Defines headers for Download operation. */ @JacksonXmlRootElement(localName = "Blob-Download-Headers") +@Fluent public final class BlobDownloadHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java index 97f8e48a9c832..ac1f703d1cd7c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * The BlobFlatListSegment model. */ @JacksonXmlRootElement(localName = "Blobs") +@Fluent public final class BlobFlatListSegment { /* * The blobItems property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java index 81c8b54b46615..21243aaac7325 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Blob-GetAccountInfo-Headers") +@Fluent public final class BlobGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java index cb1d9e3ba1762..728ae5fd9e1e2 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -16,6 +17,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Blob-GetProperties-Headers") +@Fluent public final class BlobGetPropertiesHeaders { /* * Returns the date and time the blob was last modified. Any operation that diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java index aafbd1eb56e5e..f25f4e566e6b8 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "blob-HTTP-headers") +@Fluent public final class BlobHTTPHeaders { /* * Optional. Sets the blob's cache control. If specified, this property is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java index a70c2d2122f04..d90e89ab602f3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; import java.util.List; @@ -14,7 +14,7 @@ * The BlobHierarchyListSegment model. */ @JacksonXmlRootElement(localName = "Blobs") -@JsonDeserialize(using = CustomHierarchicalListingDeserializer.class) +@Fluent public final class BlobHierarchyListSegment { /* * The blobPrefixes property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java index 5753ff479dbfb..30eed457954bb 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -13,6 +14,7 @@ * The BlobMetadata model. */ @JacksonXmlRootElement(localName = "Metadata") +@Fluent public final class BlobMetadata { /* * Unmatched properties from the message are deserialized this collection diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java index 6507aaecfd380..55afd0bc25491 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The BlobPrefix model. */ @JacksonXmlRootElement(localName = "BlobPrefix") +@Fluent public final class BlobPrefix { /* * The name property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index a297fe40e0432..d5bad7b9996e5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Properties of a blob. */ @JacksonXmlRootElement(localName = "Properties") +@Fluent public final class BlobProperties { /* * The creationTime property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java index 661e9a24db979..f503b9ab6d309 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ReleaseLease operation. */ @JacksonXmlRootElement(localName = "Blob-ReleaseLease-Headers") +@Fluent public final class BlobReleaseLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java index 2ee66b3adb36b..863157cf8a427 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for RenewLease operation. */ @JacksonXmlRootElement(localName = "Blob-RenewLease-Headers") +@Fluent public final class BlobRenewLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java index 09111d5ae3e17..ed539d644bc1a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetHTTPHeaders operation. */ @JacksonXmlRootElement(localName = "Blob-SetHTTPHeaders-Headers") +@Fluent public final class BlobSetHTTPHeadersHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java index b831d8446cd1a..5b3898194287e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Blob-SetMetadata-Headers") +@Fluent public final class BlobSetMetadataHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java index d2dd04c235a76..372b1a09ebc00 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetTier operation. */ @JacksonXmlRootElement(localName = "Blob-SetTier-Headers") +@Fluent public final class BlobSetTierHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java index c0059d598cceb..a6b195a6e6dcc 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for StartCopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-StartCopyFromURL-Headers") +@Fluent public final class BlobStartCopyFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java index 3123885e3af1f..cd1ea6a55d13d 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Undelete operation. */ @JacksonXmlRootElement(localName = "Blob-Undelete-Headers") +@Fluent public final class BlobUndeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java index 8fbfcaa8a7abe..5cfa164c8c854 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * size. */ @JacksonXmlRootElement(localName = "Block") +@Fluent public final class Block { /* * The base64 encoded block ID. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java index a2605e19cf430..6bec949d71804 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for CommitBlockList operation. */ @JacksonXmlRootElement(localName = "BlockBlob-CommitBlockList-Headers") +@Fluent public final class BlockBlobCommitBlockListHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java index 26d77f85abadf..fa50d846ebefa 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetBlockList operation. */ @JacksonXmlRootElement(localName = "BlockBlob-GetBlockList-Headers") +@Fluent public final class BlockBlobGetBlockListHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java index 1b434c919342f..88dd3c6346edd 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for StageBlockFromURL operation. */ @JacksonXmlRootElement(localName = "BlockBlob-StageBlockFromURL-Headers") +@Fluent public final class BlockBlobStageBlockFromURLHeaders { /* * If the blob has an MD5 hash and this operation is to read the full blob, diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java index 40108ad24ec2a..56ffdfe937001 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for StageBlock operation. */ @JacksonXmlRootElement(localName = "BlockBlob-StageBlock-Headers") +@Fluent public final class BlockBlobStageBlockHeaders { /* * If the blob has an MD5 hash and this operation is to read the full blob, diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java index e5430e100e6ea..76c59b2f74d94 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Upload operation. */ @JacksonXmlRootElement(localName = "BlockBlob-Upload-Headers") +@Fluent public final class BlockBlobUploadHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java index 70a0fb8d312ef..dfa4deadeb89c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * The BlockList model. */ @JacksonXmlRootElement(localName = "BlockList") +@Fluent public final class BlockList { private static final class CommittedBlocksWrapper { @JacksonXmlProperty(localName = "Block") diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java index 9cc63338a8996..40bb5d346e004 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * The BlockLookupList model. */ @JacksonXmlRootElement(localName = "BlockList") +@Fluent public final class BlockLookupList { /* * The committed property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java index cb8d7a208ab3a..e607faf87b058 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The ClearRange model. */ @JacksonXmlRootElement(localName = "ClearRange") +@Fluent public final class ClearRange { /* * The start property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java index 0ba172f04e33a..bd6d0580bdcfb 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AcquireLease operation. */ @JacksonXmlRootElement(localName = "Container-AcquireLease-Headers") +@Fluent public final class ContainerAcquireLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java index 98a1106ccc6ef..4df2a5f3ddef2 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for BreakLease operation. */ @JacksonXmlRootElement(localName = "Container-BreakLease-Headers") +@Fluent public final class ContainerBreakLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java index 880214fc46b52..8c5371a5121f7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ChangeLease operation. */ @JacksonXmlRootElement(localName = "Container-ChangeLease-Headers") +@Fluent public final class ContainerChangeLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java index 280734c615016..9a22e560ca72c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "Container-Create-Headers") +@Fluent public final class ContainerCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java index 52f2623a635d5..64af976e03679 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Container-Delete-Headers") +@Fluent public final class ContainerDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java index 4905b3c2949fe..a1a76b2f57ba5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Container-GetAccessPolicy-Headers") +@Fluent public final class ContainerGetAccessPolicyHeaders { /* * Indicated whether data in the container may be accessed publicly and the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java index c82baa2c1a6b7..692c4a71fc522 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Container-GetAccountInfo-Headers") +@Fluent public final class ContainerGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java index b37286c1b7af3..df2d12bbcdb6e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,6 +16,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Container-GetProperties-Headers") +@Fluent public final class ContainerGetPropertiesHeaders { /* * The metadata property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java index a334568661eb1..543085f349c81 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -12,6 +13,7 @@ * An Azure Storage container. */ @JacksonXmlRootElement(localName = "Container") +@Fluent public final class ContainerItem { /* * The name property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java index 311c0c6ca66bf..ef1252a5a8d4c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListBlobFlatSegment operation. */ @JacksonXmlRootElement(localName = "Container-ListBlobFlatSegment-Headers") +@Fluent public final class ContainerListBlobFlatSegmentHeaders { /* * The media type of the body of the response. For List Blobs this is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java index 7456e14d89809..d1a671cf75501 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListBlobHierarchySegment operation. */ @JacksonXmlRootElement(localName = "Container-ListBlobHierarchySegment-Headers") +@Fluent public final class ContainerListBlobHierarchySegmentHeaders { /* * The media type of the body of the response. For List Blobs this is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java index b4844ac52dcfb..f159a57f2cd5c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Properties of a container. */ @JacksonXmlRootElement(localName = "ContainerProperties") +@Fluent public final class ContainerProperties { /* * The lastModified property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java index b437d814e16ca..7a8766ab2424b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ReleaseLease operation. */ @JacksonXmlRootElement(localName = "Container-ReleaseLease-Headers") +@Fluent public final class ContainerReleaseLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java index e9a03210ae1a3..a192e95a96c8e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for RenewLease operation. */ @JacksonXmlRootElement(localName = "Container-RenewLease-Headers") +@Fluent public final class ContainerRenewLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java index a91ceed6d34d1..763e752918002 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Container-SetAccessPolicy-Headers") +@Fluent public final class ContainerSetAccessPolicyHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java index 082886b7c0b54..e685322b83ffa 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Container-SetMetadata-Headers") +@Fluent public final class ContainerSetMetadataHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java index fa9035b072c6c..e111fbb62e308 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -15,6 +16,7 @@ * one domain (the origin domain) to call APIs in another domain. */ @JacksonXmlRootElement(localName = "CorsRule") +@Fluent public final class CorsRule { /* * The origin domains that are permitted to make a request against the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java index 90cf41b12f07f..d583130cc13a9 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Geo-Replication information for the Secondary Storage Service. */ @JacksonXmlRootElement(localName = "GeoReplication") +@Fluent public final class GeoReplication { /* * The status of the secondary location. Possible values include: 'live', diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java index d1aa23bbcef7c..6c742e4ed7860 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Key information. */ @JacksonXmlRootElement(localName = "KeyInfo") +@Fluent public final class KeyInfo { /* * The date-time the key is active in ISO 8601 UTC time diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java index eae367a636e25..9a43064e549f5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "lease-access-conditions") +@Fluent public final class LeaseAccessConditions { /* * If specified, the operation only succeeds if the resource's lease is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java index 1807bc8efe364..593688ccc3e11 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * An enumeration of blobs. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListBlobsFlatSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java index f79c285a10796..51aee28565674 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * An enumeration of blobs. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListBlobsHierarchySegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java index deafc07a94435..97f342484a8fc 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * An enumeration of containers. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListContainersSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java index e86ad32a0ae74..9aa3f4cce40b3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Azure Analytics Logging settings. */ @JacksonXmlRootElement(localName = "Logging") +@Fluent public final class Logging { /* * The version of Storage Analytics to configure. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java index c812d6a86a533..ee8ad19b28563 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * for blobs. */ @JacksonXmlRootElement(localName = "Metrics") +@Fluent public final class Metrics { /* * The version of Storage Analytics to configure. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java index 3636dfd4c290c..01e9de89ae16a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "modified-access-conditions") +@Fluent public final class ModifiedAccessConditions { /* * Specify this header value to operate only on a blob if it has been diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java index 45f30cefd53a1..543c829bf2718 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for ClearPages operation. */ @JacksonXmlRootElement(localName = "PageBlob-ClearPages-Headers") +@Fluent public final class PageBlobClearPagesHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java index 3a1ea5cd5f9d7..7e9aa95c1ff37 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CopyIncremental operation. */ @JacksonXmlRootElement(localName = "PageBlob-CopyIncremental-Headers") +@Fluent public final class PageBlobCopyIncrementalHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java index 215c6f4c934aa..6c4192fe4806d 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "PageBlob-Create-Headers") +@Fluent public final class PageBlobCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java index 5f75cf82af768..c1d14635bf44f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetPageRangesDiff operation. */ @JacksonXmlRootElement(localName = "PageBlob-GetPageRangesDiff-Headers") +@Fluent public final class PageBlobGetPageRangesDiffHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java index a9004d8dd2c91..32b37ef1452c0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetPageRanges operation. */ @JacksonXmlRootElement(localName = "PageBlob-GetPageRanges-Headers") +@Fluent public final class PageBlobGetPageRangesHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java index f9396b66835c3..e03c8720d2b67 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Resize operation. */ @JacksonXmlRootElement(localName = "PageBlob-Resize-Headers") +@Fluent public final class PageBlobResizeHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java index 317c57bb35cea..5f606b24c2622 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for UpdateSequenceNumber operation. */ @JacksonXmlRootElement(localName = "PageBlob-UpdateSequenceNumber-Headers") +@Fluent public final class PageBlobUpdateSequenceNumberHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java index ad21b582b509e..cebeb20842e37 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for UploadPagesFromURL operation. */ @JacksonXmlRootElement(localName = "PageBlob-UploadPagesFromURL-Headers") +@Fluent public final class PageBlobUploadPagesFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java index 29cf41bae0b8e..7dd8eb12ae720 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for UploadPages operation. */ @JacksonXmlRootElement(localName = "PageBlob-UploadPages-Headers") +@Fluent public final class PageBlobUploadPagesHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java index cf921ab92646b..b981bdf2f6edb 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * the list of pages. */ @JacksonXmlRootElement(localName = "PageList") +@Fluent public final class PageList { /* * The pageRange property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java index 5ce78ebfb0db8..53a76779cd4d4 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The PageRange model. */ @JacksonXmlRootElement(localName = "PageRange") +@Fluent public final class PageRange { /* * The start property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java index d6285c64af18f..7877f6dd0bd76 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * persist. */ @JacksonXmlRootElement(localName = "RetentionPolicy") +@Fluent public final class RetentionPolicy { /* * Indicates whether a retention policy is enabled for the storage service diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java index df0399ff59123..c211020aeb245 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * PageBlobs_uploadPages, PageBlobs_clearPages, PageBlobs_uploadPagesFromURL. */ @JacksonXmlRootElement(localName = "sequence-number-access-conditions") +@Fluent public final class SequenceNumberAccessConditions { /* * Specify this header value to operate only on a blob if it has a sequence diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java index b0c6820cf0848..88fa50830518e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Service-GetAccountInfo-Headers") +@Fluent public final class ServiceGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java index 3126a5153421e..3b5b06ab3259a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Service-GetProperties-Headers") +@Fluent public final class ServiceGetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java index 34fcda3653a60..55dda9cc8ddb6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetStatistics operation. */ @JacksonXmlRootElement(localName = "Service-GetStatistics-Headers") +@Fluent public final class ServiceGetStatisticsHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java index 9c685c2906102..4a74086587afa 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetUserDelegationKey operation. */ @JacksonXmlRootElement(localName = "Service-GetUserDelegationKey-Headers") +@Fluent public final class ServiceGetUserDelegationKeyHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java index d22b9f1febc4f..94908506ede78 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for ListContainersSegment operation. */ @JacksonXmlRootElement(localName = "Service-ListContainersSegment-Headers") +@Fluent public final class ServiceListContainersSegmentHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java index 065e595244fc3..df15cc7664002 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetProperties operation. */ @JacksonXmlRootElement(localName = "Service-SetProperties-Headers") +@Fluent public final class ServiceSetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java index 417f49492e51a..63e3aea5e584b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * signed identifier. */ @JacksonXmlRootElement(localName = "SignedIdentifier") +@Fluent public final class SignedIdentifier { /* * a unique id diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java index 84b179bb01812..9874a3b9557ed 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "source-modified-access-conditions") +@Fluent public final class SourceModifiedAccessConditions { /* * Specify this header value to operate only on a blob if it has been diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java index 45971febb06e2..91fffc8ba4bc8 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The properties that enable an account to host a static website. */ @JacksonXmlRootElement(localName = "StaticWebsite") +@Fluent public final class StaticWebsite { /* * Indicates whether this account is hosting a static website diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java index 55c96be21c801..2f8f01f4f6f9d 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The StorageError model. */ @JacksonXmlRootElement(localName = "StorageError") +@Fluent public final class StorageError { /* * The code property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java index 79e072ba2b059..a83c072fcce9f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * Storage Service Properties. */ @JacksonXmlRootElement(localName = "StorageServiceProperties") +@Fluent public final class StorageServiceProperties { /* * The logging property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java index 5eb67c3230645..04dd8dfc94dd6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Stats for the storage service. */ @JacksonXmlRootElement(localName = "StorageServiceStats") +@Fluent public final class StorageServiceStats { /* * The geoReplication property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java index d267df92d7c29..7598fd90340d5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * A user delegation key. */ @JacksonXmlRootElement(localName = "UserDelegationKey") +@Fluent public final class UserDelegationKey { /* * The Azure Active Directory object ID in GUID format. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java b/storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java index a078397789b87..653e8a46d1d67 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java +++ b/storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java @@ -3,6 +3,6 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureBlobStorage. + * This package contains the data models for AzureBlobStorage. */ package com.azure.storage.blob.models; diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java index 6dced97e93c08..07a401015b89c 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.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 appendBlobClientBuilder for creating a new instance of the AzureFileStorage type. + * A builder for creating a new instance of the AzureFileStorage type. */ +@ServiceClientBuilder(serviceClients = AzureFileStorageImpl.class) public final class AzureFileStorageBuilder { /* * Specifies the version of the operation to use for this request. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageImpl.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageImpl.java index ec39450873537..8524d71ef6e2f 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageImpl.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/AzureFileStorageImpl.java @@ -4,14 +4,13 @@ package com.azure.storage.file.implementation; -import com.azure.core.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; /** * Initializes a new instance of the AzureFileStorage type. */ -public final class AzureFileStorageImpl extends ServiceClient { +public final class AzureFileStorageImpl { /** * Specifies the version of the operation to use for this request. */ @@ -62,6 +61,20 @@ AzureFileStorageImpl url(String url) { 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 httpPipeline() { + return this.httpPipeline; + } + /** * The ServicesImpl object to access its operations. */ @@ -131,7 +144,7 @@ public AzureFileStorageImpl() { * @param httpPipeline The HTTP pipeline to send requests through. */ public AzureFileStorageImpl(HttpPipeline httpPipeline) { - super(httpPipeline); + this.httpPipeline = httpPipeline; this.services = new ServicesImpl(this); this.shares = new SharesImpl(this); this.directorys = new DirectorysImpl(this); diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java index 4e3f44c781ef9..a7a40bc0007e6 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/DirectorysImpl.java @@ -4,17 +4,19 @@ package com.azure.storage.file.implementation; -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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +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.util.Context; import com.azure.storage.file.models.DirectorysCreateResponse; import com.azure.storage.file.models.DirectorysDeleteResponse; @@ -24,9 +26,8 @@ import com.azure.storage.file.models.DirectorysListHandlesResponse; import com.azure.storage.file.models.DirectorysSetMetadataResponse; import com.azure.storage.file.models.StorageErrorException; -import reactor.core.publisher.Mono; - import java.util.Map; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -49,7 +50,7 @@ public final class DirectorysImpl { * @param client the instance of the service client containing this operation class. */ public DirectorysImpl(AzureFileStorageImpl client) { - this.service = RestProxy.create(DirectorysService.class, client); + this.service = RestProxy.create(DirectorysService.class, client.httpPipeline()); this.client = client; } @@ -58,39 +59,39 @@ public DirectorysImpl(AzureFileStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Files Directory") + @ServiceInterface(name = "Directorys") private interface DirectorysService { - @PUT("{shareName}/{directory}") + @Put("{shareName}/{directory}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); - @GET("{shareName}/{directory}") + @Get("{shareName}/{directory}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@HostParam("url") String url, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); - @DELETE("{shareName}/{directory}") + @Delete("{shareName}/{directory}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); - @PUT("{shareName}/{directory}") + @Put("{shareName}/{directory}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{shareName}/{directory}") + @Get("{shareName}/{directory}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listFilesAndDirectoriesSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{shareName}/{directory}") + @Get("{shareName}/{directory}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listHandles(@HostParam("url") String url, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, @QueryParam("sharesnapshot") String sharesnapshot, @HeaderParam("x-ms-recursive") Boolean recursive, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}/{directory}") + @Put("{shareName}/{directory}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono forceCloseHandles(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("marker") String marker, @QueryParam("sharesnapshot") String sharesnapshot, @HeaderParam("x-ms-handle-id") String handleId, @HeaderParam("x-ms-recursive") Boolean recursive, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); @@ -103,6 +104,7 @@ private interface DirectorysService { * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -119,6 +121,7 @@ public Mono createWithRestResponseAsync(Context contex * @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(Integer timeout, Map metadata, Context context) { final String restype = "directory"; return service.create(this.client.url(), timeout, metadata, this.client.version(), restype, context); @@ -131,6 +134,7 @@ public Mono createWithRestResponseAsync(Integer timeou * @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(Context context) { final String sharesnapshot = null; final Integer timeout = null; @@ -147,6 +151,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 getPropertiesWithRestResponseAsync(String sharesnapshot, Integer timeout, Context context) { final String restype = "directory"; return service.getProperties(this.client.url(), sharesnapshot, timeout, this.client.version(), restype, context); @@ -159,6 +164,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(Context context) { final Integer timeout = null; final String restype = "directory"; @@ -173,6 +179,7 @@ public Mono deleteWithRestResponseAsync(Context contex * @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(Integer timeout, Context context) { final String restype = "directory"; return service.delete(this.client.url(), timeout, this.client.version(), restype, context); @@ -185,6 +192,7 @@ public Mono deleteWithRestResponseAsync(Integer timeou * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -202,6 +210,7 @@ public Mono setMetadataWithRestResponseAsync(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 setMetadataWithRestResponseAsync(Integer timeout, Map metadata, Context context) { final String restype = "directory"; final String comp = "metadata"; @@ -215,6 +224,7 @@ public Mono setMetadataWithRestResponseAsync(Inte * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listFilesAndDirectoriesSegmentWithRestResponseAsync(Context context) { final String prefix = null; final String sharesnapshot = null; @@ -238,6 +248,7 @@ public Mono listFilesAndDirect * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listFilesAndDirectoriesSegmentWithRestResponseAsync(String prefix, String sharesnapshot, String marker, Integer maxresults, Integer timeout, Context context) { final String restype = "directory"; final String comp = "list"; @@ -251,6 +262,7 @@ public Mono listFilesAndDirect * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listHandlesWithRestResponseAsync(Context context) { final String marker = null; final Integer maxresults = null; @@ -273,6 +285,7 @@ public Mono listHandlesWithRestResponseAsync(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 listHandlesWithRestResponseAsync(String marker, Integer maxresults, Integer timeout, String sharesnapshot, Boolean recursive, Context context) { final String comp = "listhandles"; return service.listHandles(this.client.url(), marker, maxresults, timeout, sharesnapshot, recursive, this.client.version(), comp, context); @@ -286,6 +299,7 @@ public Mono listHandlesWithRestResponseAsync(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 forceCloseHandlesWithRestResponseAsync(String handleId, Context context) { final Integer timeout = null; final String marker = null; @@ -307,6 +321,7 @@ public Mono forceCloseHandlesWithRestRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandlesWithRestResponseAsync(String handleId, Integer timeout, String marker, String sharesnapshot, Boolean recursive, Context context) { final String comp = "forceclosehandles"; return service.forceCloseHandles(this.client.url(), timeout, marker, sharesnapshot, handleId, recursive, this.client.version(), comp, context); diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java index ee44ffe4f9830..fde67800343f7 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/FilesImpl.java @@ -4,19 +4,21 @@ package com.azure.storage.file.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.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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.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.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.file.models.FileHTTPHeaders; @@ -35,11 +37,10 @@ import com.azure.storage.file.models.FilesUploadRangeResponse; import com.azure.storage.file.models.StorageErrorException; import io.netty.buffer.ByteBuf; +import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import java.util.Map; - /** * An instance of this class provides access to all the operations defined in * Files. @@ -61,7 +62,7 @@ public final class FilesImpl { * @param client the instance of the service client containing this operation class. */ public FilesImpl(AzureFileStorageImpl client) { - this.service = RestProxy.create(FilesService.class, client); + this.service = RestProxy.create(FilesService.class, client.httpPipeline()); this.client = client; } @@ -70,63 +71,63 @@ public FilesImpl(AzureFileStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Files File") + @ServiceInterface(name = "Files") private interface FilesService { - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") long fileContentLength, @HeaderParam("x-ms-type") String fileTypeConstant, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-content-type") String fileContentType, @HeaderParam("x-ms-content-encoding") String fileContentEncoding, @HeaderParam("x-ms-content-language") String fileContentLanguage, @HeaderParam("x-ms-cache-control") String fileCacheControl, @HeaderParam("x-ms-content-md5") String fileContentMD5, @HeaderParam("x-ms-content-disposition") String fileContentDisposition, Context context); - @GET("{shareName}/{directory}/{fileName}") + @Get("{shareName}/{directory}/{fileName}") @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono download(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, Context context); - @HEAD("{shareName}/{directory}/{fileName}") + @Head("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) Mono getProperties(@HostParam("url") String url, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, Context context); - @DELETE("{shareName}/{directory}/{fileName}") + @Delete("{shareName}/{directory}/{fileName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setHTTPHeaders(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") Long fileContentLength, @QueryParam("comp") String comp, @HeaderParam("x-ms-content-type") String fileContentType, @HeaderParam("x-ms-content-encoding") String fileContentEncoding, @HeaderParam("x-ms-content-language") String fileContentLanguage, @HeaderParam("x-ms-cache-control") String fileCacheControl, @HeaderParam("x-ms-content-md5") String fileContentMD5, @HeaderParam("x-ms-content-disposition") String fileContentDisposition, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono uploadRange(@HostParam("url") String url, @BodyParam("application/octet-stream") Flux optionalbody, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-write") FileRangeWriteType fileRangeWrite, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String contentMD5, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); - @GET("{shareName}/{directory}/{fileName}") + @Get("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getRangeList(@HostParam("url") String url, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-range") String range, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono startCopy(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-copy-source") String copySource, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono abortCopy(@HostParam("url") String url, @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); - @GET("{shareName}/{directory}/{fileName}") + @Get("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listHandles(@HostParam("url") String url, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, @QueryParam("sharesnapshot") String sharesnapshot, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}/{directory}/{fileName}") + @Put("{shareName}/{directory}/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono forceCloseHandles(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @QueryParam("marker") String marker, @QueryParam("sharesnapshot") String sharesnapshot, @HeaderParam("x-ms-handle-id") String handleId, @HeaderParam("x-ms-version") String version, @QueryParam("comp") String comp, Context context); @@ -140,6 +141,7 @@ private interface FilesService { * @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(long fileContentLength, Context context) { final Integer timeout = null; final String fileTypeConstant = "file"; @@ -164,6 +166,7 @@ public Mono createWithRestResponseAsync(long fileContentLen * @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(long fileContentLength, Integer timeout, Map metadata, FileHTTPHeaders fileHTTPHeaders, Context context) { final String fileTypeConstant = "file"; String fileContentType = null; @@ -201,6 +204,7 @@ public Mono createWithRestResponseAsync(long fileContentLen * @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(Context context) { final Integer timeout = null; final String range = null; @@ -218,6 +222,7 @@ public Mono downloadWithRestResponseAsync(Context context * @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(Integer timeout, String range, Boolean rangeGetContentMD5, Context context) { return service.download(this.client.url(), timeout, this.client.version(), range, rangeGetContentMD5, context); } @@ -229,6 +234,7 @@ public Mono downloadWithRestResponseAsync(Integer timeout * @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(Context context) { final String sharesnapshot = null; final Integer timeout = null; @@ -244,6 +250,7 @@ public Mono getPropertiesWithRestResponseAsync(Conte * @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 sharesnapshot, Integer timeout, Context context) { return service.getProperties(this.client.url(), sharesnapshot, timeout, this.client.version(), context); } @@ -255,6 +262,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(Context context) { final Integer timeout = null; return service.delete(this.client.url(), timeout, this.client.version(), context); @@ -268,6 +276,7 @@ public Mono deleteWithRestResponseAsync(Context context) { * @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(Integer timeout, Context context) { return service.delete(this.client.url(), timeout, this.client.version(), context); } @@ -279,6 +288,7 @@ public Mono deleteWithRestResponseAsync(Integer timeout, 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 setHTTPHeadersWithRestResponseAsync(Context context) { final Integer timeout = null; final Long fileContentLength = null; @@ -302,6 +312,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Con * @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(Integer timeout, Long fileContentLength, FileHTTPHeaders fileHTTPHeaders, Context context) { final String comp = "properties"; String fileContentType = null; @@ -339,6 +350,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Int * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -355,6 +367,7 @@ public Mono setMetadataWithRestResponseAsync(Context c * @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(Integer timeout, Map metadata, Context context) { final String comp = "metadata"; return service.setMetadata(this.client.url(), timeout, metadata, this.client.version(), comp, context); @@ -370,6 +383,7 @@ public Mono setMetadataWithRestResponseAsync(Integer t * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadRangeWithRestResponseAsync(String range, FileRangeWriteType fileRangeWrite, long contentLength, Context context) { final Flux optionalbody = null; final Integer timeout = null; @@ -391,6 +405,7 @@ public Mono uploadRangeWithRestResponseAsync(String ra * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadRangeWithRestResponseAsync(String range, FileRangeWriteType fileRangeWrite, long contentLength, Flux optionalbody, Integer timeout, byte[] contentMD5, Context context) { final String comp = "range"; String contentMD5Converted = Base64Util.encodeToString(contentMD5); @@ -404,6 +419,7 @@ public Mono uploadRangeWithRestResponseAsync(String ra * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRangeListWithRestResponseAsync(Context context) { final String sharesnapshot = null; final Integer timeout = null; @@ -422,6 +438,7 @@ public Mono getRangeListWithRestResponseAsync(Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRangeListWithRestResponseAsync(String sharesnapshot, Integer timeout, String range, Context context) { final String comp = "rangelist"; return service.getRangeList(this.client.url(), sharesnapshot, timeout, this.client.version(), range, comp, context); @@ -435,6 +452,7 @@ public Mono getRangeListWithRestResponseAsync(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 startCopyWithRestResponseAsync(String copySource, Context context) { final Integer timeout = null; final Map metadata = null; @@ -451,6 +469,7 @@ public Mono startCopyWithRestResponseAsync(String copySo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyWithRestResponseAsync(String copySource, Integer timeout, Map metadata, Context context) { return service.startCopy(this.client.url(), timeout, this.client.version(), metadata, copySource, context); } @@ -463,6 +482,7 @@ public Mono startCopyWithRestResponseAsync(String copySo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyWithRestResponseAsync(String copyId, Context context) { final Integer timeout = null; final String copyActionAbortConstant = "abort"; @@ -479,6 +499,7 @@ public Mono abortCopyWithRestResponseAsync(String copyId * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyWithRestResponseAsync(String copyId, Integer timeout, Context context) { final String copyActionAbortConstant = "abort"; final String comp = "copy"; @@ -492,6 +513,7 @@ public Mono abortCopyWithRestResponseAsync(String copyId * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listHandlesWithRestResponseAsync(Context context) { final String marker = null; final Integer maxresults = null; @@ -512,6 +534,7 @@ public Mono listHandlesWithRestResponseAsync(Context c * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listHandlesWithRestResponseAsync(String marker, Integer maxresults, Integer timeout, String sharesnapshot, Context context) { final String comp = "listhandles"; return service.listHandles(this.client.url(), marker, maxresults, timeout, sharesnapshot, this.client.version(), comp, context); @@ -525,6 +548,7 @@ public Mono listHandlesWithRestResponseAsync(String ma * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandlesWithRestResponseAsync(String handleId, Context context) { final Integer timeout = null; final String marker = null; @@ -544,6 +568,7 @@ public Mono forceCloseHandlesWithRestResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandlesWithRestResponseAsync(String handleId, Integer timeout, String marker, String sharesnapshot, Context context) { final String comp = "forceclosehandles"; return service.forceCloseHandles(this.client.url(), timeout, marker, sharesnapshot, handleId, this.client.version(), comp, context); diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java index 5fcf68a794327..993bbad2b93b4 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/ServicesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.file.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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.CollectionFormat; 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.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.file.models.ListSharesIncludeType; @@ -24,9 +26,8 @@ import com.azure.storage.file.models.ServicesSetPropertiesResponse; import com.azure.storage.file.models.StorageErrorException; import com.azure.storage.file.models.StorageServiceProperties; -import reactor.core.publisher.Mono; - import java.util.List; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -49,7 +50,7 @@ public final class ServicesImpl { * @param client the instance of the service client containing this operation class. */ public ServicesImpl(AzureFileStorageImpl client) { - this.service = RestProxy.create(ServicesService.class, client); + this.service = RestProxy.create(ServicesService.class, client.httpPipeline()); this.client = client; } @@ -58,19 +59,19 @@ public ServicesImpl(AzureFileStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Files Service") + @ServiceInterface(name = "Services") private interface ServicesService { - @PUT("") + @Put("") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setProperties(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") StorageServiceProperties storageServiceProperties, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listSharesSegment(@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, @QueryParam("comp") String comp, Context context); @@ -84,6 +85,7 @@ private interface ServicesService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Context context) { final Integer timeout = null; final String restype = "service"; @@ -100,6 +102,7 @@ public Mono setPropertiesWithRestResponseAsync(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 setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Integer timeout, Context context) { final String restype = "service"; final String comp = "properties"; @@ -113,6 +116,7 @@ public Mono setPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Context context) { final Integer timeout = null; final String restype = "service"; @@ -128,6 +132,7 @@ public Mono getPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Integer timeout, Context context) { final String restype = "service"; final String comp = "properties"; @@ -141,6 +146,7 @@ public Mono getPropertiesWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listSharesSegmentWithRestResponseAsync(Context context) { final String prefix = null; final String marker = null; @@ -163,6 +169,7 @@ public Mono listSharesSegmentWithRestResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listSharesSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, List include, Integer timeout, Context context) { final String comp = "list"; String includeConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); diff --git a/storage/client/file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java b/storage/client/file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java index bdc5fbadff999..83466fe45e31e 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/implementation/SharesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.file.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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.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.util.Context; import com.azure.storage.file.models.DeleteSnapshotsOptionType; import com.azure.storage.file.models.SharesCreateResponse; @@ -29,10 +31,9 @@ import com.azure.storage.file.models.SharesSetQuotaResponse; import com.azure.storage.file.models.SignedIdentifier; import com.azure.storage.file.models.StorageErrorException; -import reactor.core.publisher.Mono; - 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 @@ -55,7 +56,7 @@ public final class SharesImpl { * @param client the instance of the service client containing this operation class. */ public SharesImpl(AzureFileStorageImpl client) { - this.service = RestProxy.create(SharesService.class, client); + this.service = RestProxy.create(SharesService.class, client.httpPipeline()); this.client = client; } @@ -64,49 +65,49 @@ public SharesImpl(AzureFileStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Files Shares") + @ServiceInterface(name = "Shares") private interface SharesService { - @PUT("{shareName}") + @Put("{shareName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono create(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-share-quota") Integer quota, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); + Mono create(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-share-quota") Long quota, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); - @GET("{shareName}") + @Get("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@HostParam("url") String url, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, Context context); - @DELETE("{shareName}") + @Delete("{shareName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@HostParam("url") String url, @QueryParam("sharesnapshot") String sharesnapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @QueryParam("restype") String restype, Context context); - @PUT("{shareName}") + @Put("{shareName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono createSnapshot(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}") + @Put("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono setQuota(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-share-quota") Integer quota, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); + Mono setQuota(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-share-quota") Long quota, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}") + @Put("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{shareName}") + @Get("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccessPolicy(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @PUT("{shareName}") + @Put("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setAccessPolicy(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper shareAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{shareName}") + @Get("{shareName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getStatistics(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -119,10 +120,11 @@ private interface SharesService { * @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(Context context) { final Integer timeout = null; final Map metadata = null; - final Integer quota = null; + final Long quota = null; final String restype = "share"; return service.create(this.client.url(), timeout, metadata, quota, this.client.version(), restype, context); } @@ -137,7 +139,8 @@ public Mono createWithRestResponseAsync(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ - public Mono createWithRestResponseAsync(Integer timeout, Map metadata, Integer quota, Context context) { + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithRestResponseAsync(Integer timeout, Map metadata, Long quota, Context context) { final String restype = "share"; return service.create(this.client.url(), timeout, metadata, quota, this.client.version(), restype, context); } @@ -149,6 +152,7 @@ public Mono createWithRestResponseAsync(Integer timeout, M * @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(Context context) { final String sharesnapshot = null; final Integer timeout = null; @@ -165,6 +169,7 @@ public Mono getPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(String sharesnapshot, Integer timeout, Context context) { final String restype = "share"; return service.getProperties(this.client.url(), sharesnapshot, timeout, this.client.version(), restype, context); @@ -177,6 +182,7 @@ public Mono getPropertiesWithRestResponseAsync(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 deleteWithRestResponseAsync(Context context) { final String sharesnapshot = null; final Integer timeout = null; @@ -195,6 +201,7 @@ public Mono deleteWithRestResponseAsync(Context context) { * @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 sharesnapshot, Integer timeout, DeleteSnapshotsOptionType deleteSnapshots, Context context) { final String restype = "share"; return service.delete(this.client.url(), sharesnapshot, timeout, this.client.version(), deleteSnapshots, restype, context); @@ -207,6 +214,7 @@ public Mono deleteWithRestResponseAsync(String sharesnapsh * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -224,6 +232,7 @@ public Mono createSnapshotWithRestResponseAsync(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 createSnapshotWithRestResponseAsync(Integer timeout, Map metadata, Context context) { final String restype = "share"; final String comp = "snapshot"; @@ -237,9 +246,10 @@ public Mono createSnapshotWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setQuotaWithRestResponseAsync(Context context) { final Integer timeout = null; - final Integer quota = null; + final Long quota = null; final String restype = "share"; final String comp = "properties"; return service.setQuota(this.client.url(), timeout, this.client.version(), quota, restype, comp, context); @@ -254,7 +264,8 @@ public Mono setQuotaWithRestResponseAsync(Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ - public Mono setQuotaWithRestResponseAsync(Integer timeout, Integer quota, Context context) { + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setQuotaWithRestResponseAsync(Integer timeout, Long quota, Context context) { final String restype = "share"; final String comp = "properties"; return service.setQuota(this.client.url(), timeout, this.client.version(), quota, restype, comp, context); @@ -267,6 +278,7 @@ public Mono setQuotaWithRestResponseAsync(Integer timeou * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -284,6 +296,7 @@ public Mono setMetadataWithRestResponseAsync(Context * @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(Integer timeout, Map metadata, Context context) { final String restype = "share"; final String comp = "metadata"; @@ -297,6 +310,7 @@ public Mono setMetadataWithRestResponseAsync(Integer * @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(Context context) { final Integer timeout = null; final String restype = "share"; @@ -312,6 +326,7 @@ public Mono getAccessPolicyWithRestResponseAsync( * @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(Integer timeout, Context context) { final String restype = "share"; final String comp = "acl"; @@ -325,6 +340,7 @@ public Mono getAccessPolicyWithRestResponseAsync( * @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(Context context) { final Integer timeout = null; final String restype = "share"; @@ -342,6 +358,7 @@ public Mono setAccessPolicyWithRestResponseAsync( * @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(List shareAcl, Integer timeout, Context context) { final String restype = "share"; final String comp = "acl"; @@ -356,6 +373,7 @@ public Mono setAccessPolicyWithRestResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithRestResponseAsync(Context context) { final Integer timeout = null; final String restype = "share"; @@ -371,6 +389,7 @@ public Mono getStatisticsWithRestResponseAsync(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 getStatisticsWithRestResponseAsync(Integer timeout, Context context) { final String restype = "share"; final String comp = "stats"; diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/AccessPolicy.java b/storage/client/file/src/main/java/com/azure/storage/file/models/AccessPolicy.java index 94ccd39fbec5f..a5389aa6df849 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/AccessPolicy.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/AccessPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * An Access policy. */ @JacksonXmlRootElement(localName = "AccessPolicy") +@Fluent public final class AccessPolicy { /* * The date-time the policy is active. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/CorsRule.java b/storage/client/file/src/main/java/com/azure/storage/file/models/CorsRule.java index 998d7c00bbf93..a4419fcb6841a 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/CorsRule.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/CorsRule.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -15,6 +16,7 @@ * one domain (the origin domain) to call APIs in another domain. */ @JacksonXmlRootElement(localName = "CorsRule") +@Fluent public final class CorsRule { /* * The origin domains that are permitted to make a request against the diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java index 080e8961a2710..002eb887ac448 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DeleteSnapshotsOptionType.java @@ -14,12 +14,7 @@ public enum DeleteSnapshotsOptionType { /** * Enum value include. */ - INCLUDE("include"), - - /** - * Enum value only. - */ - ONLY("only"); + INCLUDE("include"); /** * The actual serialized value for a DeleteSnapshotsOptionType instance. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java index f4f14ebd7c7b4..2d9e1b99dda51 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "Directory-Create-Headers") +@Fluent public final class DirectoryCreateHeaders { /* * The ETag contains a value which represents the version of the directory, diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java index 7e98303ea6e71..a165d5a4c725f 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Directory-Delete-Headers") +@Fluent public final class DirectoryDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java index 08722706147e4..72a719bea1b1f 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryForceCloseHandlesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ForceCloseHandles operation. */ @JacksonXmlRootElement(localName = "Directory-ForceCloseHandles-Headers") +@Fluent public final class DirectoryForceCloseHandlesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java index 5739160de25c7..3e42c0318f67d 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.file.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,6 +16,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Directory-GetProperties-Headers") +@Fluent public final class DirectoryGetPropertiesHeaders { /* * The metadata property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryItem.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryItem.java index 4f385aee443ec..ae8703e8f0226 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryItem.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryItem.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * A listed directory item. */ @JacksonXmlRootElement(localName = "Directory") +@Fluent public final class DirectoryItem { /* * The name property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java index cbcd8b9d60100..c3431ac6fd12b 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListFilesAndDirectoriesSegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListFilesAndDirectoriesSegment operation. */ @JacksonXmlRootElement(localName = "Directory-ListFilesAndDirectoriesSegment-Headers") +@Fluent public final class DirectoryListFilesAndDirectoriesSegmentHeaders { /* * Specifies the format in which the results are returned. Currently this diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java index c816949938439..c12065681acdb 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectoryListHandlesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListHandles operation. */ @JacksonXmlRootElement(localName = "Directory-ListHandles-Headers") +@Fluent public final class DirectoryListHandlesHeaders { /* * Specifies the format in which the results are returned. Currently this diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java index 603bde2f285aa..01b1cfdc619bd 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/DirectorySetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Directory-SetMetadata-Headers") +@Fluent public final class DirectorySetMetadataHeaders { /* * The ETag contains a value which represents the version of the directory, diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java index b5a7162058d7c..d7827413292c1 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileAbortCopyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AbortCopy operation. */ @JacksonXmlRootElement(localName = "File-AbortCopy-Headers") +@Fluent public final class FileAbortCopyHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java index f294bbef75fdd..581e232cc3ceb 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "File-Create-Headers") +@Fluent public final class FileCreateHeaders { /* * The ETag contains a value which represents the version of the file, in diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java index daf2668bd0521..0eca1e14caae7 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "File-Delete-Headers") +@Fluent public final class FileDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java index df05458677164..7ac009d11d0c4 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileDownloadHeaders.java @@ -4,18 +4,20 @@ package com.azure.storage.file.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; +import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Map; /** * Defines headers for Download operation. */ @JacksonXmlRootElement(localName = "File-Download-Headers") +@Fluent public final class FileDownloadHeaders { /* * Returns the date and time the file was last modified. Any operation that @@ -345,7 +347,7 @@ public FileDownloadHeaders eTag(String eTag) { * @return the contentMD5 value. */ public byte[] contentMD5() { - return Arrays.copyOf(this.contentMD5, this.contentMD5.length); + return ImplUtils.clone(this.contentMD5); } /** @@ -362,7 +364,7 @@ public byte[] contentMD5() { * @return the FileDownloadHeaders object itself. */ public FileDownloadHeaders contentMD5(byte[] contentMD5) { - this.contentMD5 = Arrays.copyOf(contentMD5, contentMD5.length); + this.contentMD5 = ImplUtils.clone(contentMD5); return this; } @@ -714,7 +716,7 @@ public FileDownloadHeaders copyStatus(CopyStatusType copyStatus) { * @return the fileContentMD5 value. */ public byte[] fileContentMD5() { - return Arrays.copyOf(this.fileContentMD5, this.fileContentMD5.length); + return ImplUtils.clone(this.fileContentMD5); } /** @@ -728,7 +730,7 @@ public byte[] fileContentMD5() { * @return the FileDownloadHeaders object itself. */ public FileDownloadHeaders fileContentMD5(byte[] fileContentMD5) { - this.fileContentMD5 = Arrays.copyOf(fileContentMD5, fileContentMD5.length); + this.fileContentMD5 = ImplUtils.clone(fileContentMD5); return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java index 39f245c7d1116..34d7cf222d469 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileForceCloseHandlesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ForceCloseHandles operation. */ @JacksonXmlRootElement(localName = "File-ForceCloseHandles-Headers") +@Fluent public final class FileForceCloseHandlesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java index ff397f6cd7ce1..05059ba57cc42 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetPropertiesHeaders.java @@ -4,18 +4,20 @@ package com.azure.storage.file.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; +import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Map; /** * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "File-GetProperties-Headers") +@Fluent public final class FileGetPropertiesHeaders { /* * Returns the date and time the file was last modified. The date format @@ -323,7 +325,7 @@ public FileGetPropertiesHeaders eTag(String eTag) { * @return the contentMD5 value. */ public byte[] contentMD5() { - return Arrays.copyOf(this.contentMD5, this.contentMD5.length); + return ImplUtils.clone(this.contentMD5); } /** @@ -335,7 +337,7 @@ public byte[] contentMD5() { * @return the FileGetPropertiesHeaders object itself. */ public FileGetPropertiesHeaders contentMD5(byte[] contentMD5) { - this.contentMD5 = Arrays.copyOf(contentMD5, contentMD5.length); + this.contentMD5 = ImplUtils.clone(contentMD5); return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java index 61f16897c4fc4..94101d0b12811 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileGetRangeListHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetRangeList operation. */ @JacksonXmlRootElement(localName = "File-GetRangeList-Headers") +@Fluent public final class FileGetRangeListHeaders { /* * The date/time that the file was last modified. Any operation that diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileHTTPHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileHTTPHeaders.java index 01c69b3a9f299..6368cb9117d58 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileHTTPHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileHTTPHeaders.java @@ -4,15 +4,17 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.Arrays; /** * Additional parameters for a set of operations, such as: Files_create, * Files_setHTTPHeaders. */ @JacksonXmlRootElement(localName = "file-HTTP-headers") +@Fluent public final class FileHTTPHeaders { /* * Sets the MIME content type of the file. The default type is @@ -146,7 +148,7 @@ public FileHTTPHeaders fileCacheControl(String fileCacheControl) { * @return the fileContentMD5 value. */ public byte[] fileContentMD5() { - return Arrays.copyOf(this.fileContentMD5, this.fileContentMD5.length); + return ImplUtils.clone(this.fileContentMD5); } /** @@ -156,7 +158,7 @@ public byte[] fileContentMD5() { * @return the FileHTTPHeaders object itself. */ public FileHTTPHeaders fileContentMD5(byte[] fileContentMD5) { - this.fileContentMD5 = Arrays.copyOf(fileContentMD5, fileContentMD5.length); + this.fileContentMD5 = ImplUtils.clone(fileContentMD5); return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileItem.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileItem.java index 267445aaf42d2..2576625f162b1 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileItem.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileItem.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * A listed file item. */ @JacksonXmlRootElement(localName = "File") +@Fluent public final class FileItem { /* * The name property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java index c972e5cc9db44..fe7a3fcaa5128 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileListHandlesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListHandles operation. */ @JacksonXmlRootElement(localName = "File-ListHandles-Headers") +@Fluent public final class FileListHandlesHeaders { /* * Specifies the format in which the results are returned. Currently this diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileProperty.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileProperty.java index f045b9e209d79..38e6475dde575 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileProperty.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileProperty.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * File properties. */ @JacksonXmlRootElement(localName = "FileProperty") +@Fluent public final class FileProperty { /* * Content length of the file. This value may not be up-to-date since an diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java index 178e2f0cd66ba..6d50bff6a3ca5 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetHTTPHeadersHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetHTTPHeaders operation. */ @JacksonXmlRootElement(localName = "File-SetHTTPHeaders-Headers") +@Fluent public final class FileSetHTTPHeadersHeaders { /* * The ETag contains a value which represents the version of the file, in diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java index 98fa0ac8d2dc7..4d199c3601c0f 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "File-SetMetadata-Headers") +@Fluent public final class FileSetMetadataHeaders { /* * The ETag contains a value which represents the version of the file, in diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java index 939ed8e062949..1deb930d421a7 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileStartCopyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for StartCopy operation. */ @JacksonXmlRootElement(localName = "File-StartCopy-Headers") +@Fluent public final class FileStartCopyHeaders { /* * If the copy is completed, contains the ETag of the destination file. If diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java index 686014ab74e59..5ff931c341c53 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FileUploadRangeHeaders.java @@ -5,15 +5,17 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -import java.util.Arrays; /** * Defines headers for UploadRange operation. */ @JacksonXmlRootElement(localName = "File-UploadRange-Headers") +@Fluent public final class FileUploadRangeHeaders { /* * The ETag contains a value which represents the version of the file, in @@ -138,7 +140,7 @@ public FileUploadRangeHeaders lastModified(OffsetDateTime lastModified) { * @return the contentMD5 value. */ public byte[] contentMD5() { - return Arrays.copyOf(this.contentMD5, this.contentMD5.length); + return ImplUtils.clone(this.contentMD5); } /** @@ -151,7 +153,7 @@ public byte[] contentMD5() { * @return the FileUploadRangeHeaders object itself. */ public FileUploadRangeHeaders contentMD5(byte[] contentMD5) { - this.contentMD5 = Arrays.copyOf(contentMD5, contentMD5.length); + this.contentMD5 = ImplUtils.clone(contentMD5); return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java b/storage/client/file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java index b5b88d30e4b70..8888fe5a155c3 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/FilesAndDirectoriesListSegment.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * Abstract for entries that can be listed from Directory. */ @JacksonXmlRootElement(localName = "Entries") +@Fluent public final class FilesAndDirectoriesListSegment { /* * The directoryItems property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/HandleItem.java b/storage/client/file/src/main/java/com/azure/storage/file/models/HandleItem.java index a6f6d360a65e9..485ede45110e6 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/HandleItem.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/HandleItem.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * A listed Azure Storage handle item. */ @JacksonXmlRootElement(localName = "Handle") +@Fluent public final class HandleItem { /* * XSMB service handle ID diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java index 1ba129b882372..a1b837aec2516 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ListFilesAndDirectoriesSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * An enumeration of directories and files. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListFilesAndDirectoriesSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java index 0592fa5d4e37e..b344237919240 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ListHandlesResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * An enumeration of handles. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListHandlesResponse { private static final class EntriesWrapper { @JacksonXmlProperty(localName = "Handle") diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java index 97a7c340f5b69..02057898a9a34 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ListSharesResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * An enumeration of shares. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListSharesResponse { /* * The serviceEndpoint property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/Metrics.java b/storage/client/file/src/main/java/com/azure/storage/file/models/Metrics.java index a6272111de5ef..c0dd3fbffc8d2 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/Metrics.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/Metrics.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Storage Analytics metrics for file service. */ @JacksonXmlRootElement(localName = "Metrics") +@Fluent public final class Metrics { /* * The version of Storage Analytics to configure. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/Range.java b/storage/client/file/src/main/java/com/azure/storage/file/models/Range.java index d097cb3af18be..78bdfb86afb8e 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/Range.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/Range.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * An Azure Storage file range. */ @JacksonXmlRootElement(localName = "Range") +@Fluent public final class Range { /* * Start of the range. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/RetentionPolicy.java b/storage/client/file/src/main/java/com/azure/storage/file/models/RetentionPolicy.java index 9e8cb19acd17b..7df72050787a3 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/RetentionPolicy.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/RetentionPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The retention policy. */ @JacksonXmlRootElement(localName = "RetentionPolicy") +@Fluent public final class RetentionPolicy { /* * Indicates whether a retention policy is enabled for the File service. If diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java index 409494366dcf8..df71dd916dfdf 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceGetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Service-GetProperties-Headers") +@Fluent public final class ServiceGetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java index a735f1b81589d..f01750e386dc7 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceListSharesSegmentHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for ListSharesSegment operation. */ @JacksonXmlRootElement(localName = "Service-ListSharesSegment-Headers") +@Fluent public final class ServiceListSharesSegmentHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java index 43ce484399730..427b395e5fdba 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ServiceSetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetProperties operation. */ @JacksonXmlRootElement(localName = "Service-SetProperties-Headers") +@Fluent public final class ServiceSetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java index 32ec5a693c9fc..1f0e4f443f0df 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "Share-Create-Headers") +@Fluent public final class ShareCreateHeaders { /* * The ETag contains a value which represents the version of the share, in diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java index 5163b958e1a2d..23317403ce6e6 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareCreateSnapshotHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CreateSnapshot operation. */ @JacksonXmlRootElement(localName = "Share-CreateSnapshot-Headers") +@Fluent public final class ShareCreateSnapshotHeaders { /* * This header is a DateTime value that uniquely identifies the share diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java index ce8c796eba7c6..5489676b7fd02 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Share-Delete-Headers") +@Fluent public final class ShareDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java index 9988562a78509..cb6b86a1acb10 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Share-GetAccessPolicy-Headers") +@Fluent public final class ShareGetAccessPolicyHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java index c9534dc5060b2..56b7093c71b67 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.file.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,6 +16,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Share-GetProperties-Headers") +@Fluent public final class ShareGetPropertiesHeaders { /* * The metadata property. @@ -62,7 +64,7 @@ public final class ShareGetPropertiesHeaders { * Returns the current share quota in GB. */ @JsonProperty(value = "x-ms-share-quota") - private Integer quota; + private Long quota; /* * The errorCode property. @@ -223,7 +225,7 @@ public ShareGetPropertiesHeaders dateProperty(OffsetDateTime dateProperty) { * * @return the quota value. */ - public Integer quota() { + public Long quota() { return this.quota; } @@ -233,7 +235,7 @@ public Integer quota() { * @param quota the quota value to set. * @return the ShareGetPropertiesHeaders object itself. */ - public ShareGetPropertiesHeaders quota(Integer quota) { + public ShareGetPropertiesHeaders quota(Long quota) { this.quota = quota; return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java index 575cafb0351a9..453dcd186401c 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareGetStatisticsHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetStatistics operation. */ @JacksonXmlRootElement(localName = "Share-GetStatistics-Headers") +@Fluent public final class ShareGetStatisticsHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareItem.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareItem.java index 23a64ac334548..cdec4f96b31b7 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareItem.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareItem.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -12,6 +13,7 @@ * A listed Azure Storage share item. */ @JacksonXmlRootElement(localName = "Share") +@Fluent public final class ShareItem { /* * The name property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareProperties.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareProperties.java index 66e92994f800e..26963cecced68 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareProperties.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareProperties.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Properties of a share. */ @JacksonXmlRootElement(localName = "ShareProperties") +@Fluent public final class ShareProperties { /* * The lastModified property. @@ -30,7 +32,7 @@ public final class ShareProperties { * The quota property. */ @JsonProperty(value = "Quota", required = true) - private int quota; + private long quota; /** * Get the lastModified property: The lastModified property. @@ -84,7 +86,7 @@ public ShareProperties etag(String etag) { * * @return the quota value. */ - public int quota() { + public long quota() { return this.quota; } @@ -94,7 +96,7 @@ public int quota() { * @param quota the quota value to set. * @return the ShareProperties object itself. */ - public ShareProperties quota(int quota) { + public ShareProperties quota(long quota) { this.quota = quota; return this; } diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java index 4a688b1d61e4d..92e0c470cd045 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Share-SetAccessPolicy-Headers") +@Fluent public final class ShareSetAccessPolicyHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java index f92662e355a14..2d11c4a6b9d79 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Share-SetMetadata-Headers") +@Fluent public final class ShareSetMetadataHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java index 819b1046c923b..75ea625a4a27c 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareSetQuotaHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.file.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetQuota operation. */ @JacksonXmlRootElement(localName = "Share-SetQuota-Headers") +@Fluent public final class ShareSetQuotaHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareStats.java b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareStats.java index 6738332eb4709..8d3c2c6e69df5 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/ShareStats.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/ShareStats.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Stats for the share. */ @JacksonXmlRootElement(localName = "ShareStats") +@Fluent public final class ShareStats { /* * The approximate size of the data stored in bytes, rounded up to the diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/SignedIdentifier.java b/storage/client/file/src/main/java/com/azure/storage/file/models/SignedIdentifier.java index 566ab7070c713..242c647f5bae8 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/SignedIdentifier.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/SignedIdentifier.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Signed identifier. */ @JacksonXmlRootElement(localName = "SignedIdentifier") +@Fluent public final class SignedIdentifier { /* * A unique id. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/StorageError.java b/storage/client/file/src/main/java/com/azure/storage/file/models/StorageError.java index 801db72d87c0a..b7274f2afb950 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/StorageError.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/StorageError.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The StorageError model. */ @JacksonXmlRootElement(localName = "StorageError") +@Fluent public final class StorageError { /* * The message property. diff --git a/storage/client/file/src/main/java/com/azure/storage/file/models/StorageServiceProperties.java b/storage/client/file/src/main/java/com/azure/storage/file/models/StorageServiceProperties.java index 360b85491edf1..e3892f5f2c4ba 100644 --- a/storage/client/file/src/main/java/com/azure/storage/file/models/StorageServiceProperties.java +++ b/storage/client/file/src/main/java/com/azure/storage/file/models/StorageServiceProperties.java @@ -4,6 +4,7 @@ package com.azure.storage.file.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * Storage service properties. */ @JacksonXmlRootElement(localName = "StorageServiceProperties") +@Fluent public final class StorageServiceProperties { /* * A summary of request statistics grouped by API in hourly aggregates for diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java index 4f678dfe10832..b8fc2de79856e 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.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 appendBlobClientBuilder for creating a new instance of the AzureQueueStorage type. + * A builder for creating a new instance of the AzureQueueStorage type. */ +@ServiceClientBuilder(serviceClients = AzureQueueStorageImpl.class) public final class AzureQueueStorageBuilder { /* * The URL of the service account, queue or message that is the targe of the desired operation. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java index 1573b9c7e05bd..4288bcc04b487 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java @@ -4,14 +4,13 @@ package com.azure.storage.queue.implementation; -import com.azure.core.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; /** * Initializes a new instance of the AzureQueueStorage type. */ -public final class AzureQueueStorageImpl extends ServiceClient { +public final class AzureQueueStorageImpl { /** * The URL of the service account, queue or message that is the targe of the desired operation. */ @@ -62,6 +61,20 @@ AzureQueueStorageImpl version(String 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 httpPipeline() { + return this.httpPipeline; + } + /** * The ServicesImpl object to access its operations. */ @@ -131,7 +144,7 @@ public AzureQueueStorageImpl() { * @param httpPipeline The HTTP pipeline to send requests through. */ public AzureQueueStorageImpl(HttpPipeline httpPipeline) { - super(httpPipeline); + this.httpPipeline = httpPipeline; this.services = new ServicesImpl(this); this.queues = new QueuesImpl(this); this.messages = new MessagesImpl(this); diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java index 8a705fe7e4af7..611e58170b3c8 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java @@ -4,17 +4,19 @@ package com.azure.storage.queue.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.DELETE; -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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +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.util.Context; import com.azure.storage.queue.models.MessageIdsDeleteResponse; import com.azure.storage.queue.models.MessageIdsUpdateResponse; @@ -43,7 +45,7 @@ public final class MessageIdsImpl { * @param client the instance of the service client containing this operation class. */ public MessageIdsImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(MessageIdsService.class, client); + this.service = RestProxy.create(MessageIdsService.class, client.httpPipeline()); this.client = client; } @@ -52,14 +54,14 @@ public MessageIdsImpl(AzureQueueStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Queues MessageId") + @ServiceInterface(name = "MessageIds") private interface MessageIdsService { - @PUT("{queueName}/messages/{messageid}") + @Put("{queueName}/messages/{messageid}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono update(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") QueueMessage queueMessage, @QueryParam("popreceipt") String popReceipt, @QueryParam("visibilitytimeout") int visibilitytimeout, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @DELETE("{queueName}/messages/{messageid}") + @Delete("{queueName}/messages/{messageid}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@HostParam("url") String url, @QueryParam("popreceipt") String popReceipt, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); @@ -75,6 +77,7 @@ private interface MessageIdsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateWithRestResponseAsync(QueueMessage queueMessage, String popReceipt, int visibilitytimeout, Context context) { final Integer timeout = null; final String requestId = null; @@ -93,6 +96,7 @@ public Mono updateWithRestResponseAsync(QueueMessage q * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateWithRestResponseAsync(QueueMessage queueMessage, String popReceipt, int visibilitytimeout, Integer timeout, String requestId, Context context) { return service.update(this.client.url(), queueMessage, popReceipt, visibilitytimeout, timeout, this.client.version(), requestId, context); } @@ -105,6 +109,7 @@ public Mono updateWithRestResponseAsync(QueueMessage q * @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 popReceipt, Context context) { final Integer timeout = null; final String requestId = null; @@ -121,6 +126,7 @@ public Mono deleteWithRestResponseAsync(String popRece * @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 popReceipt, Integer timeout, String requestId, Context context) { return service.delete(this.client.url(), popReceipt, timeout, this.client.version(), requestId, context); } diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java index ee59aae16b63f..32809752caebc 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.queue.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.POST; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.Post; +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.util.Context; import com.azure.storage.queue.models.MessagesClearResponse; import com.azure.storage.queue.models.MessagesDequeueResponse; @@ -46,7 +48,7 @@ public final class MessagesImpl { * @param client the instance of the service client containing this operation class. */ public MessagesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(MessagesService.class, client); + this.service = RestProxy.create(MessagesService.class, client.httpPipeline()); this.client = client; } @@ -55,24 +57,24 @@ public MessagesImpl(AzureQueueStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Queues Messages") + @ServiceInterface(name = "Messages") private interface MessagesService { - @GET("{queueName}/messages") + @Get("{queueName}/messages") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono dequeue(@HostParam("url") String url, @QueryParam("numofmessages") Integer numberOfMessages, @QueryParam("visibilitytimeout") Integer visibilitytimeout, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @DELETE("{queueName}/messages") + @Delete("{queueName}/messages") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono clear(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @POST("{queueName}/messages") + @Post("{queueName}/messages") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono enqueue(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") QueueMessage queueMessage, @QueryParam("visibilitytimeout") Integer visibilitytimeout, @QueryParam("messagettl") Integer messageTimeToLive, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @GET("{queueName}/messages") + @Get("{queueName}/messages") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono peek(@HostParam("url") String url, @QueryParam("numofmessages") Integer numberOfMessages, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("peekonly") String peekonly, Context context); @@ -85,6 +87,7 @@ private interface MessagesService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono dequeueWithRestResponseAsync(Context context) { final Integer numberOfMessages = null; final Integer visibilitytimeout = null; @@ -104,6 +107,7 @@ public Mono dequeueWithRestResponseAsync(Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono dequeueWithRestResponseAsync(Integer numberOfMessages, Integer visibilitytimeout, Integer timeout, String requestId, Context context) { return service.dequeue(this.client.url(), numberOfMessages, visibilitytimeout, timeout, this.client.version(), requestId, context); } @@ -115,6 +119,7 @@ public Mono dequeueWithRestResponseAsync(Integer number * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono clearWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; @@ -130,6 +135,7 @@ public Mono clearWithRestResponseAsync(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono clearWithRestResponseAsync(Integer timeout, String requestId, Context context) { return service.clear(this.client.url(), timeout, this.client.version(), requestId, context); } @@ -142,6 +148,7 @@ public Mono clearWithRestResponseAsync(Integer timeout, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono enqueueWithRestResponseAsync(QueueMessage queueMessage, Context context) { final Integer visibilitytimeout = null; final Integer messageTimeToLive = null; @@ -162,6 +169,7 @@ public Mono enqueueWithRestResponseAsync(QueueMessage q * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono enqueueWithRestResponseAsync(QueueMessage queueMessage, Integer visibilitytimeout, Integer messageTimeToLive, Integer timeout, String requestId, Context context) { return service.enqueue(this.client.url(), queueMessage, visibilitytimeout, messageTimeToLive, timeout, this.client.version(), requestId, context); } @@ -173,6 +181,7 @@ public Mono enqueueWithRestResponseAsync(QueueMessage q * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono peekWithRestResponseAsync(Context context) { final Integer numberOfMessages = null; final Integer timeout = null; @@ -191,6 +200,7 @@ public Mono peekWithRestResponseAsync(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono peekWithRestResponseAsync(Integer numberOfMessages, Integer timeout, String requestId, Context context) { final String peekonly = "true"; return service.peek(this.client.url(), numberOfMessages, timeout, this.client.version(), requestId, peekonly, context); diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java index 2eb2d4d1ec2e2..9665d355022b3 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.queue.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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; 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.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.util.Context; import com.azure.storage.queue.models.QueuesCreateResponse; import com.azure.storage.queue.models.QueuesDeleteResponse; @@ -25,10 +27,9 @@ import com.azure.storage.queue.models.QueuesSetMetadataResponse; import com.azure.storage.queue.models.SignedIdentifier; import com.azure.storage.queue.models.StorageErrorException; -import reactor.core.publisher.Mono; - 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 @@ -51,7 +52,7 @@ public final class QueuesImpl { * @param client the instance of the service client containing this operation class. */ public QueuesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(QueuesService.class, client); + this.service = RestProxy.create(QueuesService.class, client.httpPipeline()); this.client = client; } @@ -60,34 +61,34 @@ public QueuesImpl(AzureQueueStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Queues Queue") + @ServiceInterface(name = "Queues") private interface QueuesService { - @PUT("{queueName}") + @Put("{queueName}") @ExpectedResponses({201, 204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@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, Context context); - @DELETE("{queueName}") + @Delete("{queueName}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); - @GET("{queueName}") + @Get("{queueName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@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("{queueName}") + @Put("{queueName}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@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("comp") String comp, Context context); - @GET("{queueName}") + @Get("{queueName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccessPolicy(@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("{queueName}") + @Put("{queueName}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setAccessPolicy(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper queueAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @@ -100,6 +101,7 @@ private interface QueuesService { * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -117,6 +119,7 @@ public Mono createWithRestResponseAsync(Context context) { * @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(Integer timeout, Map metadata, String requestId, Context context) { return service.create(this.client.url(), timeout, metadata, this.client.version(), requestId, context); } @@ -128,6 +131,7 @@ public Mono createWithRestResponseAsync(Integer timeout, M * @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(Context context) { final Integer timeout = null; final String requestId = null; @@ -143,6 +147,7 @@ public Mono deleteWithRestResponseAsync(Context context) { * @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(Integer timeout, String requestId, Context context) { return service.delete(this.client.url(), timeout, this.client.version(), requestId, context); } @@ -154,6 +159,7 @@ public Mono deleteWithRestResponseAsync(Integer timeout, S * @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(Context context) { final Integer timeout = null; final String requestId = null; @@ -170,6 +176,7 @@ public Mono getPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String comp = "metadata"; return service.getProperties(this.client.url(), timeout, this.client.version(), requestId, comp, context); @@ -182,6 +189,7 @@ public Mono getPropertiesWithRestResponseAsync(Inte * @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(Context context) { final Integer timeout = null; final Map metadata = null; @@ -200,6 +208,7 @@ public Mono setMetadataWithRestResponseAsync(Context * @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(Integer timeout, Map metadata, String requestId, Context context) { final String comp = "metadata"; return service.setMetadata(this.client.url(), timeout, metadata, this.client.version(), requestId, comp, context); @@ -212,6 +221,7 @@ public Mono setMetadataWithRestResponseAsync(Integer * @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(Context context) { final Integer timeout = null; final String requestId = null; @@ -228,6 +238,7 @@ public Mono getAccessPolicyWithRestResponseAsync( * @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(Integer timeout, String requestId, Context context) { final String comp = "acl"; return service.getAccessPolicy(this.client.url(), timeout, this.client.version(), requestId, comp, context); @@ -240,6 +251,7 @@ public Mono getAccessPolicyWithRestResponseAsync( * @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(Context context) { final Integer timeout = null; final String requestId = null; @@ -258,6 +270,7 @@ public Mono setAccessPolicyWithRestResponseAsync( * @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(List queueAcl, Integer timeout, String requestId, Context context) { final String comp = "acl"; SignedIdentifiersWrapper queueAclConverted = new SignedIdentifiersWrapper(queueAcl); diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java index dc353d45f5243..32fc830c6b168 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.queue.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.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.CollectionFormat; 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.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.queue.models.ListQueuesIncludeType; @@ -25,9 +27,8 @@ import com.azure.storage.queue.models.ServicesSetPropertiesResponse; import com.azure.storage.queue.models.StorageErrorException; import com.azure.storage.queue.models.StorageServiceProperties; -import reactor.core.publisher.Mono; - import java.util.List; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -50,7 +51,7 @@ public final class ServicesImpl { * @param client the instance of the service client containing this operation class. */ public ServicesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(ServicesService.class, client); + this.service = RestProxy.create(ServicesService.class, client.httpPipeline()); this.client = client; } @@ -59,24 +60,24 @@ public ServicesImpl(AzureQueueStorageImpl client) { * proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Queues Services") + @ServiceInterface(name = "Services") private interface ServicesService { - @PUT("") + @Put("") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setProperties(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") StorageServiceProperties storageServiceProperties, @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("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@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, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getStatistics(@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, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listQueuesSegment(@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("comp") String comp, Context context); @@ -90,6 +91,7 @@ private interface ServicesService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Context context) { final Integer timeout = null; final String requestId = null; @@ -108,6 +110,7 @@ public Mono setPropertiesWithRestResponseAsync(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 setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; @@ -121,6 +124,7 @@ public Mono setPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; @@ -138,6 +142,7 @@ public Mono getPropertiesWithRestResponseAsync(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 getPropertiesWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; @@ -151,6 +156,7 @@ public Mono getPropertiesWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; @@ -168,6 +174,7 @@ public Mono getStatisticsWithRestResponseAsync(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 getStatisticsWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "stats"; @@ -181,6 +188,7 @@ public Mono getStatisticsWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listQueuesSegmentWithRestResponseAsync(Context context) { final String prefix = null; final String marker = null; @@ -205,6 +213,7 @@ public Mono listQueuesSegmentWithRestResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listQueuesSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { final String comp = "list"; String includeConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/AccessPolicy.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/AccessPolicy.java index e2a86de1dcbcd..40eec9949e94e 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/AccessPolicy.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/AccessPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * An Access policy. */ @JacksonXmlRootElement(localName = "AccessPolicy") +@Fluent public final class AccessPolicy { /* * the date-time the policy is active diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/CorsRule.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/CorsRule.java index e5836439cdf3e..ae40f253efb69 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/CorsRule.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/CorsRule.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -15,6 +16,7 @@ * one domain (the origin domain) to call APIs in another domain. */ @JacksonXmlRootElement(localName = "CorsRule") +@Fluent public final class CorsRule { /* * The origin domains that are permitted to make a request against the diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java new file mode 100644 index 0000000000000..81614fc1cba98 --- /dev/null +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/DequeuedMessage.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.queue.models; + +import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** + * The object returned in the QueueMessageList array when calling Get Messages + * on a Queue. + */ +@JacksonXmlRootElement(localName = "QueueMessage") +@Fluent +public final class DequeuedMessage { + /* + * The Id of the Message. + */ + @JsonProperty(value = "MessageId", required = true) + private String messageId; + + /* + * The time the Message was inserted into the Queue. + */ + @JsonProperty(value = "InsertionTime", required = true) + private DateTimeRfc1123 insertionTime; + + /* + * The time that the Message will expire and be automatically deleted. + */ + @JsonProperty(value = "ExpirationTime", required = true) + private DateTimeRfc1123 expirationTime; + + /* + * This value is required to delete the Message. If deletion fails using + * this popreceipt then the message has been dequeued by another client. + */ + @JsonProperty(value = "PopReceipt", required = true) + private String popReceipt; + + /* + * The time that the message will again become visible in the Queue. + */ + @JsonProperty(value = "TimeNextVisible", required = true) + private DateTimeRfc1123 timeNextVisible; + + /* + * The number of times the message has been dequeued. + */ + @JsonProperty(value = "DequeueCount", required = true) + private long dequeueCount; + + /* + * The content of the Message. + */ + @JsonProperty(value = "MessageText", required = true) + private String messageText; + + /** + * Get the messageId property: The Id of the Message. + * + * @return the messageId value. + */ + public String messageId() { + return this.messageId; + } + + /** + * Set the messageId property: The Id of the Message. + * + * @param messageId the messageId value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Get the insertionTime property: The time the Message was inserted into + * the Queue. + * + * @return the insertionTime value. + */ + public OffsetDateTime insertionTime() { + if (this.insertionTime == null) { + return null; + } + return this.insertionTime.dateTime(); + } + + /** + * Set the insertionTime property: The time the Message was inserted into + * the Queue. + * + * @param insertionTime the insertionTime value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage insertionTime(OffsetDateTime insertionTime) { + if (insertionTime == null) { + this.insertionTime = null; + } else { + this.insertionTime = new DateTimeRfc1123(insertionTime); + } + return this; + } + + /** + * Get the expirationTime property: The time that the Message will expire + * and be automatically deleted. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + if (this.expirationTime == null) { + return null; + } + return this.expirationTime.dateTime(); + } + + /** + * Set the expirationTime property: The time that the Message will expire + * and be automatically deleted. + * + * @param expirationTime the expirationTime value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage expirationTime(OffsetDateTime expirationTime) { + if (expirationTime == null) { + this.expirationTime = null; + } else { + this.expirationTime = new DateTimeRfc1123(expirationTime); + } + return this; + } + + /** + * Get the popReceipt property: This value is required to delete the + * Message. If deletion fails using this popreceipt then the message has + * been dequeued by another client. + * + * @return the popReceipt value. + */ + public String popReceipt() { + return this.popReceipt; + } + + /** + * Set the popReceipt property: This value is required to delete the + * Message. If deletion fails using this popreceipt then the message has + * been dequeued by another client. + * + * @param popReceipt the popReceipt value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage popReceipt(String popReceipt) { + this.popReceipt = popReceipt; + return this; + } + + /** + * Get the timeNextVisible property: The time that the message will again + * become visible in the Queue. + * + * @return the timeNextVisible value. + */ + public OffsetDateTime timeNextVisible() { + if (this.timeNextVisible == null) { + return null; + } + return this.timeNextVisible.dateTime(); + } + + /** + * Set the timeNextVisible property: The time that the message will again + * become visible in the Queue. + * + * @param timeNextVisible the timeNextVisible value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage timeNextVisible(OffsetDateTime timeNextVisible) { + if (timeNextVisible == null) { + this.timeNextVisible = null; + } else { + this.timeNextVisible = new DateTimeRfc1123(timeNextVisible); + } + return this; + } + + /** + * Get the dequeueCount property: The number of times the message has been + * dequeued. + * + * @return the dequeueCount value. + */ + public long dequeueCount() { + return this.dequeueCount; + } + + /** + * Set the dequeueCount property: The number of times the message has been + * dequeued. + * + * @param dequeueCount the dequeueCount value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage dequeueCount(long dequeueCount) { + this.dequeueCount = dequeueCount; + return this; + } + + /** + * Get the messageText property: The content of the Message. + * + * @return the messageText value. + */ + public String messageText() { + return this.messageText; + } + + /** + * Set the messageText property: The content of the Message. + * + * @param messageText the messageText value to set. + * @return the DequeuedMessage object itself. + */ + public DequeuedMessage messageText(String messageText) { + this.messageText = messageText; + return this; + } +} diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java index 16f1cccb9e244..096bbac70bdb3 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/EnqueuedMessage.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -14,6 +15,7 @@ * on a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") +@Fluent public final class EnqueuedMessage { /* * The Id of the Message. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java index 1fc313b4a45b2..c6975aae93dc9 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/GeoReplication.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * The GeoReplication model. */ @JacksonXmlRootElement(localName = "GeoReplication") +@Fluent public final class GeoReplication { /* * The status of the secondary location. Possible values include: 'live', diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java index 8e34bc50503ba..90d462272f47f 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ListQueuesSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * The object returned when calling List Queues on a Queue Service. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListQueuesSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/Logging.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/Logging.java index c5289b4fb5a50..a08399c0186c7 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/Logging.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/Logging.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Azure Analytics Logging settings. */ @JacksonXmlRootElement(localName = "Logging") +@Fluent public final class Logging { /* * The version of Storage Analytics to configure. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java index e369a4d60c99d..c51a8961f2bbc 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "MessageId-Delete-Headers") +@Fluent public final class MessageIdDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java index a0129420618db..dba25a728e8ec 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessageIdUpdateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Update operation. */ @JacksonXmlRootElement(localName = "MessageId-Update-Headers") +@Fluent public final class MessageIdUpdateHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java index 6bb1165cb4de1..6265fda562731 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesClearHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Clear operation. */ @JacksonXmlRootElement(localName = "Messages-Clear-Headers") +@Fluent public final class MessagesClearHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java index 3957cd8a79d41..d9e8fd905f03e 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Dequeue operation. */ @JacksonXmlRootElement(localName = "Messages-Dequeue-Headers") +@Fluent public final class MessagesDequeueHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java index 4ab4b09a4a620..c08c7ccc025c7 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesDequeueResponse.java @@ -12,7 +12,7 @@ /** * Contains all response data for the dequeue operation. */ -public final class MessagesDequeueResponse extends ResponseBase> { +public final class MessagesDequeueResponse extends ResponseBase> { /** * Creates an instance of MessagesDequeueResponse. * @@ -22,7 +22,7 @@ public final class MessagesDequeueResponse extends ResponseBase value, MessagesDequeueHeaders headers) { + public MessagesDequeueResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, List value, MessagesDequeueHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } @@ -30,7 +30,7 @@ public MessagesDequeueResponse(HttpRequest request, int statusCode, HttpHeaders * @return the deserialized response body. */ @Override - public List value() { + public List value() { return super.value(); } } diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java index 39dc57ed0c2a1..d98604bb3c840 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesEnqueueHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Enqueue operation. */ @JacksonXmlRootElement(localName = "Messages-Enqueue-Headers") +@Fluent public final class MessagesEnqueueHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java index 4733069112ace..fc4c65fcd5bd3 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/MessagesPeekHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Peek operation. */ @JacksonXmlRootElement(localName = "Messages-Peek-Headers") +@Fluent public final class MessagesPeekHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/Metrics.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/Metrics.java index 8c9b2fe7923ae..03a16a676ba14 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/Metrics.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/Metrics.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The Metrics model. */ @JacksonXmlRootElement(localName = "Metrics") +@Fluent public final class Metrics { /* * The version of Storage Analytics to configure. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java index d86bdab8c2305..c396a689dbaf2 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -14,6 +15,7 @@ * on a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") +@Fluent public final class PeekedMessageItem { /* * The Id of the Message. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java index 7e0bee9cd7eb4..5feda5191d356 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "Queue-Create-Headers") +@Fluent public final class QueueCreateHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java index 5a29a098628c2..5d1db54847daa 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Queue-Delete-Headers") +@Fluent public final class QueueDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java index 65fa98edf8aa2..904ed5a98bca4 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Queue-GetAccessPolicy-Headers") +@Fluent public final class QueueGetAccessPolicyHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java index 20286e8a0ddb3..15d84b0192e7a 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.queue.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,6 +16,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Queue-GetProperties-Headers") +@Fluent public final class QueueGetPropertiesHeaders { /* * The metadata property. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueItem.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueItem.java index 1575af6babcb8..ea9ca80c51004 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueItem.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueItem.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -12,6 +13,7 @@ * An Azure Storage Queue. */ @JacksonXmlRootElement(localName = "Queue") +@Fluent public final class QueueItem { /* * The name of the Queue. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueMessage.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueMessage.java index 204825759ab0c..edd78cbfd5d35 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueMessage.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueMessage.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * A Message object which can be stored in a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") +@Fluent public final class QueueMessage { /* * The content of the message diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java index c2152ccc6a5cb..672543a78f1b2 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Queue-SetAccessPolicy-Headers") +@Fluent public final class QueueSetAccessPolicyHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java index f68e00835afaa..4c1997da6277b 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/QueueSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Queue-SetMetadata-Headers") +@Fluent public final class QueueSetMetadataHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/RetentionPolicy.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/RetentionPolicy.java index 045580d2c31ad..ada0ae8d0e2ca 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/RetentionPolicy.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/RetentionPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * the retention policy. */ @JacksonXmlRootElement(localName = "RetentionPolicy") +@Fluent public final class RetentionPolicy { /* * Indicates whether a retention policy is enabled for the storage service diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java index e58eab15aff92..5c099801501f6 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Service-GetProperties-Headers") +@Fluent public final class ServiceGetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java index ac56fc0624e8d..2dfaf92bbeaa5 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceGetStatisticsHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetStatistics operation. */ @JacksonXmlRootElement(localName = "Service-GetStatistics-Headers") +@Fluent public final class ServiceGetStatisticsHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java index 341fd32e50a97..8670be5637ce0 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceListQueuesSegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.queue.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListQueuesSegment operation. */ @JacksonXmlRootElement(localName = "Service-ListQueuesSegment-Headers") +@Fluent public final class ServiceListQueuesSegmentHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java index aa98c955afe48..6ae6da4ef69bf 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/ServiceSetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetProperties operation. */ @JacksonXmlRootElement(localName = "Service-SetProperties-Headers") +@Fluent public final class ServiceSetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/SignedIdentifier.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/SignedIdentifier.java index 7764f3a25ea75..56465abb7435c 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/SignedIdentifier.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/SignedIdentifier.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * signed identifier. */ @JacksonXmlRootElement(localName = "SignedIdentifier") +@Fluent public final class SignedIdentifier { /* * a unique id diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageError.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageError.java index 0e264e6da0b82..b86ff0fd7e3fb 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageError.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageError.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The StorageError model. */ @JacksonXmlRootElement(localName = "StorageError") +@Fluent public final class StorageError { /* * The message property. diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceProperties.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceProperties.java index e13cbde9e5cfb..8a607a5a44943 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceProperties.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceProperties.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * Storage Service Properties. */ @JacksonXmlRootElement(localName = "StorageServiceProperties") +@Fluent public final class StorageServiceProperties { /* * Azure Analytics Logging settings diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceStats.java b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceStats.java index d70c794bda65a..6e45d422538f9 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceStats.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/models/StorageServiceStats.java @@ -4,6 +4,7 @@ package com.azure.storage.queue.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Stats for the storage service. */ @JacksonXmlRootElement(localName = "StorageServiceStats") +@Fluent public final class StorageServiceStats { /* * Geo-Replication information for the Secondary Storage Service